@fboes/aerofly-custom-missions 1.9.1 → 1.10.0

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  This changelog documents all notable changes to the Aerofly Custom Missions project. Each version entry includes a list of changes, with the most recent version at the top.
4
4
 
5
+ ## [1.10.0] - 2026-05-28
6
+
7
+ - Changed turbulence formula
8
+
5
9
  ## [1.9.1] - 2026-05-24
6
10
 
7
11
  - Exporting `AeroflyNavRouteBase`
@@ -39,15 +39,13 @@ export class AeroflySettingsWind {
39
39
  this.speed_kts = Math.max(0, (strength + 0.5) ** 2 - 0.25) * 8;
40
40
  }
41
41
  /**
42
- * @returns {number} the normalized turbulence value [0,1] for this wind, where 0 means no turbulence and 1 means very strong turbulence (80 kts wind + 20 kts gusts)
42
+ * @returns {number} the normalized turbulence value [0,1] for this wind, where 0 means no turbulence and 1 means very strong turbulence. Wind difference is [0,15] kts.
43
43
  */
44
44
  get turbulence() {
45
- return Math.min(1, this.speed_kts / 80 + this.gust_kts / 20);
45
+ return Math.max(0, Math.min(1, (this.gust_kts - this.speed_kts) / 15));
46
46
  }
47
47
  set turbulence(turbulence) {
48
- const totalWindEffect = turbulence * 80;
49
- this.speed_kts = Math.min(this.speed_kts, totalWindEffect);
50
- this.gust_kts = Math.min(this.gust_kts, (totalWindEffect - this.speed_kts) * 20);
48
+ this.gust_kts = turbulence * 15 + this.speed_kts;
51
49
  }
52
50
  /**
53
51
  * @returns {number} the normalized thermal activity value [0,1] for this wind, where 0 means no thermal activity and 1 means very strong thermal activity (30°C or more)
package/docs/flight.json CHANGED
@@ -25,7 +25,7 @@
25
25
  "wind": {
26
26
  "speed_kts": 9.000001126528,
27
27
  "directionInDegree": 70,
28
- "gust_kts": 0,
28
+ "gust_kts": 11.250001126528,
29
29
  "temperature_celsius": 23
30
30
  },
31
31
  "clouds": [
package/docs/flight.mcf CHANGED
@@ -34,7 +34,7 @@
34
34
  <[tmsettings_wind][wind][]
35
35
  <[float64][strength][0.672604]> // 10 kts
36
36
  <[float64][direction_in_degree][70]>
37
- <[float64][turbulence][0.1125000140816]> // 0 kts gusts
37
+ <[float64][turbulence][0.15]> // 12 kts gusts
38
38
  <[float64][thermal_activity][0.72]> // 23°C
39
39
  >
40
40
  <[tmsettings_clouds][clouds][]
package/docs/flight.xml CHANGED
@@ -34,7 +34,7 @@
34
34
  <wind type="tmsettings_wind">
35
35
  <strength type="float64">0.672604</strength> <!-- 10 kts -->
36
36
  <direction_in_degree type="float64">70</direction_in_degree>
37
- <turbulence type="float64">0.1125000140816</turbulence> <!-- 0 kts gusts -->
37
+ <turbulence type="float64">0.15</turbulence> <!-- 12 kts gusts -->
38
38
  <thermal_activity type="float64">0.72</thermal_activity> <!-- 23°C -->
39
39
  </wind>
40
40
  <clouds type="tmsettings_clouds">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fboes/aerofly-custom-missions",
3
- "version": "1.9.1",
3
+ "version": "1.10.0",
4
4
  "description": "Builder for Aerofly FS4 Custom Missions Files",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -69,16 +69,14 @@ export class AeroflySettingsWind {
69
69
  }
70
70
 
71
71
  /**
72
- * @returns {number} the normalized turbulence value [0,1] for this wind, where 0 means no turbulence and 1 means very strong turbulence (80 kts wind + 20 kts gusts)
72
+ * @returns {number} the normalized turbulence value [0,1] for this wind, where 0 means no turbulence and 1 means very strong turbulence. Wind difference is [0,15] kts.
73
73
  */
74
74
  get turbulence(): number {
75
- return Math.min(1, this.speed_kts / 80 + this.gust_kts / 20);
75
+ return Math.max(0, Math.min(1, (this.gust_kts - this.speed_kts) / 15));
76
76
  }
77
77
 
78
78
  set turbulence(turbulence: number) {
79
- const totalWindEffect = turbulence * 80;
80
- this.speed_kts = Math.min(this.speed_kts, totalWindEffect);
81
- this.gust_kts = Math.min(this.gust_kts, (totalWindEffect - this.speed_kts) * 20);
79
+ this.gust_kts = turbulence * 15 + this.speed_kts;
82
80
  }
83
81
 
84
82
  /**
@@ -45,7 +45,7 @@ export declare class AeroflySettingsWind {
45
45
  get strength(): number;
46
46
  set strength(strength: number);
47
47
  /**
48
- * @returns {number} the normalized turbulence value [0,1] for this wind, where 0 means no turbulence and 1 means very strong turbulence (80 kts wind + 20 kts gusts)
48
+ * @returns {number} the normalized turbulence value [0,1] for this wind, where 0 means no turbulence and 1 means very strong turbulence. Wind difference is [0,15] kts.
49
49
  */
50
50
  get turbulence(): number;
51
51
  set turbulence(turbulence: number);
@@ -1 +1 @@
1
- {"version":3,"file":"AeroflySettingsWind.d.ts","sourceRoot":"","sources":["../../src/dto-flight/AeroflySettingsWind.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAE/E;;GAEG;AACH,qBAAa,mBAAmB;IAC5B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAE5B;;;;;OAKG;gBACS,SAAS,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAU,EAAE,mBAAmB,GAAE,MAAW;IAOhH;;;;;;OAMG;IACH,MAAM,CAAC,0BAA0B,CAC7B,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,MAAM,EACzB,UAAU,GAAE,MAAU,EACtB,eAAe,GAAE,MAAU,GAC5B,mBAAmB;IAQtB;;OAEG;IACH,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAE5B;IAED;;OAEG;IACH,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,IAAI,UAAU,CAAC,UAAU,EAAE,MAAM,EAIhC;IAED;;OA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