# References

- https://www.faa.gov/sites/faa.gov/files/regulations_policies/handbooks_manuals/aviation/instrument_procedures_handbook/FAA-H-8083-16B_Chapter_6.pdf
- https://developers.navigraph.com/docs/navigation-data/dfd-data-format#procedure-leg-data-fields-minimum-requirements


# Terminators

## Arc to Fix (AF)

### Example

LGAV BIBE1K SID (Cycle 2507, ID 10653)

### Minimum Required Fields

- `WptID`: FixIdentifier
- `TurnDir`: TurnDirection
- `NavID`: RecommendedNavaid
- `NavBear`: Theta (fix radial)
- `NavDist`: RHO
- `Course`: MagCourse (boundary radial)

### Instructions

- From preceding fix, fly a smooth arc to the fix identified by (`WptID`, `WptLat`, `WptLon`) *or*
  (`NavID`, `NavLat`, `NavLon`, `NavDist`, `NavBear`).
- Arc radius shall be `NavDist`.
- Arc center shall be navaid identified by `NavID`, `NavLat`, `NavLon`.
- `Course` shall be the boundary radial on which the arc begins, measured from the navaid
  identified by (`NavID`, `NavLat`, `NavLon`, `NavDist`, `NavBear`).
- Arc and turn shall be flown in direction specified by `TurnDir`.

### Units

- `NavBear` and `Course` are in **degrees magnetic**.
- `NavDist` is in **nmi**. `NavDist` is geodesic (great-circle).

### Notes

While similar to an RF, the center point is coded differently.


## Course to Altitude (CA)

### Example

LGAV BIBE1L SID (Cycle 2507, ID 10654)

### Minimum Required Fields

- `Course`: MagCourse
- `Alt`: Alt1+ (at or above)

### Instructions

- From preceding fix, fly along `Course` until reaching `Alt`.
- If preceding fix was overfly, offset outbound `Course` to end of turn (tangent).
- Earliest leg terminations is at point of tangent.

### Units

- `Course` is in **degrees magnetic**.
- `Alt` is in **ft**, but doubles as an FMS constraint.

### Notes

The leg terminates upon reaching `Alt`.
This intercept point then becomes the origin fix of the succeeding leg.
This new origin is an implicit overfly.


## Course to DME Distance (CD)

### Example

LGAV BIBE2F SID (Cycle 2507, ID 10657)

### Minimum Required Fields

- `NavID`: RecommendedNavaid
- `Course`: MagCourse
- `Distance`: RouteDISTANCEHoldingTime (DME distance)

### Instructions

- From preceding fix, fly along `Course` until reaching `Distance` from the navaid identified by
  `NavID`.
- If preceding fix was overfly, offset outbound `Course` to end of turn (tangent).
- Earliest leg terminations is at point of tangent.

### Units

- `Course` is in **degrees magnetic**.
- `Distance` is in **nmi**. `Distance` is slant **not** geodesic.

### Notes

The leg terminates upon reaching `Distance`.
This intercept point then becomes the origin fix of the succeeding leg.
This new origin is an implicit overfly.


## Course to Fix (CF)

### Example

LGAV BIBE2F SID (Cycle 2507, ID 10657)

### Minimum Required Fields

- `WptID`: FixIdentifier
- `NavID`: RecommendedNavaid
- `NavBear`: Theta
- `NavDist`: RHO
- `Course`: MagCourse
- `Distance`: RouteDISTANCEHoldingTime (Path length)

### Instructions

- From preceding fix, fly `Course` to the fix identified by (`WptID`, `WptLat`, `WptLon`) *or* 
  (`NavID`, `NavLat`, `NavLon`, `NavDist`, `NavBear`).
- If preceding fix was overfly, continue turn until intercept `Course`, then continue on `Course`.

### Units

- `NavBear` and `Course` are in **degrees magnetic**.
- `NavDist` and `Distance` are in **nmi**. `NavDist` and `Distance` are geodesic.

### Notes

While this might feel like a TF, it isn't.
A TF does not specify an exact course to be flown, relying on the computers to figure out the
great-circle between the two fixes.

My guess is, that a CF results in the turn from the preceding fix to be *shifted* so as to
ensure the outbound course to the specified fix is equal to the coded course.

Additionally, if a TurnDir is specified, if a large turn is required to fly `Course`, the turn
shall be `TurnDir`.
**This is a major difference to TF, these *never* produce such turns.**


## Course to Intercept (CI)

### Example

LGAV BIBE1L SID (Cycle 2507, ID 10654)

### Minimum Required Fields

- `Course`: MagCourse

### Instructions

- From preceding fix, fly `Course` until interception of course of the succeeding leg.

### Units

- `Course` is in **degrees magnetic**.

### Notes

This needs to look into the succeeding leg in order to calculate the intercept point.
This intercept point then becomes the origin fix of the succeeding leg.
This new origin can never be an overfly due to the intercept nature.


## Course to Radial Termination (CR)

### Example

LGAV KOR1D SID (Cycle 2507, ID 10679)

### Minimum Required Fields

- `NavID`: RecommendedNavaid
- `NavBear`: Theta
- `Course`: MagCourse

### Instructions

- From preceding fix, fly `Course` until interception of `NavBear` radial *from* the navaid
  identified by (`NavID`, `NavLat`, `NavLon`).

### Units

- `NavBear` and `Course` are in **degrees magnetic**.

### Notes

The leg terminates at the intercept point.
This intercept point then becomes the origin fix of the succeeding leg.


## Direct to Fix (DF)

### Example

LGAV KOR1D SID (Cycle 2507, ID 10679)

### Minimum Required Fields

- `WptID`: FixIdentifier
- `IsFlyOver`: Flyover

### Instructions

- From present position, fly direct to fix identified by `WptID`.
- If preceding fix and fix identified by `WptId` are the same, execute 360° turn
  (requires `TurnDir`).

### Units

- `IsFlyOver`: Boolean indicating if fix is a mandatory fly over.


## Track from Fix to Altitude (FA)

### Example

LGAV BIBE2F SID (Cycle 2507, ID 10657)

### Minimum Required Fields

- `WptID`: FixIdentifier
- `NavID`: RecommendedNavaid
- `NavBear`: Theta
- `NavDist`: RHO
- `Course`: MagCourse
- `Alt`: Alt1+ (at or above)

### Instructions

- From the fix identified by (`WptID`, `WptLat`, `WptLon`) *or*
  (`NavID`, `NavLat`, `NavLon`, `NavDist`, `NavBear`), fly `Course` until reaching `Alt`.
- If preceding fix was overfly, continue turn until intercept `Course`, then continue on `Course`.
- Earliest leg terminations is at point of intercept.

### Units

- `NavBear` and `Course` are in **degrees magnetic**.
- `NavDist` is in **nmi**. `NavDist` is geodesic.
- `Alt` is in **ft**, but doubles as an FMS constraint.

### Notes

The leg terminates upon reaching `Alt`.
This intercept point then becomes the origin fix of the succeeding leg.
This new origin is an implicit overfly.


## Track from Fix for Distance (FC)

### Example

LIED CAR6F SID (Cycle 2507, ID 11798)

### Minimum Required Fields

- `WptID`: FixIdentifier
- `IsFlyOver`: FlyOver
- `NavID`: RecommendedNavaid
- `NavBear`: Theta
- `NavDist`: RHO
- `Course`: MagCourse
- `Distance`: RouteDISTANCEHoldingTime (Path length)

### Instructions

- From the fix identified by (`WptID`, `WptLat`, `WptLon`) *or*
  (`NavID`, `NavLat`, `NavLon`, `NavDist`, `NavBear`), fly `Course` until reaching `Distance`.
- If preceding fix was overfly, continue turn until intercept `Course`, then continue on `Course`.
- Earliest leg terminations is at point of intercept.


### Units

- `NavBear` and `Course` are in **degrees magnetic**.
- `NavDist` and `Distance` are in **nmi**. `NavDist` and `Distance` are geodesic.
- `IsFlyOver`: Boolean indicating if fix is a mandatory fly over.

### Notes

The leg terminates upon reaching  `Distance`.
This intercept point then becomes the origin fix of the succeeding leg.


## Track from Fix to DME Distance (FD)

### Example

LGAV BIBE2T SID (Cycle 2507, ID 10659)

### Minimum Required Fields

- `WptID`: FixIdentifier
- `NavID`: RecommendedNavaid
- `NavBear`: Theta
- `NavDist`: RHO
- `Course`: MagCourse
- `Distance`: RouteDISTANCEHoldingTime (DME distance)

### Instructions

- From the fix identified by (`WptID`, `WptLat`, `WptLon`) *or*
  (`NavID`, `NavLat`, `NavLon`, `NavDist`, `NavBear`), fly `Course` until reaching `Distance` from
  navaid identified by `NavID`.
- If preceding fix was overfly, continue turn until intercept `Course`, then continue on `Course`.
- Earliest leg terminations is at point of intercept.

### Units

- `NavBear` and `Course` are in **degrees magnetic**.
- `NavDist` and `Distance` are in **nmi**. `NavDist` is geodesic, `Distance` is slant.

### Notes

The leg terminates upon reaching  `Distance`.
This intercept point then becomes the origin fix of the succeeding leg.
This new origin is an implicit overfly.


## Track from Fix to Manual Termination (FM)

### Example

LFPV PB2V SID (Cycle 2507, ID 10395)

### Minimum Required Fields

- `WptID`: FixIdentifier
- `NavID`: RecommendedNavaid
- `NavBear`: Theta
- `NavDist`: RHO
- `Course`: MagCourse

### Instructions

- From the fix identified by (`WptID`, `WptLat`, `WptLon`) *or*
  (`NavID`, `NavLat`, `NavLon`, `NavDist`, `NavBear`), fly `Course` indefinitely.

### Units

- `NavBear` and `Course` are in **degrees magnetic**.
- `NavDist` is in **nmi**. `NavDist` is geodesic.


## Holding mandatory (HA)

### Example

LOWG GRZ4X SID (Cycle 2507, ID 12765)

### Minimum Required Fields

- `WptID`: FixIdentifier
- `TurnDir`: TurnDirection
- `Course`: MagCourse
- `Distance`: RouteTIMEDistanceHoldingTime
- `Alt`: Alt1+ (at or above)

### Instructions

- At fix identified by (`WptID`, `WptLat`, `WptLon`), enter `TurnDir` direction holding pattern.
- `Course` shall be the inbound course of the holding.
- `Distance` shall be the holding leg distance *or* time
- `Alt` shall be the altitude at which the holding is exited

### Units

- `Course` is in **degrees magnetic**.
- `Distance` is in **nmi** *or* **min**. `Distance` is geodesic if in nmi.
- `Alt` is in **ft**, but doubles as an FMS constraint.

### Notes

As per the docs, there should be a field indicating whether `Distance` is distance or time.
I have not found the field or anything that alludes to such.
Conversely, as per the FAA, the altitude should be the exit point of the leg.
This goes against the textual description of the example.

My guess is that the holding is at all times executed at leat once, even if the entry to it is also
the exit altitude.
As for the missing time/distance decider field, assume it to be distance at all times.


## Holding in lieu of Procedure Turn (HF)

### Example

FAWB VDM29 APP (Cycle 2507, ID 67794)

### Minimum Required Fields

- `WptID`: FixIdentifier
- `TurnDir`: TurnDirection
- `Course`: MagCourse
- `Distance`: RouteTIMEDistanceHoldingTime

### Instructions

- At fix identified by (`WptID`, `WptLat`, `WptLon`), enter `TurnDir` direction holding pattern.
- `Course` shall be the inbound course of the holding.
- `Distance` shall be the holding leg distance *or* time
- Holding shall be exited after exactly one turn

### Units

- `Course` is in **degrees magnetic**.
- `Distance` is in **nmi** *or* **min**. `Distance` is geodesic if in nmi.

### Notes

As per the docs, there should be a field indicating whether `Distance` is distance or time.
I have not found the field or anything that alludes to such.

My guess is that `Distance` always is a distance. This would match with the example.

The Leg terminates after the hold is exited ath the hold entry fix.


## Holding mandatory (HM)

### Example

FAWB VDM29 APP (Cycle 2507, ID 67794), Missed approach procedure

### Minimum Required Fields

- `WptID`: FixIdentifier
- `TurnDir`: TurnDirection
- `Course`: MagCourse
- `Distance`: RouteTIMEDistanceHoldingTime

### Instructions

- At fix identified by (`WptID`, `WptLat`, `WptLon`), enter `TurnDir` direction holding pattern.
- `Course` shall be the inbound course of the holding.
- `Distance` shall be the holding leg distance *or* time
- Holding shall be indefinite

### Units

- `Course` is in **degrees magnetic**.
- `Distance` is in **nmi** *or* **min**. `Distance` is geodesic if in nmi.

### Notes

As per the docs, there should be a field indicating whether `Distance` is distance or time.
I have not found the field or anything that alludes to such.

My guess as for the missing time/distance decider field, assume it to be distance at all times.


## Initial Fix (IF)

### Example

FAWB VDM29 APP (Cycle 2507, ID 67794), Missed approach procedure

### Minimum Required Fields

- `WptID`: FixIdentifier

### Instructions

- Start of a STAR or APP

### Notes

Nothing to be done except parse restrictions.
Servers as the entry point of a STAR/APP procedure.


## Procedure Turn (PI)

### Example

FAUP VDM35 APP (Cycle 2507, ID 67790)

### Minimum Required Fields

- `WptID`: FixIdentifier
- `TurnDir`: TurnDirection
- `NavID`: RecommendedNavaid
- `NavBear`: Theta
- `NavDist`: RHO
- `Course`: MagCourse
- `Distance`: RouteTimeDISTANCEHoldingTime (excursion distance from fix)
- `Alt`: Alt1

### Instructions

- From the fix identified by (`WptID`, `WptLat`, `WptLon`) *or*
  (`NavID`, `NavLat`, `NavLon`, `NavDist`, `NavBear`), fly `Course` for `Distance`.
- Turn `TurnDir` until aligned with succeeding leg course.
- `Alt` shall be the altitude during the procedure.

### Units

- `NavBear`and `Course` are in **degrees magnetic**.
- `NavDist` and `Distance` are in **nmi**. `NavDist` and `Distance` are geodesic.
- `Alt` is in **ft**, but doubles as an FMS constraint.

### Notes

This needs to look into the succeeding leg in order to calculate the intercept point.
This intercept point then becomes the origin fix of the succeeding leg.


## Radius to Fix (RF)

### Example

LFRN GODA5R SID (cycle 2507, ID 10485)

### Minimum Required Fields

- `WptID`: FixIdentifier
- `TurnDir`: TurnDirection
- `NavBear`: Theta (inbound tangential track)
- `Course`: MagCourse
- `Distance`: RouteTimeDISTANCEHoldingTime (along track distance)
- `CenterID`: ArcCenter

### Instructions

- From preceding fix, fly a smooth arc to the fix identified by (`WptID`, `WptLat`, `WptLon`).
- Arc center shall be navaid identified by `CenterID`, `CenterLat`, `CenterLon`.
- Arc and turn shall be flown in direction specified by `TurnDir`.
- `Distance` shall be the track miles along the curved path

### Units

- `NavBear` and `Course` are in **degrees magnetic**.
- `Distance` is in **nmi**. `Distance` is geodesic (great-circle).

### Notes

While similar to an AF, the center point is coded differently.
No radius is specified, but can be inferred based on center point, both endpoints and arc length

Example has `NavBear` set to `null`, significance of the inbound tangential track is unknown.
Same for the `Course`, which is set, but lacks any documentation.


## Track to Fix (TF)

### Example

LFRN GODA5R SID (cycle 2507, ID 10485)

### Minimum Required Fields

- `WptID`: FixIdentifier
- `IsFlyOver`: Overfly

### Instructions

- From the preceding waypoint, fly direct to the waypoint identified by
  (`WptID`, `WptLat`, `WptLon`).

### Units

- `IsFlyOver`: Boolean indicating if fix is a mandatory fly over.


## Heading to Altitude (VA)

### Example

LFRK LGL4X SID (Cycle 2507, ID 10475)

### Minimum Required Fields

- `Course`: MagCourse (Heading)
- `Alt`: Alt1+ (at or above)

### Instructions

- From preceding fix, fly heading specified in `Course` until reaching `Alt`.
- **No wind corrections shall be applied**

### Units

- `Course` is in **degrees magnetic**.
- `Alt` is in **ft**, but doubles as an FMS constraint.

### Notes

The leg terminates upon reaching `Alt`.
This intercept point then becomes the origin fix of the succeeding leg.
This new origin is an implicit overfly.


## Heading to DME Distance (VD)

### Example

LFRK NEVI4Y SID (Cycle 2507, ID 10482)

### Minimum Required Fields

- `NavID`: RecommendedNavaid
- `Course`: MagCourse (Heading)
- `Distance`: RouteTimeDISTANCEHoldingTime (DME distance)

### Instructions

- From preceding fix, fly heading specified in `Course` until reaching `Distance` from the navaid
  identified by (`NavID`, `NavLat`, `NavLon`).
- **No wind corrections shall be applied**

### Units

- `Course` is in **degrees magnetic**.
- `Distance` is in **nmi**. `Distance` is slant **not** geodesic.

### Notes

The leg terminates upon reaching `Distance`.
This intercept point then becomes the origin fix of the succeeding leg.
This new origin is an implicit overfly.


## Heading to Intercept (VI)

### Example

LFRK LUSI4Y SID (Cycle 2507, ID 10480)

### Minimum Required Fields

- `Course`: MagCourse

### Instructions

- From preceding fix, fly heading specified in `Course` until interception of course of the
  succeeding leg.
- **No wind corrections shall be applied**

### Units

- `Course` is in **degrees magnetic**.

### Notes

This needs to look into the succeeding leg in order to calculate the intercept point.
This intercept point then becomes the origin fix of the succeeding leg.
This new origin can never be an overfly due to the intercept nature.


## Heading to Manual Termination (VM)

### Example

LFPV PB2P SID (Cycle 2507, ID 10394)

### Minimum Required Fields

- `Course`: MagCourse (Heading)

### Instructions

- From preceding fix, fly heading specified in `Course` indefinitely
- **No wind corrections shall be applied**

### Units

- `Course` is in **degrees magnetic**.


## Heading to Radial (VR)

### Example

LIMC MMP8G SID (Cycle 2507, ID 11909)

### Minimum Required Fields

- `NavID`: RecommendedNavaid
- `NavBear`: Theta
- `Course`: MagCourse

### Instructions

- From preceding fix, fly heading specified in `Course` until interception of 
  `NavBear` radial *from* the navaid identified by `NavID`.

### Units

- `NavBear` and `Course` are in **degrees magnetic**.

### Notes

The leg terminates at the intercept point.
This intercept point then becomes the origin fix of the succeeding leg.