From 8c8c5461fc18069f40ee06428f3e4ba3e1771ded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Bo=C2=89=C2=89es?= Date: Fri, 29 Mar 2024 16:15:38 +0100 Subject: [PATCH] Changed links for airports, changed styling for waypoints --- dist/Aerofly/Mission.js | 8 ++++++++ dist/Export/GeoJson.js | 12 ++++++------ dist/Export/Markdown.js | 8 ++++---- dist/Web/Components.js | 4 ++-- src/Export/GeoJson.ts | 12 ++++++------ src/Export/Markdown.ts | 8 ++++---- src/Web/Components.ts | 4 ++-- 7 files changed, 32 insertions(+), 24 deletions(-) diff --git a/dist/Aerofly/Mission.js b/dist/Aerofly/Mission.js index d48600c..bcad985 100644 --- a/dist/Aerofly/Mission.js +++ b/dist/Aerofly/Mission.js @@ -378,7 +378,15 @@ export class Mission { cp.name.match(/^(RW)?\d\d[A-Z]?$/)) { cp.type = i === 1 ? MissionCheckpoint.TYPE_DEPARTURE_RUNWAY : MissionCheckpoint.TYPE_DESTINATION_RUNWAY; cp.name = cp.name.replace(/^(RW)/, ""); + /*if (cp.type === MissionCheckpoint.TYPE_DEPARTURE_RUNWAY) { + gpl.departureRunway = undefined; + } else { + gpl.destinationRunway = undefined; + }*/ } + //this.addCheckpointAfter(0, 0.5); + // if (gpl.departureRunway) { + // if (gpl.destinationRunway) { return cp; }); const flight_category = this.conditions.getFlightCategory(this.origin_country !== "US"); diff --git a/dist/Export/GeoJson.js b/dist/Export/GeoJson.js index 4f0a140..1513bfb 100644 --- a/dist/Export/GeoJson.js +++ b/dist/Export/GeoJson.js @@ -71,7 +71,7 @@ export class GeoJson { altitude: c.lon_lat.altitude_m, direction: c.direction, frequency: c.frequency_string, - "marker-symbol": this.getGeoJsonIcon(c, forExport), + "marker-symbol": this.getGeoJsonIcon(c), "marker-color": c.type === MissionCheckpoint.TYPE_ORIGIN || c.type === MissionCheckpoint.TYPE_DESTINATION ? "#5e6eba" : "#555555", @@ -253,19 +253,19 @@ export class GeoJson { getGeoJsonPosition(entry) { return entry.altitude_m ? [entry.lon, entry.lat, entry.altitude_m] : [entry.lon, entry.lat]; } - getGeoJsonIcon(cp, forExport = false) { + getGeoJsonIcon(cp) { switch (cp.type_extended) { case MissionCheckpoint.TYPE_ORIGIN: case MissionCheckpoint.TYPE_DESTINATION: return "airport"; case MissionCheckpoint.TYPE_VOR: - return forExport ? "square-stroked" : "dot-10"; + return "navaid-vor"; case MissionCheckpoint.TYPE_NDB: - return forExport ? "circle-stroked" : "dot-10"; + return "navaid-ndb"; case MissionCheckpoint.TYPE_FIX: - return forExport ? "triangle-stroked" : "dot-10"; + return "navaid-fix"; default: - return forExport ? "triangle" : "dot-10"; + return "navaid-waypoint"; } } } diff --git a/dist/Export/Markdown.js b/dist/Export/Markdown.js index de28948..57eb6e5 100644 --- a/dist/Export/Markdown.js +++ b/dist/Export/Markdown.js @@ -61,10 +61,10 @@ Check your [Sky Vector Flight Plan](${s.toString()}). You may also want to take ### Airports -| | Location | Country | Date & time | Local solar time | Sun | -| ----------- | ------------------------------------------ | ------- | ----------------- | ---------------- | --- | -| Departure | [${m.origin_icao}](https://skyvector.com/airport/${m.origin_icao}) | ${m.origin_country} | ${this.outputDateTime(m.conditions.time.dateTime)} | ${sunStateOrigin.localSolarTime} | ${this.outputSunState(sunStateOrigin)} | -| Destination | [${m.destination_icao}](https://skyvector.com/airport/${m.destination_icao}) | ${m.destination_country} | ${this.outputDateTime(time)} | ${sunStateDestination.localSolarTime} | ${this.outputSunState(sunStateDestination)} | +| | Location | Country | Date & time | Local solar time | Sun | +| ----------- | --------------------------------------------- | ------- | ----------------- | ---------------- | --- | +| Departure | [${m.origin_icao}](https://www.pilotnav.com/airport/${m.origin_icao}) | ${m.origin_country} | ${this.outputDateTime(m.conditions.time.dateTime)} | ${sunStateOrigin.localSolarTime} | ${this.outputSunState(sunStateOrigin)} | +| Destination | [${m.destination_icao}](https://www.pilotnav.com/airport/${m.destination_icao}) | ${m.destination_country} | ${this.outputDateTime(time)} | ${sunStateDestination.localSolarTime} | ${this.outputSunState(sunStateDestination)} | ### Checkpoints diff --git a/dist/Web/Components.js b/dist/Web/Components.js index 9904aa0..0d618f4 100644 --- a/dist/Web/Components.js +++ b/dist/Web/Components.js @@ -158,7 +158,7 @@ export class ComponentsAirports extends ComponentsOutputtable { let html = ""; html += this.outputLine([ "Departure", - `${Quote.html(m.origin_icao)}`, + `${Quote.html(m.origin_icao)}`, m.origin_country, this.outputDateTime(m.conditions.time.dateTime), sunStateOrigin.localSolarTime, @@ -166,7 +166,7 @@ export class ComponentsAirports extends ComponentsOutputtable { ]); html += this.outputLine([ "Destination", - `${Quote.html(m.destination_icao)}`, + `${Quote.html(m.destination_icao)}`, m.destination_country, this.outputDateTime(time), sunStateDestination.localSolarTime, diff --git a/src/Export/GeoJson.ts b/src/Export/GeoJson.ts index 8957c25..0c0e233 100644 --- a/src/Export/GeoJson.ts +++ b/src/Export/GeoJson.ts @@ -97,7 +97,7 @@ export class GeoJson implements GeoJSON.FeatureCollection { altitude: c.lon_lat.altitude_m, direction: c.direction, frequency: c.frequency_string, - "marker-symbol": this.getGeoJsonIcon(c, forExport), + "marker-symbol": this.getGeoJsonIcon(c), "marker-color": c.type === MissionCheckpoint.TYPE_ORIGIN || c.type === MissionCheckpoint.TYPE_DESTINATION ? "#5e6eba" @@ -302,19 +302,19 @@ export class GeoJson implements GeoJSON.FeatureCollection { return entry.altitude_m ? [entry.lon, entry.lat, entry.altitude_m] : [entry.lon, entry.lat]; } - protected getGeoJsonIcon(cp: MissionCheckpoint, forExport = false): string { + protected getGeoJsonIcon(cp: MissionCheckpoint): string { switch (cp.type_extended) { case MissionCheckpoint.TYPE_ORIGIN: case MissionCheckpoint.TYPE_DESTINATION: return "airport"; case MissionCheckpoint.TYPE_VOR: - return forExport ? "square-stroked" : "dot-10"; + return "navaid-vor"; case MissionCheckpoint.TYPE_NDB: - return forExport ? "circle-stroked" : "dot-10"; + return "navaid-ndb"; case MissionCheckpoint.TYPE_FIX: - return forExport ? "triangle-stroked" : "dot-10"; + return "navaid-fix"; default: - return forExport ? "triangle" : "dot-10"; + return "navaid-waypoint"; } } } diff --git a/src/Export/Markdown.ts b/src/Export/Markdown.ts index b372b22..135e109 100644 --- a/src/Export/Markdown.ts +++ b/src/Export/Markdown.ts @@ -80,14 +80,14 @@ Check your [Sky Vector Flight Plan](${s.toString()}). You may also want to take ### Airports -| | Location | Country | Date & time | Local solar time | Sun | -| ----------- | ------------------------------------------ | ------- | ----------------- | ---------------- | --- | -| Departure | [${m.origin_icao}](https://skyvector.com/airport/${m.origin_icao}) | ${ +| | Location | Country | Date & time | Local solar time | Sun | +| ----------- | --------------------------------------------- | ------- | ----------------- | ---------------- | --- | +| Departure | [${m.origin_icao}](https://www.pilotnav.com/airport/${m.origin_icao}) | ${ m.origin_country } | ${this.outputDateTime(m.conditions.time.dateTime)} | ${ sunStateOrigin.localSolarTime } | ${this.outputSunState(sunStateOrigin)} | -| Destination | [${m.destination_icao}](https://skyvector.com/airport/${m.destination_icao}) | ${ +| Destination | [${m.destination_icao}](https://www.pilotnav.com/airport/${m.destination_icao}) | ${ m.destination_country } | ${this.outputDateTime(time)} | ${sunStateDestination.localSolarTime} | ${this.outputSunState( sunStateDestination diff --git a/src/Web/Components.ts b/src/Web/Components.ts index 46e946c..06f8bed 100644 --- a/src/Web/Components.ts +++ b/src/Web/Components.ts @@ -197,7 +197,7 @@ export class ComponentsAirports extends ComponentsOutputtable { html += this.outputLine([ "Departure", - `${Quote.html( + `${Quote.html( m.origin_icao )}`, m.origin_country, @@ -207,7 +207,7 @@ export class ComponentsAirports extends ComponentsOutputtable { ]); html += this.outputLine([ "Destination", - `${Quote.html(m.destination_icao)}`, m.destination_country,