Skip to content

Commit

Permalink
Fix single waypoint SID imports again
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueberryKing committed Mar 10, 2024
1 parent 3677241 commit 5caf2b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ export class CoRouteUplinkAdapter {
instructions.push(
{ instruction: 'sidEnrouteTransition', ident: fix.ident.toString(), locationHint: { lat: parseFloat(fix.pos_lat.toString()), long: parseFloat(fix.pos_long.toString()) } },
);
} else if (fix.via_airway === 'DCT' || fix.via_airway === 'DCT*' || fix.via_airway.match(/^NAT[A-Z]$/) || i === 0) {
} else if (fix.via_airway === 'DCT' || fix.via_airway === 'DCT*' || fix.via_airway.match(/^NAT[A-Z]$/) || instructions.length === 0) {
if (fix.type === 'ltlg') {
// LAT/LONG Waypoint
instructions.push({ instruction: 'latlong', lat: parseFloat(fix.pos_lat.toString()), long: parseFloat(fix.pos_long.toString()) });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ export class SimBriefUplinkAdapter {
} else if (lastInstruction?.instruction === 'procedure' && lastInstruction.ident === fix.via_airway) {
// SID TRANS
instructions.push({ instruction: 'sidEnrouteTransition', ident: fix.ident, locationHint: { lat: parseFloat(fix.pos_lat), long: parseFloat(fix.pos_long) } });
} else if (fix.via_airway === 'DCT' || fix.via_airway === 'DCT*' || fix.via_airway.match(/^NAT[A-Z]$/) || i === 0) {
} else if (fix.via_airway === 'DCT' || fix.via_airway === 'DCT*' || fix.via_airway.match(/^NAT[A-Z]$/) || instructions.length === 0) {
// Last SID fix - if this is the very first fix in the route (to deal with procedures
// that only have an exit fix, which won't be caught when filtering)
if (fix.type === 'ltlg') {
Expand Down

0 comments on commit 5caf2b6

Please sign in to comment.