@fboes/aerofly-patterns
Advanced tools
Comparing version 2.1.0 to 2.1.1
# Changelog | ||
## 2.1.1 | ||
- Added randomized heading for aircraft | ||
## 2.1.0 | ||
@@ -4,0 +8,0 @@ |
@@ -19,12 +19,12 @@ # Landing Challenges: Vineyard Haven / Martha's Vineyard (KMVY) | ||
| :-: | ---------- | ---------: | ------------ | -------------- | ---------: | ------- | -------------------- | | ||
| #1 | 2024-05-10 | 07:00 | 60° @ 10 kn | FEW @ 1,800 ft | 8 SM | 06 | ↙ To the south-west | | ||
| #2 | 2024-05-09 | 09:00 | 320° @ 14 kn | FEW @ 2,300 ft | 15 SM | 33 (RP) | ↖ To the north-west | | ||
| #3 | 2024-05-07 | 10:00 | 60° @ 12 kn | CLR | 15 SM | 06 | → To the east | | ||
| #4 | 2024-05-06 | 11:00 | 200° @ 10 kn | OVC @ 500 ft | 7 SM | 24 (RP) | ↙ To the south-west | | ||
| #5 | 2024-05-05 | 13:00 | 160° @ 8 kn | OVC @ 600 ft | 9 SM | 15 | ← To the west | | ||
| #6 | 2024-05-03 | 14:00 | 40° @ 13 kn | SCT @ 2,000 ft | 15 SM | 06 | ↓ To the south | | ||
| #7 | 2024-05-02 | 15:00 | 220° @ 10 kn | OVC @ 500 ft | 15 SM | 24 (RP) | ← To the west | | ||
| #8 | 2024-05-01 | 17:00 | 60° @ 9 kn | CLR | 15 SM | 06 | ↓ To the south | | ||
| #9 | 2024-04-29 | 18:00 | 130° @ 5 kn | CLR | 15 SM | 24 (RP) | ↑ To the north | | ||
| #10 | 2024-04-29 | 19:00 | 230° @ 7 kn | SCT @ 500 ft | 15 SM | 24 (RP) | → To the east | | ||
| #1 | 2024-05-17 | 07:00 | 0° @ 11 kn | OVC @ 500 ft | 3 SM | 06 | ← To the west | | ||
| #2 | 2024-05-16 | 09:00 | 80° @ 15 kn | OVC @ 500 ft | 9 SM | 06 | ↗ To the north-east | | ||
| #3 | 2024-05-14 | 10:00 | 210° @ 13 kn | OVC @ 9,000 ft | 15 SM | 24 (RP) | ↑ To the north | | ||
| #4 | 2024-05-13 | 11:00 | 210° @ 11 kn | FEW @ 4,700 ft | 15 SM | 24 (RP) | ↘ To the south-east | | ||
| #5 | 2024-05-12 | 13:00 | 250° @ 9 kn | BKN @ 2,900 ft | 15 SM | 24 (RP) | ↙ To the south-west | | ||
| #6 | 2024-05-10 | 14:00 | 40° @ 18 kn | CLR | 15 SM | 06 | ↖ To the north-west | | ||
| #7 | 2024-05-09 | 15:00 | 70° @ 8 kn | CLR | 15 SM | 06 | ↗ To the north-east | | ||
| #8 | 2024-05-08 | 17:00 | 220° @ 7 kn | OVC @ 800 ft | 15 SM | 24 (RP) | ↑ To the north | | ||
| #9 | 2024-05-06 | 18:00 | 210° @ 6 kn | OVC @ 200 ft | 1 SM | 24 (RP) | ↖ To the north-west | | ||
| #10 | 2024-05-06 | 19:00 | 150° @ 10 kn | OVC @ 300 ft | 3 SM | 15 | ↙ To the south-west | | ||
@@ -31,0 +31,0 @@ ## Installation instructions |
@@ -185,3 +185,3 @@ // @ts-check | ||
<[tmvector2d][origin_lon_lat] [${s.aircraft.position.longitude} ${s.aircraft.position.latitude}]> | ||
<[float64] [origin_dir] [${Degree(s.aircraft.bearingFromAirport + 180)}]> | ||
<[float64] [origin_dir] [${s.aircraft.heading}]> | ||
<[float64] [origin_alt] [${s.aircraft.position.elevation}]> | ||
@@ -188,0 +188,0 @@ <[stringt8c] [destination_icao] [${s.airport.id}]> |
@@ -42,2 +42,12 @@ // @ts-check | ||
}, | ||
"pattern-distance": { | ||
type: "string", | ||
default: "1", | ||
description: "Pattern distance from airport runway in Nautical Miles.", | ||
}, | ||
"rnd-heading": { | ||
type: "string", | ||
default: "0", | ||
description: "Randomized aircraft heading deviation from direct heading to airport in degree.", | ||
}, | ||
"prefer-rwy": { | ||
@@ -104,2 +114,27 @@ type: "string", | ||
/** | ||
* @type {number} in feet | ||
*/ | ||
this.minimumSafeAltitude = Number(values["min-altitude"]) * 100; | ||
/** | ||
* @type {number} | ||
*/ | ||
this.numberOfMissions = Number(values["missions"]); | ||
/** | ||
* @type {number} in Nautical Miles | ||
*/ | ||
this.initialDistance = Number(values["distance"]); | ||
/** | ||
* @type {number} in Nautical Miles | ||
*/ | ||
this.patternDistance = Number(values["pattern-distance"]); | ||
/** | ||
* @type {number} Randomized aircraft heading deviation from direct heading to airport in degree. | ||
*/ | ||
this.randomHeadingRange = Number(values["rnd-heading"]); | ||
/** | ||
* @type {string[]} runway IDs which will be prefrerred if wind is indecisive | ||
@@ -112,7 +147,2 @@ */ | ||
/** | ||
* @type {number} in feet | ||
*/ | ||
this.minimumSafeAltitude = Number(values["min-altitude"]) * 100; | ||
/** | ||
* @type {boolean} if files should be created in subfolder | ||
@@ -136,12 +166,2 @@ */ | ||
this.help = Boolean(values["help"]); | ||
/** | ||
* @type {number} | ||
*/ | ||
this.numberOfMissions = Number(values["missions"]); | ||
/** | ||
* @type {number} in Nautical Miles | ||
*/ | ||
this.initialDistance = Number(values["distance"]); | ||
} | ||
@@ -148,0 +168,0 @@ |
@@ -48,2 +48,3 @@ // @ts-check | ||
minimumSafeAltitude, | ||
configuration.randomHeadingRange, | ||
); | ||
@@ -123,5 +124,5 @@ | ||
const exitDistance = 1 * Units.meterPerNauticalMile; | ||
const downwindDistance = 1 * Units.meterPerNauticalMile; | ||
const finalDistance = 1 * Units.meterPerNauticalMile; | ||
const exitDistance = this.configuration.patternDistance * Units.meterPerNauticalMile; | ||
const downwindDistance = this.configuration.patternDistance * Units.meterPerNauticalMile; | ||
const finalDistance = this.configuration.patternDistance * Units.meterPerNauticalMile; | ||
@@ -157,2 +158,6 @@ if (this.weather?.windDirection) { | ||
{ | ||
id: this.activeRunway.id + "-ENTRY", | ||
position: this.airport.position.getPointBy(new Vector(downwindDistance, patternOrientation)), | ||
}, | ||
{ | ||
id: this.activeRunway.id + "-BASE", | ||
@@ -293,4 +298,5 @@ position: activeRunwayEntry.getPointBy(new Vector(downwindDistance, patternOrientation)), | ||
* @param {number} minimumSafeAltitude in ft | ||
* @param {number} randomHeadingRange in degree | ||
*/ | ||
constructor(airport, aircraftCode, distanceFromAirport, minimumSafeAltitude) { | ||
constructor(airport, aircraftCode, distanceFromAirport, minimumSafeAltitude, randomHeadingRange = 0) { | ||
/** | ||
@@ -314,2 +320,9 @@ * @type {number} true bearing. 0..360 | ||
/** | ||
* @type {number} Heading of aircraft. Can be randomized | ||
*/ | ||
this.heading = Degree( | ||
this.bearingFromAirport + 180 + (randomHeadingRange ? (Math.random() * 2 - 1) * randomHeadingRange : 0), | ||
); | ||
this.id = "current"; | ||
@@ -316,0 +329,0 @@ |
{ | ||
"name": "@fboes/aerofly-patterns", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Landegerät - Create landing pattern lessons for Aerofly FS 4.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -42,2 +42,6 @@ # Aerofly Landegerät | ||
Default value: 8 | ||
--pattern-distance=.. Pattern distance from airport runway in Nautical Miles. | ||
Default value: 1 | ||
--rnd-heading=.. Randomized aircraft heading deviation from direct heading to airport in degree. | ||
Default value: 0 | ||
--prefer-rwy=.. Comma-separated list of runway names which are preferred if wind is indecisive. | ||
@@ -44,0 +48,0 @@ Example value: 24,33 |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
769117
2129
105