pyBADA 0.1.5__py3-none-any.whl → 0.1.7__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.
- pyBADA/TCL.py +185 -192
- pyBADA/aircraft.py +15 -15
- pyBADA/atmosphere.py +427 -262
- pyBADA/bada3.py +226 -240
- pyBADA/bada4.py +346 -340
- pyBADA/badaH.py +220 -233
- pyBADA/configuration.py +2 -1
- pyBADA/conversions.py +107 -130
- pyBADA/flightTrajectory.py +2 -1
- pyBADA/geodesic.py +116 -10
- pyBADA/magnetic.py +2 -1
- pyBADA/trajectoryPrediction.py +4 -3
- pyBADA/utils.py +209 -0
- {pybada-0.1.5.dist-info → pybada-0.1.7.dist-info}/METADATA +15 -13
- {pybada-0.1.5.dist-info → pybada-0.1.7.dist-info}/RECORD +18 -17
- {pybada-0.1.5.dist-info → pybada-0.1.7.dist-info}/WHEEL +0 -0
- {pybada-0.1.5.dist-info → pybada-0.1.7.dist-info}/licenses/AUTHORS +0 -0
- {pybada-0.1.5.dist-info → pybada-0.1.7.dist-info}/licenses/LICENCE.txt +0 -0
pyBADA/aircraft.py
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"""Generic airplane/helicopter performance module."""
|
|
2
2
|
|
|
3
|
-
from math import
|
|
3
|
+
from math import atan, cos, degrees, pow, radians, sqrt, tan
|
|
4
4
|
|
|
5
|
+
from pyBADA import atmosphere as atm
|
|
5
6
|
from pyBADA import constants as const
|
|
6
7
|
from pyBADA import conversions as conv
|
|
7
|
-
from pyBADA import atmosphere as atm
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
def checkArgument(argument, **kwargs):
|
|
@@ -211,13 +211,13 @@ class Airplane:
|
|
|
211
211
|
"""Computes the energy share factor based on flight conditions.
|
|
212
212
|
|
|
213
213
|
:param h: Altitude in meters.
|
|
214
|
-
:param
|
|
214
|
+
:param deltaTemp: Temperature deviation with respect to ISA in Kelvin.
|
|
215
215
|
:param flightEvolution: Type of flight evolution
|
|
216
216
|
[constM/constCAS/acc/dec].
|
|
217
217
|
:param phase: Phase of flight [cl/des].
|
|
218
218
|
:param v: Constant speed (Mach number).
|
|
219
219
|
:type h: float
|
|
220
|
-
:type
|
|
220
|
+
:type deltaTemp: float
|
|
221
221
|
:type flightEvolution: str
|
|
222
222
|
:type phase: str
|
|
223
223
|
:type v: float
|
|
@@ -251,9 +251,9 @@ class Airplane:
|
|
|
251
251
|
# constant M below or at tropopause
|
|
252
252
|
elif flightEvolution == "constM" and h <= const.h_11:
|
|
253
253
|
M = checkArgument("M", **kwargs)
|
|
254
|
-
|
|
254
|
+
deltaTemp = checkArgument("deltaTemp", **kwargs)
|
|
255
255
|
|
|
256
|
-
temp = atm.theta(h,
|
|
256
|
+
temp = atm.theta(h, deltaTemp) * const.temp_0
|
|
257
257
|
ESF = 1 / (
|
|
258
258
|
1
|
|
259
259
|
+ (
|
|
@@ -264,15 +264,15 @@ class Airplane:
|
|
|
264
264
|
* M
|
|
265
265
|
/ (2 * const.g)
|
|
266
266
|
)
|
|
267
|
-
* ((temp -
|
|
267
|
+
* ((temp - deltaTemp) / temp)
|
|
268
268
|
)
|
|
269
269
|
|
|
270
270
|
# constant CAS below or at tropopause
|
|
271
271
|
elif flightEvolution == "constCAS" and h <= const.h_11:
|
|
272
272
|
M = checkArgument("M", **kwargs)
|
|
273
|
-
|
|
273
|
+
deltaTemp = checkArgument("deltaTemp", **kwargs)
|
|
274
274
|
|
|
275
|
-
temp = atm.theta(h,
|
|
275
|
+
temp = atm.theta(h, deltaTemp) * const.temp_0
|
|
276
276
|
A = (
|
|
277
277
|
const.Agamma
|
|
278
278
|
* const.R
|
|
@@ -280,7 +280,7 @@ class Airplane:
|
|
|
280
280
|
* M
|
|
281
281
|
* M
|
|
282
282
|
/ (2 * const.g)
|
|
283
|
-
) * ((temp -
|
|
283
|
+
) * ((temp - deltaTemp) / temp)
|
|
284
284
|
B = pow(
|
|
285
285
|
1 + (const.Agamma - 1) * M * M / 2, -1 / (const.Agamma - 1)
|
|
286
286
|
)
|
|
@@ -331,13 +331,13 @@ class Helicopter:
|
|
|
331
331
|
"""Computes the energy share factor based on flight conditions.
|
|
332
332
|
|
|
333
333
|
:param h: Altitude in meters.
|
|
334
|
-
:param
|
|
334
|
+
:param deltaTemp: Temperature deviation with respect to ISA in Kelvin.
|
|
335
335
|
:param flightEvolution: Type of flight evolution
|
|
336
336
|
[constTAS/constCAS/acc/dec].
|
|
337
337
|
:param phase: Phase of flight [Climb/Descent].
|
|
338
338
|
:param v: Constant speed (Mach number).
|
|
339
339
|
:type h: float
|
|
340
|
-
:type
|
|
340
|
+
:type deltaTemp: float
|
|
341
341
|
:type flightEvolution: str
|
|
342
342
|
:type phase: str
|
|
343
343
|
:type v: float
|
|
@@ -366,9 +366,9 @@ class Helicopter:
|
|
|
366
366
|
if flightEvolution == "constCAS":
|
|
367
367
|
h = checkArgument("h", **kwargs)
|
|
368
368
|
M = checkArgument("M", **kwargs)
|
|
369
|
-
|
|
369
|
+
deltaTemp = checkArgument("deltaTemp", **kwargs)
|
|
370
370
|
|
|
371
|
-
theta = atm.theta(h,
|
|
371
|
+
theta = atm.theta(h, deltaTemp)
|
|
372
372
|
temp = theta * const.temp_0
|
|
373
373
|
|
|
374
374
|
A = (
|
|
@@ -378,7 +378,7 @@ class Helicopter:
|
|
|
378
378
|
* M
|
|
379
379
|
* M
|
|
380
380
|
/ (2 * const.g)
|
|
381
|
-
) * ((temp -
|
|
381
|
+
) * ((temp - deltaTemp) / temp)
|
|
382
382
|
B = pow(
|
|
383
383
|
1 + (const.Agamma - 1) * M * M / 2, -1 / (const.Agamma - 1)
|
|
384
384
|
)
|