New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@fboes/aerofly-patterns

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fboes/aerofly-patterns - npm Package Compare versions

Comparing version 1.3.1 to 2.0.0

dist/lib/Configuration.js

4

CHANGELOG.md
# Changelog
## 2.0.0
- Changed CLI parameters
## 1.3.1

@@ -4,0 +8,0 @@

18

data/Landing_Challenges-KEGE-c172/README.md

@@ -19,11 +19,11 @@ # Landing Challenges: Eagle County Regional (KEGE)

| :-: | ---------- | ---------: | ------------ | --------------- | ---------: | ------- | -------------------- |
| #1 | 2024-05-07 | 08:00 | 250° @ 11 kn | SCT @ 900 ft | 2 SM | 25 | ↗ To the north-east |
| #2 | 2024-05-06 | 09:00 | 240° @ 14 kn | FEW @ 2,800 ft | 15 SM | 25 | ↑ To the north |
| #3 | 2024-05-03 | 12:00 | 270° @ 20 kn | SCT @ 11,000 ft | 15 SM | 25 | ← To the west |
| #4 | 2024-05-02 | 13:00 | 290° @ 16 kn | CLR | 15 SM | 25 | → To the east |
| #5 | 2024-04-30 | 14:00 | 290° @ 11 kn | CLR | 15 SM | 25 | ↗ To the north-east |
| #6 | 2024-04-29 | 16:00 | 290° @ 13 kn | FEW @ 4,300 ft | 15 SM | 25 | ← To the west |
| #7 | 2024-04-29 | 17:00 | 90° @ 11 kn | FEW @ 7,500 ft | 15 SM | 07 (RP) | ↙ To the south-west |
| #8 | 2024-04-27 | 18:00 | 270° @ 6 kn | FEW @ 3,300 ft | 7 SM | 25 | ↙ To the south-west |
| #9 | 2024-04-26 | 20:00 | 260° @ 3 kn | SCT @ 8,000 ft | 15 SM | 25 | ↖ To the north-west |
| #1 | 2024-05-08 | 08:00 | 90° @ 3 kn | CLR | 15 SM | 07 (RP) | ↙ To the south-west |
| #2 | 2024-05-07 | 09:00 | 240° @ 16 kn | BKN @ 1,000 ft | 4 SM | 25 | ↘ To the south-east |
| #3 | 2024-05-05 | 10:00 | 270° @ 4 kn | CLR | 15 SM | 25 | ↑ To the north |
| #4 | 2024-05-03 | 13:00 | 250° @ 14 kn | BKN @ 11,000 ft | 15 SM | 25 | ↗ To the north-east |
| #5 | 2024-05-01 | 14:00 | 210° @ 9 kn | OVC @ 4,800 ft | 15 SM | 25 | ← To the west |
| #6 | 2024-04-30 | 16:00 | 280° @ 14 kn | CLR | 15 SM | 25 | ↖ To the north-west |
| #7 | 2024-04-30 | 17:00 | 240° @ 8 kn | BKN @ 12,000 ft | 15 SM | 25 | ← To the west |
| #8 | 2024-04-28 | 18:00 | 190° @ 5 kn | OVC @ 4,500 ft | 15 SM | 25 | ↙ To the south-west |
| #9 | 2024-04-27 | 20:00 | 0° @ 0 kn | FEW @ 2,500 ft | 15 SM | 07 (RP) | ↘ To the south-east |

@@ -30,0 +30,0 @@ ## Installation instructions

@@ -19,12 +19,12 @@ # Landing Challenges: Key West International (KEYW)

| :-: | ---------- | ---------: | ------------ | -------------- | ---------: | ------- | -------------------- |
| #1 | 2024-05-07 | 08:00 | 110° @ 12 kn | FEW @ 1,600 ft | 15 SM | 09 (RP) | ↖ To the north-west |
| #2 | 2024-05-06 | 09:00 | 110° @ 13 kn | BKN @ 2,300 ft | 15 SM | 09 (RP) | ↗ To the north-east |
| #3 | 2024-05-04 | 11:00 | 90° @ 14 kn | SCT @ 2,700 ft | 15 SM | 09 (RP) | ↙ To the south-west |
| #4 | 2024-05-03 | 12:00 | 100° @ 15 kn | CLR | 15 SM | 09 (RP) | ↓ To the south |
| #5 | 2024-05-02 | 13:00 | 100° @ 14 kn | CLR | 15 SM | 09 (RP) | ↓ To the south |
| #6 | 2024-04-30 | 15:00 | 140° @ 7 kn | FEW @ 2,100 ft | 15 SM | 09 (RP) | ↙ To the south-west |
| #7 | 2024-04-29 | 16:00 | 110° @ 13 kn | FEW @ 2,900 ft | 15 SM | 09 (RP) | ↖ To the north-west |
| #8 | 2024-04-28 | 17:00 | 90° @ 16 kn | FEW @ 2,600 ft | 15 SM | 09 (RP) | ↑ To the north |
| #9 | 2024-04-27 | 19:00 | 80° @ 13 kn | CLR | 15 SM | 09 (RP) | ↖ To the north-west |
| #10 | 2024-04-26 | 20:00 | 90° @ 7 kn | CLR | 15 SM | 09 (RP) | ↓ To the south |
| #1 | 2024-05-08 | 08:00 | 130° @ 8 kn | SCT @ 2,000 ft | 15 SM | 09 (RP) | ↓ To the south |
| #2 | 2024-05-07 | 09:00 | 0° @ null kn | FEW @ 2,300 ft | 15 SM | 09 (RP) | ↑ To the north |
| #3 | 2024-05-05 | 11:00 | 100° @ 17 kn | SCT @ 2,500 ft | 15 SM | 09 (RP) | ← To the west |
| #4 | 2024-05-04 | 12:00 | 100° @ 14 kn | FEW @ 3,700 ft | 15 SM | 09 (RP) | ↓ To the south |
| #5 | 2024-05-03 | 13:00 | 100° @ 14 kn | CLR | 15 SM | 09 (RP) | ↗ To the north-east |
| #6 | 2024-05-01 | 15:00 | 100° @ 9 kn | CLR | 15 SM | 09 (RP) | ↓ To the south |
| #7 | 2024-04-30 | 16:00 | 120° @ 8 kn | SCT @ 9,000 ft | 15 SM | 09 (RP) | ↖ To the north-west |
| #8 | 2024-04-29 | 17:00 | 110° @ 13 kn | FEW @ 2,700 ft | 15 SM | 09 (RP) | ↗ To the north-east |
| #9 | 2024-04-28 | 19:00 | 90° @ 21 kn | FEW @ 2,900 ft | 15 SM | 09 (RP) | ↑ To the north |
| #10 | 2024-04-27 | 20:00 | 80° @ 10 kn | CLR | 15 SM | 09 (RP) | ↖ To the north-west |

@@ -31,0 +31,0 @@ ## Installation instructions

@@ -5,16 +5,18 @@ #!/usr/bin/env node

import { AeroflyPatterns } from "./lib/AeroflyPatterns.js";
import { Configuration } from "./lib/Configuration.js";
if (process.argv.indexOf("--help") !== -1) {
const configuration = new Configuration(process.argv);
if (configuration.help) {
process.stdout
.write(`\x1b[94mUsage: npx @fboes/aerofly-patterns [ICAO_AIRPORT_CODE] [AEROFLY_AIRCRAFT_CODE] [RP_RUNWAY,..] [MINIMUM_SAFE_ALTITUDE] [FOLDER_MODE]\x1b[0m
.write(`\x1b[94mUsage: npx @fboes/aerofly-patterns ICAO_AIRPORT_CODE [AEROFLY_AIRCRAFT_CODE] [...options]\x1b[0m
Create landing pattern lessons for Aerofly FS 4.
Arguments:
\x1b[94m [ICAO_AIRPORT_CODE] \x1b[0mICAO airport code which needs to be available in Aerofly FS 4.
\x1b[94m [AEROFLY_AIRCRAFT_CODE] \x1b[0mInternal aircraft code in Aerofly FS 4.
\x1b[94m [RP_RUNWAY,..] \x1b[0mComma-separated list of runway names with right-turn pattern.
\x1b[94m [MINIMUM_SAFE_ALTITUDE] \x1b[0mMinimum altitude of aircraft, in 100ft. Will default to at least traffic pattern altitude.
\x1b[94m [FOLDER_MODE] \x1b[0mIf set to "1" will create files in a subdirectory instead of current directory.
\x1b[94m ICAO_AIRPORT_CODE \x1b[0mICAO airport code which needs to be available in Aerofly FS 4.
\x1b[94m AEROFLY_AIRCRAFT_CODE \x1b[0mInternal aircraft code in Aerofly FS 4.
If you need to skip a parameter, supply "-" and it will use the default value.
Options:
${Configuration.argumentList()}
`);

@@ -24,4 +26,4 @@ process.exit(0);

const app = new AeroflyPatterns(process.argv);
const app = new AeroflyPatterns(configuration);
await app.build(process.cwd());
console.log("✅ Done");

@@ -5,3 +5,3 @@ // @ts-check

import { AviationWeatherApi } from "./AviationWeatherApi.js";
import { CliOptions } from "./CliOptions.js";
import { Configuration } from "./Configuration.js";
import { FeatureCollection, Feature } from "@fboes/geojson";

@@ -35,9 +35,9 @@ import { Scenario } from "./Scenario.js";

*
* @param {string[]} argv
* @param {Configuration} configuration
*/
constructor(argv) {
constructor(configuration) {
/**
* @type {CliOptions}
* @type {Configuration}
*/
this.cliOptions = new CliOptions(argv);
this.configuration = configuration;

@@ -60,7 +60,7 @@ /**

async build(saveDirectory) {
const airport = await AviationWeatherApi.fetchAirports([this.cliOptions.icaoCode]);
const airport = await AviationWeatherApi.fetchAirports([this.configuration.icaoCode]);
if (!airport.length) {
throw new Error("No airport information from API");
}
this.airport = new Airport(airport[0], this.cliOptions.getRightPatternRunways);
this.airport = new Airport(airport[0], this.configuration.rightPatternRunways);

@@ -70,6 +70,6 @@ const navaids = await AviationWeatherApi.fetchNavaid(this.airport.position, 10000);

const dateYielder = new DateYielder(this.cliOptions.numberOfMissions, this.airport.lstOffset);
const dateYielder = new DateYielder(this.configuration.numberOfMissions, this.airport.lstOffset);
const dates = dateYielder.entries();
for (const date of dates) {
const scenario = new Scenario(this.airport, this.cliOptions, date);
const scenario = new Scenario(this.airport, this.configuration, date);
try {

@@ -269,5 +269,6 @@ await scenario.build();

let output = [`# Landing Challenges: ${this.airport.name} (${this.airport.id})`, ""];
let output = [`# Landing Challenges: ${this.airport.name} (${this.airport.id})`];
output.push(
"",
"This [`custom_missions_user.tmc`](./custom_missions_user.tmc) file contains random landing scenarios for Aerofly FS 4.",

@@ -284,6 +285,6 @@ "",

- Are there special noises abatement procedures in effect?`,
"",
);
output.push(
"",
"## Included missions",

@@ -318,5 +319,5 @@ "",

});
output.push("");
output.push(
"",
"## Installation instructions",

@@ -326,3 +327,2 @@ "",

`2. See [the installation instructions](https://fboes.github.io/aerofly-missions/docs/generic-installation.html) on how to import the missions into Aerofly FS 4.`,
"",
);

@@ -340,4 +340,4 @@

async writeCustomMissionFiles(saveDirectory) {
if (this.cliOptions.folderMode) {
saveDirectory = `${saveDirectory}/data/Landing_Challenges-${this.cliOptions.icaoCode}-${this.cliOptions.aircraft}`;
if (this.configuration.directoryMode) {
saveDirectory = `${saveDirectory}/data/Landing_Challenges-${this.configuration.icaoCode}-${this.configuration.aircraft}`;

@@ -351,3 +351,3 @@ await fs.mkdir(saveDirectory, { recursive: true });

fs.writeFile(
`${saveDirectory}/${this.cliOptions.icaoCode}-${this.cliOptions.aircraft}.geojson`,
`${saveDirectory}/${this.configuration.icaoCode}-${this.configuration.aircraft}.geojson`,
JSON.stringify(this.buildGeoJson(), null, 2),

@@ -354,0 +354,0 @@ ),

@@ -5,3 +5,3 @@ // @ts-check

import { Units } from "../data/Units.js";
import { CliOptions } from "./CliOptions.js";
import { Configuration } from "./Configuration.js";
import { AviationWeatherApi } from "./AviationWeatherApi.js";

@@ -21,8 +21,8 @@ import { Formatter } from "./Formatter.js";

* @param {import('./Airport.js').Airport} airport
* @param {CliOptions} cliOptions
* @param {Configuration} configuration
* @param {Date?} date
*/
constructor(airport, cliOptions, date = null) {
constructor(airport, configuration, date = null) {
this.airport = airport;
this.cliOptions = cliOptions;
this.configuration = configuration;

@@ -32,3 +32,6 @@ /**

*/
let mimimumSafeAltitude = Math.max((this.airport.position.elevation ?? 0) + 1500, cliOptions.mimimumSafeAltitude);
let mimimumSafeAltitude = Math.max(
(this.airport.position.elevation ?? 0) + 1500,
configuration.mimimumSafeAltitude,
);

@@ -38,3 +41,8 @@ /**

*/
this.aircraft = new ScenarioAircraft(airport, cliOptions.aircraft, cliOptions.initialDistance, mimimumSafeAltitude);
this.aircraft = new ScenarioAircraft(
airport,
configuration.aircraft,
configuration.initialDistance,
mimimumSafeAltitude,
);

@@ -41,0 +49,0 @@ /**

{
"name": "@fboes/aerofly-patterns",
"version": "1.3.1",
"version": "2.0.0",
"description": "Landegerät - Create landing pattern lessons for Aerofly FS 4.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -23,17 +23,30 @@ # Aerofly Landegerät

```bash
# npx @fboes/aerofly-patterns@latest [ICAO_AIRPORT_CODE] [AEROFLY_AIRCRAFT_CODE] [RP_RUNWAY,..]
npx @fboes/aerofly-patterns@latest KMVY c172 24,33
```
Usage: npx @fboes/aerofly-patterns ICAO_AIRPORT_CODE [AEROFLY_AIRCRAFT_CODE] [...options]
Create landing pattern lessons for Aerofly FS 4.
| Parameter | Description | Example | Default |
| ----------------------- | ------------------------------------------------------------------------------------------ | ------- | ------- |
| `ICAO_AIRPORT_CODE` | ICAO airport code which needs to be available in Aerofly FS 4 | `KMVY` | `KMVY` |
| `AEROFLY_AIRCRAFT_CODE` | Internal aircraft code in Aerofly FS 4 | `c172` | `c172` |
| `RP_RUNWAY` | Comma-separated list of runway names with right-turn pattern | `24,33` | |
| `MINIMUM_SAFE_ALTITUDE` | Minimum altitude of aircraft, in 100ft. Will default to at least traffic pattern altitude. | `125` | |
| `FOLDER_MODE` | If set to `1` will create files in a subdirectory instead of current directory. | `1` | |
Arguments:
ICAO_AIRPORT_CODE ICAO airport code which needs to be available in Aerofly FS 4.
AEROFLY_AIRCRAFT_CODE Internal aircraft code in Aerofly FS 4.
If you need to skip a parameter, supply `-` and it will use the default value.
Options:
--right-pattern=.., -r=.. Comma-separated list of runway names with right-turn pattern
Example value: 24,33
--min-altitude=.., -m=.. Minimum safe altitude of aircraft, in 100ft. At least airport elevation.
Default value: 0
Example value: 145
--missions=.. Number of missions in file.
Default value: 10
--distance=.. Initial distance from airport in Nautical Miles.
Default value: 8
--directory, -d Will create files in a subdirectory instead of current directory.
--help, -h Will output the help.
```
Example:
```bash
npx @fboes/aerofly-patterns@latest KMVY c172 --right-pattern 24,33
```
The complete list of available internal aircraft codes in Aerofly FS 4 is available in `…\Aerofly FS 4 Flight Simulator\aircraft`. Improved flight planning is available for aircraft listed in [`dist/data/AeroflyAircraft.js`](./dist/data/AeroflyAircraft.js). Examples of codes:

@@ -40,0 +53,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc