Skip to content

Commit

Permalink
Improved handling of Garmin fpl files
Browse files Browse the repository at this point in the history
  • Loading branch information
fboes committed Aug 28, 2024
1 parent b9b1d95 commit 2a9c42a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions dist/Aerofly/Mission.js
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,7 @@ export class Mission {
<[string8][description][${Quote.tmc(this.description)}]>
<[string8] [flight_setting] [${Quote.tmc(this.flight_setting)}]>
<[string8u] [aircraft_name] [${Quote.tmc(this.aircraft_name)}]>
//<[string8u][aircraft_livery] []>
<[stringt8c] [aircraft_icao] [${Quote.tmc(this.aircraft_icao)}]>
<[stringt8c] [callsign] [${Quote.tmc(this.callsign)}]>
<[stringt8c] [origin_icao] [${Quote.tmc(this.origin_icao)}]>
Expand Down
2 changes: 1 addition & 1 deletion dist/Import/GarminFpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class GarminFpl {
this.cruisingAlt = undefined;
// Get waypoint definitions
const waypointDefinitions = new Map();
const waypointTableXml = this.getXmlNode(configFileContent, "waypoint-table");
const waypointTableXml = this.getXmlNode(configFileContent, "waypoint-table") || this.getXmlNode(configFileContent, "waypoints");
this.getXmlNodes(waypointTableXml, "waypoint").forEach((xml) => {
const elevation = this.getXmlNode(xml, "elevation");
waypointDefinitions.set(this.getXmlNode(xml, "identifier"), {
Expand Down
1 change: 1 addition & 0 deletions src/Aerofly/Mission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,7 @@ export class Mission {
<[string8][description][${Quote.tmc(this.description)}]>
<[string8] [flight_setting] [${Quote.tmc(this.flight_setting)}]>
<[string8u] [aircraft_name] [${Quote.tmc(this.aircraft_name)}]>
//<[string8u][aircraft_livery] []>
<[stringt8c] [aircraft_icao] [${Quote.tmc(this.aircraft_icao)}]>
<[stringt8c] [callsign] [${Quote.tmc(this.callsign)}]>
<[stringt8c] [origin_icao] [${Quote.tmc(this.origin_icao)}]>
Expand Down
2 changes: 1 addition & 1 deletion src/Import/GarminFpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class GarminFpl {

// Get waypoint definitions
const waypointDefinitions: Map<string, GaminFplWaypoint> = new Map();
const waypointTableXml = this.getXmlNode(configFileContent, "waypoint-table");
const waypointTableXml = this.getXmlNode(configFileContent, "waypoint-table") || this.getXmlNode(configFileContent, "waypoints");
this.getXmlNodes(waypointTableXml, "waypoint").forEach((xml) => {
const elevation = this.getXmlNode(xml, "elevation");
waypointDefinitions.set(this.getXmlNode(xml, "identifier"), {
Expand Down

0 comments on commit 2a9c42a

Please sign in to comment.