interface Plan {
    course: Types.Course;
    cutoffMargin?: number;
    cutoffs?: PlanCutoff[];
    delay: number;
    delays: PlanDelay[];
    event: Types.Event;
    events: PlanEvents;
    heatModel:
        | undefined
        | { baseline: number; max: number; start: number; stop: number };
    id?: null | string | number | symbol;
    method: PlanDataMethod;
    name?: string;
    pacing: Types.Pacing;
    points: Types.PlanPoint[];
    scales: PlanScales;
    splits: PlanSplits;
    stats: PlanStats;
    strategy: factors.Strategy;
    target: number;
    typicalDelay: number;
    version: number;
    checkPacing(): void;
    getDelayAtWaypoint(waypoint: Types.Waypoint): number;
    getPoint(loc: number, insert?: boolean): Types.PlanPoint;
    update(data: PlanUpdateData): void;
}

Implemented by

Properties

course: Types.Course
cutoffMargin?: number
cutoffs?: PlanCutoff[]

cutoffs array is calculated on get as a combination of the course cutoffs and the plan points gets re-calculated if the course or plan version changes

delay: number

delay is sum of Plan.delays

delays: PlanDelay[]

delays array is calculated on get as a combination of the specified delays and default delays based on waypoint types gets re-calculated if the course or plan version changes

event: Types.Event

Event object gets re-calculated if the course or plan version changes

events: PlanEvents
heatModel:
    | undefined
    | { baseline: number; max: number; start: number; stop: number }
id?: null | string | number | symbol

Unique identifier for the plan

Method for calculating target time

name?: string

Display name for the plan

pacing: Types.Pacing
points: Types.PlanPoint[]
scales: PlanScales

Scales for factors

splits: PlanSplits

splits

stats: PlanStats

Plan stats object

strategy: factors.Strategy
target: number

Target time in seconds

typicalDelay: number

Typical delay for the plan; amount of dwell time at waypoints where 'hasDelay' is true

version: number

version of plan update (non-trivial changes that affect pacing)

Methods

  • Finds and optionally inserts a point at an input location.

    Parameters

    • loc: number

      The location (in km) to determine value.

    • Optionalinsert: boolean

      Whether to also insert a created point into the points array. Defaults to false.

    Returns Types.PlanPoint

    The PlanPoint at input location.