Fix CI into AF (DTMB ALTER SID into 07)

This commit is contained in:
Kilian Hofmann 2025-07-29 14:12:25 +02:00
parent 73373420d3
commit 048d5129aa
2 changed files with 8 additions and 3 deletions

View File

@ -40,7 +40,7 @@ LGAV 03L BIBE1K SID (Cycle 2507, ID 10653)
While similar to an RF, the center point is coded differently.
Calculate distance for FMS based on ` 2 * π NavDist * abs(NavBear - Course) 360`.
Calculate distance for FMS based on `2 * π * NavDist * abs(NavBear - Course) 360`.
## Course to Altitude (CA)

View File

@ -1,3 +1,4 @@
import computeDestinationPoint from 'geolib/es/computeDestinationPoint';
import getGreatCircleBearing from 'geolib/es/getGreatCircleBearing';
/**
@ -29,8 +30,12 @@ export const getCourseAndFixForIntercepts = (leg: TerminalEntry, origin: NavFix)
}
case 'AF': {
const _leg = leg as AFTerminalEntry;
const fix = { latitude: _leg.WptLat, longitude: _leg.WptLon };
return [_leg.Course.reciprocalCourse().toTrue(fix), fix];
const navAid = { latitude: _leg.NavLat, longitude: _leg.NavLon };
const fix = {
...computeDestinationPoint(navAid, _leg.NavDist.toMetre(), _leg.Course.toTrue(navAid)),
isIntersection: true,
};
return [_leg.Course.toTrue(fix), fix];
}
case 'DF': {
const _leg = leg as DFTerminalEntry;