pyBADA 0.1.0__py3-none-any.whl

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 (99) hide show
  1. pyBADA/TCL.py +8731 -0
  2. pyBADA/__init__.py +0 -0
  3. pyBADA/aircraft/BADA3/DUMMY/BADA.GPF +113 -0
  4. pyBADA/aircraft/BADA3/DUMMY/BZJT__.APF +25 -0
  5. pyBADA/aircraft/BADA3/DUMMY/BZJT__.OPF +61 -0
  6. pyBADA/aircraft/BADA3/DUMMY/BZJT__.PTD +139 -0
  7. pyBADA/aircraft/BADA3/DUMMY/BZJT__.PTF +73 -0
  8. pyBADA/aircraft/BADA3/DUMMY/GA____.APF +25 -0
  9. pyBADA/aircraft/BADA3/DUMMY/GA____.OPF +61 -0
  10. pyBADA/aircraft/BADA3/DUMMY/GA____.PTD +71 -0
  11. pyBADA/aircraft/BADA3/DUMMY/GA____.PTF +39 -0
  12. pyBADA/aircraft/BADA3/DUMMY/J2H___.APF +25 -0
  13. pyBADA/aircraft/BADA3/DUMMY/J2H___.OPF +61 -0
  14. pyBADA/aircraft/BADA3/DUMMY/J2H___.PTD +131 -0
  15. pyBADA/aircraft/BADA3/DUMMY/J2H___.PTF +69 -0
  16. pyBADA/aircraft/BADA3/DUMMY/J2M___.APF +25 -0
  17. pyBADA/aircraft/BADA3/DUMMY/J2M___.OPF +61 -0
  18. pyBADA/aircraft/BADA3/DUMMY/J2M___.PTD +123 -0
  19. pyBADA/aircraft/BADA3/DUMMY/J2M___.PTF +65 -0
  20. pyBADA/aircraft/BADA3/DUMMY/J4H___.APF +25 -0
  21. pyBADA/aircraft/BADA3/DUMMY/J4H___.OPF +61 -0
  22. pyBADA/aircraft/BADA3/DUMMY/J4H___.PTD +139 -0
  23. pyBADA/aircraft/BADA3/DUMMY/J4H___.PTF +73 -0
  24. pyBADA/aircraft/BADA3/DUMMY/ReleaseSummary +35 -0
  25. pyBADA/aircraft/BADA3/DUMMY/SYNONYM.NEW +155 -0
  26. pyBADA/aircraft/BADA3/DUMMY/TP2M__.APF +25 -0
  27. pyBADA/aircraft/BADA3/DUMMY/TP2M__.OPF +61 -0
  28. pyBADA/aircraft/BADA3/DUMMY/TP2M__.PTD +99 -0
  29. pyBADA/aircraft/BADA3/DUMMY/TP2M__.PTF +53 -0
  30. pyBADA/aircraft/BADA4/DUMMY/ACM_BADA4.xsd +556 -0
  31. pyBADA/aircraft/BADA4/DUMMY/Dummy-PST/Dummy-PST.ATF +106 -0
  32. pyBADA/aircraft/BADA4/DUMMY/Dummy-PST/Dummy-PST.xml +244 -0
  33. pyBADA/aircraft/BADA4/DUMMY/Dummy-PST/Dummy-PST_ISA+20.PTD +182 -0
  34. pyBADA/aircraft/BADA4/DUMMY/Dummy-PST/Dummy-PST_ISA+20.PTF +41 -0
  35. pyBADA/aircraft/BADA4/DUMMY/Dummy-PST/Dummy-PST_ISA.PTD +182 -0
  36. pyBADA/aircraft/BADA4/DUMMY/Dummy-PST/Dummy-PST_ISA.PTF +41 -0
  37. pyBADA/aircraft/BADA4/DUMMY/Dummy-TBP/Dummy-TBP.ATF +191 -0
  38. pyBADA/aircraft/BADA4/DUMMY/Dummy-TBP/Dummy-TBP.xml +540 -0
  39. pyBADA/aircraft/BADA4/DUMMY/Dummy-TBP/Dummy-TBP_ISA+20.PTD +218 -0
  40. pyBADA/aircraft/BADA4/DUMMY/Dummy-TBP/Dummy-TBP_ISA+20.PTF +49 -0
  41. pyBADA/aircraft/BADA4/DUMMY/Dummy-TBP/Dummy-TBP_ISA.PTD +218 -0
  42. pyBADA/aircraft/BADA4/DUMMY/Dummy-TBP/Dummy-TBP_ISA.PTF +49 -0
  43. pyBADA/aircraft/BADA4/DUMMY/Dummy-TBP/LRC.dat +38 -0
  44. pyBADA/aircraft/BADA4/DUMMY/Dummy-TBP/MEC.dat +58 -0
  45. pyBADA/aircraft/BADA4/DUMMY/Dummy-TBP/MRC.dat +38 -0
  46. pyBADA/aircraft/BADA4/DUMMY/Dummy-TBP/OPTALT.dat +37 -0
  47. pyBADA/aircraft/BADA4/DUMMY/Dummy-TWIN/Dummy-TWIN.ATF +204 -0
  48. pyBADA/aircraft/BADA4/DUMMY/Dummy-TWIN/Dummy-TWIN.xml +648 -0
  49. pyBADA/aircraft/BADA4/DUMMY/Dummy-TWIN/Dummy-TWIN_ISA+20.PTD +281 -0
  50. pyBADA/aircraft/BADA4/DUMMY/Dummy-TWIN/Dummy-TWIN_ISA+20.PTF +63 -0
  51. pyBADA/aircraft/BADA4/DUMMY/Dummy-TWIN/Dummy-TWIN_ISA.PTD +281 -0
  52. pyBADA/aircraft/BADA4/DUMMY/Dummy-TWIN/Dummy-TWIN_ISA.PTF +63 -0
  53. pyBADA/aircraft/BADA4/DUMMY/Dummy-TWIN/ECON.OPT +37 -0
  54. pyBADA/aircraft/BADA4/DUMMY/Dummy-TWIN/LRC.OPT +38 -0
  55. pyBADA/aircraft/BADA4/DUMMY/Dummy-TWIN/MEC.OPT +58 -0
  56. pyBADA/aircraft/BADA4/DUMMY/Dummy-TWIN/MRC.OPT +38 -0
  57. pyBADA/aircraft/BADA4/DUMMY/Dummy-TWIN/OPTALT.OPT +37 -0
  58. pyBADA/aircraft/BADA4/DUMMY/Dummy-TWIN-plus/Dummy-TWIN-plus.ATF +238 -0
  59. pyBADA/aircraft/BADA4/DUMMY/Dummy-TWIN-plus/Dummy-TWIN-plus.xml +737 -0
  60. pyBADA/aircraft/BADA4/DUMMY/Dummy-TWIN-plus/Dummy-TWIN-plus_ISA+20.PTD +281 -0
  61. pyBADA/aircraft/BADA4/DUMMY/Dummy-TWIN-plus/Dummy-TWIN-plus_ISA+20.PTF +63 -0
  62. pyBADA/aircraft/BADA4/DUMMY/Dummy-TWIN-plus/Dummy-TWIN-plus_ISA.PTD +281 -0
  63. pyBADA/aircraft/BADA4/DUMMY/Dummy-TWIN-plus/Dummy-TWIN-plus_ISA.PTF +63 -0
  64. pyBADA/aircraft/BADA4/DUMMY/Dummy-TWIN-plus/ECON.OPT +37 -0
  65. pyBADA/aircraft/BADA4/DUMMY/Dummy-TWIN-plus/LRC.OPT +36 -0
  66. pyBADA/aircraft/BADA4/DUMMY/Dummy-TWIN-plus/MEC.OPT +56 -0
  67. pyBADA/aircraft/BADA4/DUMMY/Dummy-TWIN-plus/MRC.OPT +36 -0
  68. pyBADA/aircraft/BADA4/DUMMY/Dummy-TWIN-plus/OPTALT.OPT +37 -0
  69. pyBADA/aircraft/BADA4/DUMMY/GPF.xml +130 -0
  70. pyBADA/aircraft/BADA4/DUMMY/GPF_BADA4.xsd +75 -0
  71. pyBADA/aircraft/BADA4/DUMMY/aircraft_model_default.xml +311 -0
  72. pyBADA/aircraft/BADAH/DUMMY/DUMH/DUMH.ATF +97 -0
  73. pyBADA/aircraft/BADAH/DUMMY/DUMH/DUMH.xml +82 -0
  74. pyBADA/aircraft/BADAH/DUMMY/DUMH/DUMH_ISA+20.PTD +632 -0
  75. pyBADA/aircraft/BADAH/DUMMY/DUMH/DUMH_ISA+20.PTF +71 -0
  76. pyBADA/aircraft/BADAH/DUMMY/DUMH/DUMH_ISA.PTD +632 -0
  77. pyBADA/aircraft/BADAH/DUMMY/DUMH/DUMH_ISA.PTF +71 -0
  78. pyBADA/aircraft/BADAH/DUMMY/DUMH/LRC.OPT +142 -0
  79. pyBADA/aircraft/BADAH/DUMMY/DUMH/MEC.OPT +142 -0
  80. pyBADA/aircraft/BADAH/DUMMY/DUMH/MRC.OPT +142 -0
  81. pyBADA/aircraft.py +414 -0
  82. pyBADA/atmosphere.py +345 -0
  83. pyBADA/bada3.py +4566 -0
  84. pyBADA/bada4.py +5327 -0
  85. pyBADA/badaE.py +3317 -0
  86. pyBADA/badaH.py +3632 -0
  87. pyBADA/configuration.py +98 -0
  88. pyBADA/constants.py +64 -0
  89. pyBADA/conversions.py +197 -0
  90. pyBADA/data/magneticDeclinationGridData.json +247067 -0
  91. pyBADA/flightTrajectory.py +929 -0
  92. pyBADA/geodesic.py +760 -0
  93. pyBADA/magnetic.py +119 -0
  94. pyBADA/trajectoryPrediction.py +175 -0
  95. pybada-0.1.0.dist-info/METADATA +57 -0
  96. pybada-0.1.0.dist-info/RECORD +99 -0
  97. pybada-0.1.0.dist-info/WHEEL +4 -0
  98. pybada-0.1.0.dist-info/licenses/AUTHORS +2 -0
  99. pybada-0.1.0.dist-info/licenses/LICENCE.txt +287 -0
pyBADA/aircraft.py ADDED
@@ -0,0 +1,414 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ pyBADA
4
+ Generic airplane/helicopter performance module
5
+ Developped @EUROCONTROL (EIH)
6
+ 2024
7
+ """
8
+
9
+ __author__ = "Henrich Glaser-Opitz"
10
+ __copyright__ = "Copyright 2024, EUROCONTROL (EIH)"
11
+ __license__ = "BADA Eurocontrol"
12
+ __version__ = "1.0.0"
13
+ __maintainer__ = "Henrich Glaser-Opitz"
14
+ __email__ = "henrich.glaser-opitz@eurocontrol.int"
15
+ __status__ = "Development"
16
+ __docformat__ = "reStructuredText"
17
+
18
+
19
+ import abc
20
+ from math import sqrt, pow, cos, radians, atan, tan, degrees
21
+
22
+ from pyBADA import constants as const
23
+ from pyBADA import conversions as conv
24
+ from pyBADA import atmosphere as atm
25
+
26
+
27
+ def checkArgument(argument, **kwargs):
28
+ if kwargs.get(argument) is not None:
29
+ return kwargs.get(argument)
30
+ else:
31
+ raise TypeError("Missing " + argument + " argument")
32
+
33
+
34
+ class BadaFamily(object):
35
+ """This class sets the token for the respected BADA Family."""
36
+
37
+ def __init__(self, BADA3=False, BADA4=False, BADAH=False, BADAE=False):
38
+ self.BADA3 = BADA3
39
+ self.BADA4 = BADA4
40
+ self.BADAH = BADAH
41
+ self.BADAE = BADAE
42
+
43
+
44
+ class Airplane(object):
45
+ """This is a generic airplane class based on a three-degrees-of-freedom point mass model (where all the forces
46
+ are applied at the center of gravity).
47
+
48
+ .. note::this generic class only implements basic aircraft dynamics
49
+ calculations, aircraft performance and optimisation can be obtained
50
+ from its inherited classes
51
+
52
+ """
53
+
54
+ __metaclass__ = abc.ABCMeta
55
+
56
+ def __init__(self):
57
+ pass
58
+
59
+ @staticmethod
60
+ def loadFactor(fi):
61
+ """This function computes the load factor from bank angle
62
+
63
+ :param fi: bank angle [deg].
64
+ :type fi: float.
65
+ :returns: load factor [-].
66
+ :rtype: float.
67
+
68
+ """
69
+ # rounding implemented to try to minimize errors on small decimal places, like 1.9999999999999 instead of 2.0
70
+ return 1 / round(cos(radians(fi)), 10)
71
+
72
+ @staticmethod
73
+ def bankAngle(rateOfTurn, v):
74
+ """This function computes bank angle based on TAS and rate of turn
75
+
76
+ :param v: true airspeed TAS [m s^-1].
77
+ :param rateOfTurn: rateOfTurn [deg/s].
78
+ :type v: float.
79
+ :type rateOfTurn: float.
80
+ :returns: bank angle [deg].
81
+ :rtype: float
82
+
83
+ """
84
+
85
+ ROT = conv.deg2rad(rateOfTurn)
86
+
87
+ BA = atan((ROT * v) / const.g)
88
+ return conv.rad2deg(BA)
89
+
90
+ @staticmethod
91
+ def rateOfTurn_bankAngle(TAS, bankAngle):
92
+ """This function computes the rate of turn
93
+
94
+ :param TAS: true airspeed TAS [m s^-1].
95
+ :param bankAngle: bank angle [deg].
96
+ :type TAS: float.
97
+ :type bankAngle: float.
98
+ :returns: rate of turn [deg s^-1].
99
+ :rtype: float.
100
+
101
+ """
102
+
103
+ ROT = tan(radians(bankAngle)) * const.g / TAS
104
+
105
+ return degrees(ROT)
106
+
107
+ @staticmethod
108
+ def rateOfTurn(v, nz=1.0):
109
+ """This function computes the rate of turn
110
+
111
+ :param v: true airspeed TAS [m s^-1].
112
+ :param nz: load factor [-].
113
+ :type v: float.
114
+ :type nz: float.
115
+ :returns: rate of turn [rad s^-1].
116
+ :rtype: float.
117
+
118
+ """
119
+ return degrees((const.g / v) * sqrt(nz * nz - 1))
120
+
121
+ @staticmethod
122
+ def turnRadius(v, nz=1.0):
123
+ """This function computes the turn radius from load factor and speed
124
+
125
+ :param v: true airspeed TAS [m s^-1].
126
+ :param nz: load factor [-].
127
+ :type v: float.
128
+ :type nz: float.
129
+ :returns: turn radius [m].
130
+ :rtype: float.
131
+
132
+ """
133
+ return (v * v / const.g) * (1 / sqrt(nz * nz - 1))
134
+
135
+ @staticmethod
136
+ def turnRadius_bankAngle(v, ba):
137
+ """This function computes the turn radius from bank angle and speed
138
+
139
+ :param v: true airspeed [m s^-1].
140
+ :param ba: bank angle [deg].
141
+ :type v: float.
142
+ :type ba: float.
143
+ :returns: turn radius [m].
144
+ :rtype: float.
145
+
146
+ """
147
+
148
+ return (v * v / const.g) * (1 / tan(conv.deg2rad(ba)))
149
+
150
+ @staticmethod
151
+ def GS(tas, gamma, Ws):
152
+ """This function computes the ground speed
153
+
154
+ :param tas: true airspeed [m s^-1].
155
+ :param gamma: flight path angle [deg].
156
+ :param Ws: longitudinal wind speed [m s^-1].
157
+ :type tas: float.
158
+ :type gamma: float.
159
+ :type Ws: float.
160
+ :returns: ground speed [m s^-1].
161
+ :rtype: float.
162
+
163
+ """
164
+ return tas * cos(radians(gamma)) + Ws
165
+
166
+ @staticmethod
167
+ def esf(**kwargs):
168
+ """This function computes the energy share factor
169
+
170
+ :param h: altitude [m]
171
+ :param DeltaTemp: deviation with respect to ISA [K]
172
+ :param flightEvolution: character of the flight evolution [constM/constCAS/acc/dec][-]
173
+ :param phase: phase of flight [cl/des][-]
174
+ :param v: constant speed [M][-]
175
+ :type h: float.
176
+ :type DeltaTemp: float.
177
+ :type flightEvolution: str.
178
+ :type phase: str.
179
+ :type v: float.
180
+ :returns: energy share factor [-].
181
+ :rtype: float.
182
+ """
183
+
184
+ flightEvolution = checkArgument("flightEvolution", **kwargs)
185
+
186
+ if flightEvolution == "acc" or flightEvolution == "dec":
187
+ phase = checkArgument("phase", **kwargs)
188
+ # acceleration in climb or deceleration in descent
189
+ if (flightEvolution == "acc" and phase == "cl") or (
190
+ flightEvolution == "dec" and phase == "des"
191
+ ):
192
+ ESF = 0.3
193
+ # deceleration in climb or acceleration in descent
194
+ elif (flightEvolution == "dec" and phase == "cl") or (
195
+ flightEvolution == "acc" and phase == "des"
196
+ ):
197
+ ESF = 1.7
198
+ else:
199
+ ESF = float("Nan")
200
+ else:
201
+ h = checkArgument("h", **kwargs)
202
+
203
+ # constant M above tropopause
204
+ if flightEvolution == "constM" and h > const.h_11:
205
+ ESF = 1
206
+
207
+ # constant M below or at tropopause
208
+ elif flightEvolution == "constM" and h <= const.h_11:
209
+ M = checkArgument("M", **kwargs)
210
+ DeltaTemp = checkArgument("DeltaTemp", **kwargs)
211
+
212
+ temp = atm.theta(h, DeltaTemp) * const.temp_0
213
+ ESF = 1 / (
214
+ 1
215
+ + (const.Agamma * const.R * (-const.temp_h) * M * M / (2 * const.g))
216
+ * ((temp - DeltaTemp) / temp)
217
+ )
218
+
219
+ # constant CAS below or at tropopause
220
+ elif flightEvolution == "constCAS" and h <= const.h_11:
221
+ M = checkArgument("M", **kwargs)
222
+ DeltaTemp = checkArgument("DeltaTemp", **kwargs)
223
+
224
+ temp = atm.theta(h, DeltaTemp) * const.temp_0
225
+ A = (
226
+ const.Agamma * const.R * (-const.temp_h) * M * M / (2 * const.g)
227
+ ) * ((temp - DeltaTemp) / temp)
228
+ B = pow(1 + (const.Agamma - 1) * M * M / 2, -1 / (const.Agamma - 1))
229
+ C = pow(1 + (const.Agamma - 1) * M * M / 2, 1 / const.Amu) - 1
230
+ ESF = 1 / (1 + A + B * C)
231
+
232
+ # constant CAS above tropopause
233
+ elif flightEvolution == "constCAS" and h > const.h_11:
234
+ M = checkArgument("M", **kwargs)
235
+
236
+ ESF = 1 / (
237
+ 1
238
+ + (pow(1 + (const.Agamma - 1) * M * M / 2, -1 / (const.Agamma - 1)))
239
+ * (pow(1 + (const.Agamma - 1) * M * M / 2, 1 / const.Amu) - 1)
240
+ )
241
+
242
+ # contant TAS
243
+ elif flightEvolution == "constTAS":
244
+ ESF = 1
245
+
246
+ else:
247
+ ESF = float("Nan")
248
+
249
+ return ESF
250
+
251
+
252
+ class Helicopter(object):
253
+ """This is a generic helicopter class based on a Total-Energy Model (TEM)
254
+
255
+ .. note::this generic class only implements basic aircraft dynamics
256
+ calculations, aircraft performance and optimisation can be obtained
257
+ from its inherited classes
258
+
259
+ """
260
+
261
+ __metaclass__ = abc.ABCMeta
262
+
263
+ def __init__(self):
264
+ pass
265
+
266
+ @staticmethod
267
+ def loadFactor(fi):
268
+ """This function computes the load factor from bank angle
269
+
270
+ :param fi: bank angle [deg].
271
+ :type fi: float.
272
+ :returns: load factor [-].
273
+ :rtype: float.
274
+
275
+ """
276
+ return 1 / round(cos(radians(fi)), 10)
277
+
278
+ @staticmethod
279
+ def rateOfTurn(v, nz=1.0):
280
+ """This function computes the rate of turn
281
+
282
+ :param v: true airspeed TAS [m s^-1].
283
+ :param nz: load factor [-].
284
+ :type v: float.
285
+ :type nz: float.
286
+ :returns: rate of turn [rad s^-1].
287
+ :rtype: float.
288
+
289
+ """
290
+ return degrees((const.g / v) * sqrt(nz * nz - 1))
291
+
292
+ @staticmethod
293
+ def rateOfTurn_bankAngle(TAS, bankAngle):
294
+ """This function computes the rate of turn
295
+
296
+ :param TAS: true airspeed TAS [m s^-1].
297
+ :param bankAngle: bank angle [deg].
298
+ :type TAS: float.
299
+ :type bankAngle: float.
300
+ :returns: rate of turn [deg s^-1].
301
+ :rtype: float.
302
+
303
+ """
304
+
305
+ ROT = tan(radians(bankAngle)) * const.g / TAS
306
+
307
+ return degrees(ROT)
308
+
309
+ @staticmethod
310
+ def turnRadius(v, nz=1.0):
311
+ """This function computes the turn radius from load factor and speed
312
+
313
+ :param v: true airspeed TAS [m s^-1].
314
+ :param nz: load factor [-].
315
+ :type v: float.
316
+ :type nz: float.
317
+ :returns: turn radius [m].
318
+ :rtype: float.
319
+
320
+ """
321
+ return (v * v / const.g) * (1 / sqrt(nz * nz - 1))
322
+
323
+ @staticmethod
324
+ def turnRadius_bankAngle(v, ba):
325
+ """This function computes the turn radius from bank angle and speed
326
+
327
+ :param v: true airspeed [m s^-1].
328
+ :param ba: bank angle [deg].
329
+ :type v: float.
330
+ :type ba: float.
331
+ :returns: turn radius [m].
332
+ :rtype: float.
333
+
334
+ """
335
+
336
+ return (v * v / const.g) * (1 / tan(conv.deg2rad(ba)))
337
+
338
+ @staticmethod
339
+ def esf(**kwargs):
340
+ """This function computes the energy share factor
341
+
342
+ :param h: altitude [m]
343
+ :param DeltaTemp: deviation with respect to ISA [K]
344
+ :param flightEvolution: character of the flight evolution {constTAS,constCAS,acc,dec}[-]
345
+ :param phase: phase of flight {Climb,Descent}[-]
346
+ :param M: constant speed M [-]
347
+ :type h: float.
348
+ :type DeltaTemp: float.
349
+ :type flightEvolution: str.
350
+ :type phase: str.
351
+ :type M: float.
352
+ :returns: energy share factor ESF [-].
353
+ :rtype: float.
354
+ """
355
+
356
+ flightEvolution = checkArgument("flightEvolution", **kwargs)
357
+
358
+ if flightEvolution == "acc" or flightEvolution == "dec":
359
+ phase = checkArgument("phase", **kwargs)
360
+ # acceleration in climb or deceleration in descent
361
+ if (flightEvolution == "acc" and phase == "Climb") or (
362
+ flightEvolution == "dec" and phase == "Descent"
363
+ ):
364
+ ESF = 0.3
365
+ # deceleration in climb or acceleration in descent
366
+ elif (flightEvolution == "dec" and phase == "Climb") or (
367
+ flightEvolution == "acc" and phase == "Descent"
368
+ ):
369
+ ESF = 1.7
370
+ else:
371
+ ESF = float("Nan")
372
+ else:
373
+ # contant CAS
374
+ if flightEvolution == "constCAS":
375
+ h = checkArgument("h", **kwargs)
376
+ M = checkArgument("M", **kwargs)
377
+ DeltaTemp = checkArgument("DeltaTemp", **kwargs)
378
+
379
+ theta = atm.theta(h, DeltaTemp)
380
+ temp = theta * const.temp_0
381
+
382
+ A = (
383
+ const.Agamma * const.R * (-const.temp_h) * M * M / (2 * const.g)
384
+ ) * ((temp - DeltaTemp) / temp)
385
+ B = pow(1 + (const.Agamma - 1) * M * M / 2, -1 / (const.Agamma - 1))
386
+ C = pow(1 + (const.Agamma - 1) * M * M / 2, 1 / const.Amu) - 1
387
+ ESF = 1 / (1 + A + B * C)
388
+
389
+ # contant TAS
390
+ elif flightEvolution == "constTAS":
391
+ ESF = 1
392
+
393
+ else:
394
+ ESF = float("Nan")
395
+
396
+ return ESF
397
+
398
+ @staticmethod
399
+ def bankAngle(rateOfTurn, v):
400
+ """This function computes bank angle based on TAS and rate of turn
401
+
402
+ :param v: true airspeed TAS [m s^-1].
403
+ :param rateOfTurn: rateOfTurn [deg/s].
404
+ :type v: float.
405
+ :type rateOfTurn: float.
406
+ :returns: bank angle [deg].
407
+ :rtype: float
408
+
409
+ """
410
+
411
+ ROT = conv.deg2rad(rateOfTurn)
412
+
413
+ BA = atan((ROT * v) / const.g)
414
+ return conv.rad2deg(BA)