@fboes/aerofly-custom-missions 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/.eslintrc.json +24 -0
  2. package/CHANGELOG.md +4 -0
  3. package/dist/dto/AeroflyConfigFileSet.js +43 -0
  4. package/dist/dto/AeroflyLocalizedText.js +40 -0
  5. package/dist/dto/AeroflyMission.js +171 -0
  6. package/dist/dto/AeroflyMissionCheckpoint.js +121 -0
  7. package/dist/dto/AeroflyMissionConditions.js +122 -0
  8. package/dist/dto/AeroflyMissionConditionsCloud.js +80 -0
  9. package/dist/dto/AeroflyMissionTargetPlane.js +30 -0
  10. package/dist/dto/AeroflyMissionsList.js +28 -0
  11. package/dist/index.js +7 -634
  12. package/dist/index.test.js +12 -5
  13. package/package.json +9 -10
  14. package/src/dto/AeroflyConfigFileSet.ts +35 -0
  15. package/src/dto/AeroflyLocalizedText.ts +69 -0
  16. package/src/dto/AeroflyMission.ts +377 -0
  17. package/src/dto/AeroflyMissionCheckpoint.ts +235 -0
  18. package/src/dto/AeroflyMissionConditions.ts +196 -0
  19. package/src/dto/AeroflyMissionConditionsCloud.ts +100 -0
  20. package/src/dto/AeroflyMissionTargetPlane.ts +56 -0
  21. package/src/dto/AeroflyMissionsList.ts +36 -0
  22. package/src/index.test.ts +8 -10
  23. package/src/index.ts +7 -1099
  24. package/types/AeroflyMissionCheckpoint.d.ts +140 -0
  25. package/types/AeroflyMissionTargetPlane.d.ts +40 -0
  26. package/types/dto/AeroflyConfigFileSet.d.ts +10 -0
  27. package/types/dto/AeroflyConfigFileSet.d.ts.map +1 -0
  28. package/types/dto/AeroflyLocalizedText.d.ts +54 -0
  29. package/types/dto/AeroflyLocalizedText.d.ts.map +1 -0
  30. package/types/dto/AeroflyMission.d.ts +208 -0
  31. package/types/dto/AeroflyMission.d.ts.map +1 -0
  32. package/types/dto/AeroflyMissionCheckpoint.d.ts +152 -0
  33. package/types/dto/AeroflyMissionCheckpoint.d.ts.map +1 -0
  34. package/types/dto/AeroflyMissionConditions.d.ts +116 -0
  35. package/types/dto/AeroflyMissionConditions.d.ts.map +1 -0
  36. package/types/dto/AeroflyMissionConditionsCloud.d.ts +51 -0
  37. package/types/dto/AeroflyMissionConditionsCloud.d.ts.map +1 -0
  38. package/types/dto/AeroflyMissionTargetPlane.d.ts +40 -0
  39. package/types/dto/AeroflyMissionTargetPlane.d.ts.map +1 -0
  40. package/types/dto/AeroflyMissionsList.d.ts +24 -0
  41. package/types/dto/AeroflyMissionsList.d.ts.map +1 -0
  42. package/types/dto/basicTypes.d.ts +1 -0
  43. package/types/index.d.ts +8 -586
  44. package/types/index.d.ts.map +1 -1
  45. package/types/index.test.d.ts +1 -1
  46. package/eslint.config.js +0 -29
@@ -0,0 +1,140 @@
1
+ /**
2
+ * @class
3
+ * A single way point for the given flight plan
4
+ *
5
+ * The purpose of this class is to collect data needed for Aerofly FS4's
6
+ * `custom_missions_user.tmc` flight plan file format, and export the structure
7
+ * for this file via the `toString()` method.
8
+ */
9
+ export declare class AeroflyMissionCheckpoint {
10
+ /**
11
+ * @property {"origin"|"departure_runway"|"departure"|"waypoint"|"arrival"|"approach"|"destination_runway"|"destination"} type of checkpoint, like "departure_runway"
12
+ */
13
+ type: AeroflyMissionCheckpointType;
14
+ /**
15
+ * @property {string} name ICAO code for airport, runway designator, navaid
16
+ * designator, fix name, or custom name
17
+ */
18
+ name: string;
19
+ /**
20
+ * @property {number} longitude easting, using the World Geodetic
21
+ * System 1984 (WGS 84) [WGS84] datum, with longitude and latitude units
22
+ * of decimal degrees; -180..180
23
+ */
24
+ longitude: number;
25
+ /**
26
+ * @property {number} latitude northing, using the World Geodetic
27
+ * System 1984 (WGS 84) [WGS84] datum, with longitude and latitude units
28
+ * of decimal degrees; -90..90
29
+ */
30
+ latitude: number;
31
+ /**
32
+ * @property {number} altitude The height in meters above or below the WGS
33
+ * 84 reference ellipsoid
34
+ */
35
+ altitude: number;
36
+ /**
37
+ * @property {?boolean} altitudeConstraint The altitude given in `altitude`
38
+ * will be interpreted as mandatory flight plan altitude instead of
39
+ * suggestion.
40
+ */
41
+ altitudeConstraint: boolean | null;
42
+ /**
43
+ * @property {?number} direction of runway, in degree
44
+ */
45
+ direction: number | null;
46
+ /**
47
+ * @property {?number} slope of runway
48
+ */
49
+ slope: number | null;
50
+ /**
51
+ * @property {?number} length of runway, in meters
52
+ */
53
+ length: number | null;
54
+ /**
55
+ * @property {?number} frequency of runways or navigational aids, in Hz; multiply by 1000 for kHz, 1_000_000 for MHz
56
+ */
57
+ frequency: number | null;
58
+ /**
59
+ * @property {?boolean} flyOver if waypoint is meant to be flown over
60
+ */
61
+ flyOver: boolean | null;
62
+ /**
63
+ * @param {string} name ICAO code for airport, runway designator, navaid
64
+ * designator, fix name, or custom name
65
+ * @param {"origin"|"departure_runway"|"departure"|"waypoint"|"arrival"|"approach"|"destination_runway"|"destination"} type Type of checkpoint, like "departure_runway"
66
+ * @param {number} longitude easting, using the World Geodetic
67
+ * System 1984 (WGS 84) [WGS84] datum, with longitude and latitude units
68
+ * of decimal degrees; -180..180
69
+ * @param {number} latitude northing, using the World Geodetic
70
+ * System 1984 (WGS 84) [WGS84] datum, with longitude and latitude units
71
+ * of decimal degrees; -90..90
72
+ * @param {object} additionalAttributes allows to set additional attributes on creation
73
+ * @param {number} [additionalAttributes.altitude] The height in meters above or below the WGS
74
+ * 84 reference ellipsoid
75
+ * @param {?number} [additionalAttributes.altitude_feet] The height in feet above or below the WGS
76
+ * 84 reference ellipsoid. Will overwrite altitude
77
+ * @param {number} [additionalAttributes.altitudeConstraint] The altitude given in `altitude`
78
+ * will be interpreted as mandatory flight plan altitude instead of
79
+ * suggestion.
80
+ * @param {boolean} [additionalAttributes.direction] of runway, in degree
81
+ * @param {?number} [additionalAttributes.slope] of runway
82
+ * @param {?number} [additionalAttributes.length] of runway, in meters
83
+ * @param {?number} [additionalAttributes.length_feet] of runway, in feet. Will overwrite length
84
+ * @param {?number} [additionalAttributes.frequency] of runways or navigational aids, in Hz; multiply by 1000 for kHz, 1_000_000 for MHz
85
+ * @param {?boolean} [additionalAttributes.flyOver] if waypoint is meant to be flown over
86
+ */
87
+ constructor(
88
+ name: string,
89
+ type: AeroflyMissionCheckpointType,
90
+ longitude: number,
91
+ latitude: number,
92
+ {
93
+ altitude,
94
+ altitude_feet,
95
+ altitudeConstraint,
96
+ direction,
97
+ slope,
98
+ length,
99
+ length_feet,
100
+ frequency,
101
+ flyOver,
102
+ }?: {
103
+ altitude?: number;
104
+ altitude_feet?: number | null;
105
+ altitudeConstraint?: boolean | null;
106
+ direction?: number | null;
107
+ slope?: number | null;
108
+ length?: number | null;
109
+ length_feet?: number | null;
110
+ frequency?: number | null;
111
+ flyOver?: boolean | null;
112
+ },
113
+ );
114
+ /**
115
+ * @param {number} altitude_feet
116
+ */
117
+ set altitude_feet(altitude_feet: number);
118
+ /**
119
+ * @returns {number} altitude_feet
120
+ */
121
+ get altitude_feet(): number;
122
+ /**
123
+ * @param {number} length_feet
124
+ */
125
+ set length_feet(length_feet: number);
126
+ /**
127
+ * @returns {number} length_feet
128
+ */
129
+ get length_feet(): number;
130
+ /**
131
+ * @returns {string}
132
+ */
133
+ get frequency_string(): string;
134
+ /**
135
+ * @param {number} index if used in an array will se the array index
136
+ * @returns {string} to use in Aerofly FS4's `custom_missions_user.tmc`
137
+ */
138
+ toString(index?: number): string;
139
+ }
140
+ //# sourceMappingURL=AeroflyMissionCheckpoint.d.ts.map
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @class
3
+ * A target plane which the aircraft needs to cross.
4
+ */
5
+ export declare class AeroflyMissionTargetPlane {
6
+ /**
7
+ * @property {number} longitude easting, using the World Geodetic
8
+ * System 1984 (WGS 84) [WGS84] datum, with longitude and latitude units
9
+ * of decimal degrees; -180..180
10
+ */
11
+ longitude: number;
12
+ /**
13
+ * @property {number} latitude northing, using the World Geodetic
14
+ * System 1984 (WGS 84) [WGS84] datum, with longitude and latitude units
15
+ * of decimal degrees; -90..90
16
+ */
17
+ latitude: number;
18
+ /**
19
+ * @property {number} dir in degree
20
+ */
21
+ dir: number;
22
+ /**
23
+ * @property {string} name of property
24
+ */
25
+ name: string;
26
+ /**
27
+ *
28
+ * @param {number} longitude easting, using the World Geodetic
29
+ * System 1984 (WGS 84) [WGS84] datum, with longitude and latitude units
30
+ * of decimal degrees; -180..180
31
+ * @param {number}latitude northing, using the World Geodetic
32
+ * System 1984 (WGS 84) [WGS84] datum, with longitude and latitude units
33
+ * of decimal degrees; -90..90
34
+ * @param {number} dir in degree
35
+ * @param {string} name of property
36
+ */
37
+ constructor(longitude: number, latitude: number, dir: number, name?: string);
38
+ toString(): string;
39
+ }
40
+ //# sourceMappingURL=AeroflyMissionTargetPlane.d.ts.map
@@ -0,0 +1,10 @@
1
+ export declare class AeroflyConfigFileSet {
2
+ #private;
3
+ elements: string[];
4
+ constructor(indent: number, type: string, name: string, value?: string);
5
+ get indent(): string;
6
+ push(type: string, name: string, value: string | number | string[] | number[] | boolean, comment?: string): this;
7
+ pushRaw(s: string): this;
8
+ toString(): string;
9
+ }
10
+ //# sourceMappingURL=AeroflyConfigFileSet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AeroflyConfigFileSet.d.ts","sourceRoot":"","sources":["../../src/dto/AeroflyConfigFileSet.ts"],"names":[],"mappings":"AAAA,qBAAa,oBAAoB;;IAE7B,QAAQ,EAAE,MAAM,EAAE,CAAC;gBAEP,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,GAAE,MAAW;IAK1E,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,OAAO,EAAE,OAAO,GAAE,MAAW;IAa7G,OAAO,CAAC,CAAC,EAAE,MAAM;IAKjB,QAAQ;CAGX"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * @class
3
+ * A translation for the mission title and description.
4
+ */
5
+ export declare class AeroflyLocalizedText {
6
+ /**
7
+ * @property {string} language ISO 639-1 like
8
+ * - br
9
+ * - cn
10
+ * - de
11
+ * - es
12
+ * - fr
13
+ * - id
14
+ * - it
15
+ * - jp
16
+ * - kr
17
+ * - pl
18
+ * - sv
19
+ * - tr
20
+ */
21
+ language: string;
22
+ /**
23
+ * @property {string} title of this flight plan
24
+ */
25
+ title: string;
26
+ /**
27
+ * @property {string} description text, mission briefing, etc
28
+ */
29
+ description: string;
30
+ /**
31
+ * @param {string} language ISO 639-1 like
32
+ * - br
33
+ * - cn
34
+ * - de
35
+ * - es
36
+ * - fr
37
+ * - id
38
+ * - it
39
+ * - jp
40
+ * - kr
41
+ * - pl
42
+ * - sv
43
+ * - tr
44
+ * @param {string} title of this flight plan
45
+ * @param {string} description text, mission briefing, etc
46
+ */
47
+ constructor(language: string, title: string, description: string);
48
+ /**
49
+ * @param {number} index if used in an array will se the array index
50
+ * @returns {string} to use in Aerofly FS4's `custom_missions_user.tmc`
51
+ */
52
+ toString(index?: number): string;
53
+ }
54
+ //# sourceMappingURL=AeroflyLocalizedText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AeroflyLocalizedText.d.ts","sourceRoot":"","sources":["../../src/dto/AeroflyLocalizedText.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,qBAAa,oBAAoB;IAC7B;;;;;;;;;;;;;;OAcG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;;;;;;;;;;;;OAgBG;gBACS,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;IAMhE;;;OAGG;IACH,QAAQ,CAAC,KAAK,GAAE,MAAU,GAAG,MAAM;CAOtC"}
@@ -0,0 +1,208 @@
1
+ import { AeroflyLocalizedText } from "./AeroflyLocalizedText.js";
2
+ import { AeroflyMissionCheckpoint } from "./AeroflyMissionCheckpoint.js";
3
+ import { AeroflyMissionConditions } from "./AeroflyMissionConditions.js";
4
+ import { AeroflyMissionTargetPlane } from "./AeroflyMissionTargetPlane.js";
5
+ export declare const feetPerMeter = 3.28084;
6
+ export declare const meterPerStatuteMile = 1609.344;
7
+ /**
8
+ * Data for the aircraft to use on this mission
9
+ * @property name lowercase Aerofly aircraft ID
10
+ * @property icao ICAO aircraft code
11
+ * @property livery (not used yet)
12
+ */
13
+ export type AeroflyMissionAircraft = {
14
+ name: string;
15
+ icao: string;
16
+ livery: string;
17
+ };
18
+ /**
19
+ * State of aircraft systems. Configures power settings, flap positions etc
20
+ */
21
+ export type AeroflyMissionSetting =
22
+ | "cold_and_dark"
23
+ | "before_start"
24
+ | "taxi"
25
+ | "takeoff"
26
+ | "cruise"
27
+ | "approach"
28
+ | "landing"
29
+ | "winch_launch"
30
+ | "aerotow"
31
+ | "pushback";
32
+ /**
33
+ * Represents origin or destination conditions for flight
34
+ * @property icao uppercase ICAO airport ID
35
+ * @property longitude easting, using the World Geodetic
36
+ * System 1984 (WGS 84) [WGS84] datum, with longitude and latitude units
37
+ * of decimal degrees; -180..180
38
+ * @property latitude northing, using the World Geodetic
39
+ * System 1984 (WGS 84) [WGS84] datum, with longitude and latitude units
40
+ * of decimal degrees; -90..90
41
+ * @property dir in degree
42
+ * @property alt the height in meters above or below the WGS
43
+ * 84 reference ellipsoid
44
+ */
45
+ export type AeroflyMissionPosition = {
46
+ icao: string;
47
+ longitude: number;
48
+ latitude: number;
49
+ dir: number;
50
+ alt: number;
51
+ };
52
+ /**
53
+ * @class
54
+ * A single flighplan, containing aircraft and weather data as well.
55
+ *
56
+ * The purpose of this class is to collect data needed for Aerofly FS4's
57
+ * `custom_missions_user.tmc` flight plan file format, and export the structure
58
+ * for this file via the `toString()` method.
59
+ */
60
+ export declare class AeroflyMission {
61
+ /**
62
+ * @property {?string} tutorialName will create a link to a tutorial page at https://www.aerofly.com/aircraft-tutorials/
63
+ */
64
+ tutorialName: string | null;
65
+ /**
66
+ * @property {string} title of this flight plan
67
+ */
68
+ title: string;
69
+ /**
70
+ * @property {string} description text, mission briefing, etc
71
+ */
72
+ description: string;
73
+ /**
74
+ * @property {AeroflyLocalizedText[]} localizedTexts for title and description
75
+ */
76
+ localizedTexts: AeroflyLocalizedText[];
77
+ /**
78
+ * @property {string[]} tags
79
+ */
80
+ tags: string[];
81
+ /**
82
+ * @property {?boolean} isFeatured makes this mission pop up in "Challenges"
83
+ */
84
+ isFeatured: boolean | null;
85
+ /**
86
+ * @property {?number} difficulty values between 0.00 and 2.00 have been encountered, but they seem to be without limit
87
+ */
88
+ difficulty: number | null;
89
+ /**
90
+ * @property {"cold_and_dark"|"before_start"|"taxi"|"takeoff"|"cruise"|"approach"|"landing"|"winch_launch"|"aerotow"|"pushback"} flightSetting of aircraft, like "taxi", "cruise"
91
+ */
92
+ flightSetting: AeroflyMissionSetting;
93
+ /**
94
+ * @property {object} aircraft for this mission
95
+ */
96
+ aircraft: AeroflyMissionAircraft;
97
+ /**
98
+ * @property {string} callsign of aircraft, uppercased
99
+ */
100
+ callsign: string;
101
+ /**
102
+ * @property {object} origin position of aircraft, as well as name of starting airport. Position does not have match airport.
103
+ */
104
+ origin: AeroflyMissionPosition;
105
+ /**
106
+ * @property {object} destination position of aircraft, as well as name of destination airport. Position does not have match airport.
107
+ */
108
+ destination: AeroflyMissionPosition;
109
+ /**
110
+ * @property {?number} distance in meters
111
+ */
112
+ distance: number | null;
113
+ /**
114
+ * @property {?number} duration in seconds
115
+ */
116
+ duration: number | null;
117
+ /**
118
+ * @property {?boolean} isScheduled marks this flight as "Scheduled flight".
119
+ */
120
+ isScheduled: boolean | null;
121
+ /**
122
+ * @property {?AeroflyMissionTargetPlane} finish as finish condition
123
+ */
124
+ finish: AeroflyMissionTargetPlane | null;
125
+ /**
126
+ * @property {AeroflyMissionConditions} conditions like time and weather for mission
127
+ */
128
+ conditions: AeroflyMissionConditions;
129
+ /**
130
+ * @property {AeroflyMissionConditions} checkpoints form the actual flight plan
131
+ */
132
+ checkpoints: AeroflyMissionCheckpoint[];
133
+ /**
134
+ * @param {string} title of this flight plan
135
+ * @param {object} [additionalAttributes] allows to set additional attributes on creation
136
+ * @param {string} [additionalAttributes.description] text, mission briefing, etc
137
+ * @param {AeroflyLocalizedText[]} [additionalAttributes.localizedTexts] translations for title and description
138
+ * @param {?string} [additionalAttributes.tutorialName] will create a link to a tutorial page at https://www.aerofly.com/aircraft-tutorials/
139
+ * @param {string[]} [additionalAttributes.tags]
140
+ * @param {?boolean} [additionalAttributes.isFeatured] makes this mission pop up in "Challenges"
141
+ * @param {?number} [additionalAttributes.difficulty] values between 0.00 and 2.00 have been encountered, but they seem to be without limit
142
+ * @param {"cold_and_dark"|"before_start"|"taxi"|"takeoff"|"cruise"|"approach"|"landing"|"winch_launch"|"aerotow"|"pushback"} [additionalAttributes.flightSetting] of aircraft, like "taxi", "cruise"
143
+ * @param {{name:string,livery:string,icao:string}} [additionalAttributes.aircraft] for this mission
144
+ * @param {string} [additionalAttributes.callsign] of aircraft, uppercased
145
+ * @param {object} [additionalAttributes.origin] position of aircraft, as well as name of starting airport. Position does not have match airport.
146
+ * @param {object} [additionalAttributes.destination] position of aircraft, as well as name of destination airport. Position does not have match airport.
147
+ * @param {?number} [additionalAttributes.distance] in meters
148
+ * @param {?number} [additionalAttributes.duration] in seconds
149
+ * @param {?boolean} [additionalAttributes.isScheduled] marks this flight as "Scheduled flight".
150
+ * @param {?AeroflyMissionTargetPlane} [additionalAttributes.finish] as finish condition
151
+ * @param {AeroflyMissionConditions} [additionalAttributes.conditions] like time and weather for mission
152
+ * @param {AeroflyMissionCheckpoint[]} [additionalAttributes.checkpoints] form the actual flight plan
153
+ */
154
+ constructor(
155
+ title: string,
156
+ {
157
+ tutorialName,
158
+ description,
159
+ localizedTexts,
160
+ tags,
161
+ isFeatured,
162
+ difficulty,
163
+ flightSetting,
164
+ aircraft,
165
+ callsign,
166
+ origin,
167
+ destination,
168
+ distance,
169
+ duration,
170
+ isScheduled,
171
+ finish,
172
+ conditions,
173
+ checkpoints,
174
+ }?: {
175
+ tutorialName?: string | null;
176
+ description?: string;
177
+ localizedTexts?: AeroflyLocalizedText[];
178
+ tags?: string[];
179
+ isFeatured?: boolean | null;
180
+ difficulty?: number | null;
181
+ flightSetting?: AeroflyMissionSetting;
182
+ aircraft?: AeroflyMissionAircraft;
183
+ callsign?: string;
184
+ origin?: AeroflyMissionPosition;
185
+ destination?: AeroflyMissionPosition;
186
+ distance?: number | null;
187
+ duration?: number | null;
188
+ isScheduled?: boolean | null;
189
+ finish?: AeroflyMissionTargetPlane | null;
190
+ conditions?: AeroflyMissionConditions;
191
+ checkpoints?: AeroflyMissionCheckpoint[];
192
+ },
193
+ );
194
+ /**
195
+ * @returns {string} indexed checkpoints
196
+ */
197
+ getCheckpointsString(): string;
198
+ /**
199
+ * @returns {string} indexed checkpoints
200
+ */
201
+ getLocalizedTextsString(): string;
202
+ /**
203
+ * @throws {Error} on missing waypoints
204
+ * @returns {string} to use in Aerofly FS4's `custom_missions_user.tmc`
205
+ */
206
+ toString(): string;
207
+ }
208
+ //# sourceMappingURL=AeroflyMission.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AeroflyMission.d.ts","sourceRoot":"","sources":["../../src/dto/AeroflyMission.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE3E,eAAO,MAAM,YAAY,UAAU,CAAC;AACpC,eAAO,MAAM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;QACtC,WAAW,CAAC,EAAE,wBAAwB,EAAE,CAAC;KACvC;IAsBV;;OAEG;IACH,oBAAoB,IAAI,MAAM;IAQ9B;;OAEG;IACH,uBAAuB,IAAI,MAAM;IAQjC;;;OAGG;IACH,QAAQ,IAAI,MAAM;CAiGrB"}
@@ -0,0 +1,152 @@
1
+ /**
2
+ * Types of checkpoints. Required are usually "origin", "departure_runway" at the start and "destination_runway", "destination" at the end.
3
+ */
4
+ export type AeroflyMissionCheckpointType =
5
+ | "origin"
6
+ | "departure_runway"
7
+ | "departure"
8
+ | "waypoint"
9
+ | "arrival"
10
+ | "approach"
11
+ | "destination_runway"
12
+ | "destination";
13
+ /**
14
+ * @class
15
+ * A single way point for the given flight plan
16
+ *
17
+ * The purpose of this class is to collect data needed for Aerofly FS4's
18
+ * `custom_missions_user.tmc` flight plan file format, and export the structure
19
+ * for this file via the `toString()` method.
20
+ */
21
+ export declare class AeroflyMissionCheckpoint {
22
+ /**
23
+ * @property {"origin"|"departure_runway"|"departure"|"waypoint"|"arrival"|"approach"|"destination_runway"|"destination"} type of checkpoint, like "departure_runway"
24
+ */
25
+ type: AeroflyMissionCheckpointType;
26
+ /**
27
+ * @property {string} name ICAO code for airport, runway designator, navaid
28
+ * designator, fix name, or custom name
29
+ */
30
+ name: string;
31
+ /**
32
+ * @property {number} longitude easting, using the World Geodetic
33
+ * System 1984 (WGS 84) [WGS84] datum, with longitude and latitude units
34
+ * of decimal degrees; -180..180
35
+ */
36
+ longitude: number;
37
+ /**
38
+ * @property {number} latitude northing, using the World Geodetic
39
+ * System 1984 (WGS 84) [WGS84] datum, with longitude and latitude units
40
+ * of decimal degrees; -90..90
41
+ */
42
+ latitude: number;
43
+ /**
44
+ * @property {number} altitude The height in meters above or below the WGS
45
+ * 84 reference ellipsoid
46
+ */
47
+ altitude: number;
48
+ /**
49
+ * @property {?boolean} altitudeConstraint The altitude given in `altitude`
50
+ * will be interpreted as mandatory flight plan altitude instead of
51
+ * suggestion.
52
+ */
53
+ altitudeConstraint: boolean | null;
54
+ /**
55
+ * @property {?number} direction of runway, in degree
56
+ */
57
+ direction: number | null;
58
+ /**
59
+ * @property {?number} slope of runway
60
+ */
61
+ slope: number | null;
62
+ /**
63
+ * @property {?number} length of runway, in meters
64
+ */
65
+ length: number | null;
66
+ /**
67
+ * @property {?number} frequency of runways or navigational aids, in Hz; multiply by 1000 for kHz, 1_000_000 for MHz
68
+ */
69
+ frequency: number | null;
70
+ /**
71
+ * @property {?boolean} flyOver if waypoint is meant to be flown over
72
+ */
73
+ flyOver: boolean | null;
74
+ /**
75
+ * @param {string} name ICAO code for airport, runway designator, navaid
76
+ * designator, fix name, or custom name
77
+ * @param {"origin"|"departure_runway"|"departure"|"waypoint"|"arrival"|"approach"|"destination_runway"|"destination"} type Type of checkpoint, like "departure_runway"
78
+ * @param {number} longitude easting, using the World Geodetic
79
+ * System 1984 (WGS 84) [WGS84] datum, with longitude and latitude units
80
+ * of decimal degrees; -180..180
81
+ * @param {number} latitude northing, using the World Geodetic
82
+ * System 1984 (WGS 84) [WGS84] datum, with longitude and latitude units
83
+ * of decimal degrees; -90..90
84
+ * @param {object} additionalAttributes allows to set additional attributes on creation
85
+ * @param {number} [additionalAttributes.altitude] The height in meters above or below the WGS
86
+ * 84 reference ellipsoid
87
+ * @param {?number} [additionalAttributes.altitude_feet] The height in feet above or below the WGS
88
+ * 84 reference ellipsoid. Will overwrite altitude
89
+ * @param {number} [additionalAttributes.altitudeConstraint] The altitude given in `altitude`
90
+ * will be interpreted as mandatory flight plan altitude instead of
91
+ * suggestion.
92
+ * @param {boolean} [additionalAttributes.direction] of runway, in degree
93
+ * @param {?number} [additionalAttributes.slope] of runway
94
+ * @param {?number} [additionalAttributes.length] of runway, in meters
95
+ * @param {?number} [additionalAttributes.length_feet] of runway, in feet. Will overwrite length
96
+ * @param {?number} [additionalAttributes.frequency] of runways or navigational aids, in Hz; multiply by 1000 for kHz, 1_000_000 for MHz
97
+ * @param {?boolean} [additionalAttributes.flyOver] if waypoint is meant to be flown over
98
+ */
99
+ constructor(
100
+ name: string,
101
+ type: AeroflyMissionCheckpointType,
102
+ longitude: number,
103
+ latitude: number,
104
+ {
105
+ altitude,
106
+ altitude_feet,
107
+ altitudeConstraint,
108
+ direction,
109
+ slope,
110
+ length,
111
+ length_feet,
112
+ frequency,
113
+ flyOver,
114
+ }?: {
115
+ altitude?: number;
116
+ altitude_feet?: number | null;
117
+ altitudeConstraint?: boolean | null;
118
+ direction?: number | null;
119
+ slope?: number | null;
120
+ length?: number | null;
121
+ length_feet?: number | null;
122
+ frequency?: number | null;
123
+ flyOver?: boolean | null;
124
+ },
125
+ );
126
+ /**
127
+ * @param {number} altitude_feet
128
+ */
129
+ set altitude_feet(altitude_feet: number);
130
+ /**
131
+ * @returns {number} altitude_feet
132
+ */
133
+ get altitude_feet(): number;
134
+ /**
135
+ * @param {number} length_feet
136
+ */
137
+ set length_feet(length_feet: number);
138
+ /**
139
+ * @returns {number} length_feet
140
+ */
141
+ get length_feet(): number;
142
+ /**
143
+ * @returns {string}
144
+ */
145
+ get frequency_string(): string;
146
+ /**
147
+ * @param {number} index if used in an array will se the array index
148
+ * @returns {string} to use in Aerofly FS4's `custom_missions_user.tmc`
149
+ */
150
+ toString(index?: number): string;
151
+ }
152
+ //# sourceMappingURL=AeroflyMissionCheckpoint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AeroflyMissionCheckpoint.d.ts","sourceRoot":"","sources":["../../src/dto/AeroflyMissionCheckpoint.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAClC,QAAQ,GACR,kBAAkB,GAClB,WAAW,GACX,UAAU,GACV,SAAS,GACT,UAAU,GACV,oBAAoB,GACpB,aAAa,CAAC;AAEpB;;;;;;;GAOG;AAEH,qBAAa,wBAAwB;IACjC;;OAEG;IACH,IAAI,EAAE,4BAA4B,CAAC;IAEnC;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;O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