pyBADA 0.1.2__py3-none-any.whl → 0.1.3__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 +198 -38
- pyBADA/aircraft.py +0 -3
- pyBADA/atmosphere.py +0 -3
- pyBADA/bada3.py +1 -4
- pyBADA/bada4.py +3 -0
- pyBADA/badaH.py +3 -4
- pyBADA/configuration.py +0 -3
- pyBADA/constants.py +0 -3
- pyBADA/conversions.py +0 -3
- pyBADA/flightTrajectory.py +78 -22
- pyBADA/geodesic.py +0 -3
- pyBADA/magnetic.py +0 -3
- pyBADA/trajectoryPrediction.py +174 -141
- pybada-0.1.3.dist-info/METADATA +83 -0
- {pybada-0.1.2.dist-info → pybada-0.1.3.dist-info}/RECORD +18 -18
- {pybada-0.1.2.dist-info → pybada-0.1.3.dist-info}/WHEEL +1 -1
- pybada-0.1.2.dist-info/METADATA +0 -70
- {pybada-0.1.2.dist-info → pybada-0.1.3.dist-info}/licenses/AUTHORS +0 -0
- {pybada-0.1.2.dist-info → pybada-0.1.3.dist-info}/licenses/LICENCE.txt +0 -0
pyBADA/TCL.py
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
"""
|
|
3
|
-
pyBADA
|
|
4
3
|
Trajectory Computation Light (TCL) for BADAH/BADAE/BADA3/BADA4 aircraft performance module
|
|
5
|
-
Developped @EUROCONTROL (EIH)
|
|
6
|
-
2024
|
|
7
4
|
"""
|
|
8
5
|
|
|
9
6
|
import os
|
|
@@ -96,13 +93,12 @@ def constantSpeedLevel(
|
|
|
96
93
|
:param magneticDeclinationGrid: Optional magnetic declination grid to correct headings. Default is None.
|
|
97
94
|
:param kwargs: Additional optional parameters:
|
|
98
95
|
|
|
99
|
-
- mass_const: Boolean. If True, keeps the aircraft mass constant during the segment. Default is False.
|
|
100
96
|
- SOC_init: Initial battery state of charge for electric aircraft [%]. Default is 100 for BADAE.
|
|
101
97
|
- speedBrakes: Dictionary defining whether speed brakes are deployed and their drag coefficient {deployed: False, value: 0.03}.
|
|
102
98
|
- ROCD_min: Minimum rate of climb/descent threshold to identify service ceiling [ft/min]. Default varies by aircraft type.
|
|
103
99
|
- config: Default aerodynamic configuration. Values: TO, IC, CR, AP, LD.
|
|
104
100
|
- HpStep: Altitude step for step climb [ft]. Default is 2000 ft.
|
|
105
|
-
-
|
|
101
|
+
- calculationType: String indicating whether calculation is performed as INTEGRATED or POINT. Default is INTEGRATED.
|
|
106
102
|
- step_length: The step length for each iteration in [NM] or [s], depending on the lengthType. Default is 100 NM for BADA3/4 and 10 NM for BADAH/BADAE.
|
|
107
103
|
|
|
108
104
|
:returns: A pandas DataFrame containing the flight trajectory with columns such as:
|
|
@@ -190,7 +186,12 @@ def constantSpeedLevel(
|
|
|
190
186
|
raise Exception("Undefined Heading value combination")
|
|
191
187
|
|
|
192
188
|
# calculation with constant mass (True) or integrated (False)
|
|
193
|
-
|
|
189
|
+
calculationType = kwargs.get("calculationType", "INTEGRATED")
|
|
190
|
+
|
|
191
|
+
if calculationType == "INTEGRATED":
|
|
192
|
+
mass_const = False
|
|
193
|
+
if calculationType == "POINT":
|
|
194
|
+
mass_const = True
|
|
194
195
|
|
|
195
196
|
# optional parameter to define initial Baterry State of Charge (SOC)
|
|
196
197
|
if AC.BADAFamily.BADAE:
|
|
@@ -1166,6 +1167,7 @@ def constantSpeedLevel(
|
|
|
1166
1167
|
}
|
|
1167
1168
|
|
|
1168
1169
|
flightTrajectory = FT.createFlightTrajectoryDataframe(flightData)
|
|
1170
|
+
|
|
1169
1171
|
return flightTrajectory
|
|
1170
1172
|
|
|
1171
1173
|
|
|
@@ -1228,7 +1230,7 @@ def constantSpeedROCD(
|
|
|
1228
1230
|
- speedBrakes: Dictionary specifying whether speed brakes are deployed and their drag coefficient {deployed: False, value: 0.03}.
|
|
1229
1231
|
- ROCD_min: Minimum ROCD to identify the service ceiling [ft/min]. Default varies by aircraft type.
|
|
1230
1232
|
- config: Default aerodynamic configuration. Values: TO, IC, CR, AP, LD. Default is None.
|
|
1231
|
-
-
|
|
1233
|
+
- calculationType: String indicating whether calculation is performed as INTEGRATED or POINT. Default is INTEGRATED.
|
|
1232
1234
|
- m_iter: Number of iterations for the mass integration loop. Default is 5.
|
|
1233
1235
|
|
|
1234
1236
|
:returns: A pandas DataFrame containing the flight trajectory with columns such as:
|
|
@@ -1317,7 +1319,12 @@ def constantSpeedROCD(
|
|
|
1317
1319
|
raise Exception("Undefined Heading value combination")
|
|
1318
1320
|
|
|
1319
1321
|
# calculation with constant mass (True) or integrated (False)
|
|
1320
|
-
|
|
1322
|
+
calculationType = kwargs.get("calculationType", "INTEGRATED")
|
|
1323
|
+
|
|
1324
|
+
if calculationType == "INTEGRATED":
|
|
1325
|
+
mass_const = False
|
|
1326
|
+
if calculationType == "POINT":
|
|
1327
|
+
mass_const = True
|
|
1321
1328
|
|
|
1322
1329
|
# optional parameter to define initial Baterry State of Charge (SOC)
|
|
1323
1330
|
if AC.BADAFamily.BADAE:
|
|
@@ -1479,6 +1486,25 @@ def constantSpeedROCD(
|
|
|
1479
1486
|
)
|
|
1480
1487
|
|
|
1481
1488
|
# aircraft speed
|
|
1489
|
+
if calculationType == "POINT" and AC.BADAFamily.BADAH:
|
|
1490
|
+
[
|
|
1491
|
+
Pav_POINT,
|
|
1492
|
+
Peng_POINT,
|
|
1493
|
+
Preq_POINT,
|
|
1494
|
+
tas_POINT,
|
|
1495
|
+
ROCD_POINT,
|
|
1496
|
+
ESF_POINT,
|
|
1497
|
+
limitation_POINT,
|
|
1498
|
+
] = AC.ARPM.ARPMProcedure(
|
|
1499
|
+
phase=phase,
|
|
1500
|
+
h=H_m,
|
|
1501
|
+
DeltaTemp=DeltaTemp,
|
|
1502
|
+
mass=mass[-1],
|
|
1503
|
+
rating="ARPM",
|
|
1504
|
+
)
|
|
1505
|
+
v = conv.ms2kt(tas_POINT)
|
|
1506
|
+
speedType = "TAS"
|
|
1507
|
+
|
|
1482
1508
|
[M_i, CAS_i, TAS_i] = atm.convertSpeed(
|
|
1483
1509
|
v=v, speedType=speedType, theta=theta, delta=delta, sigma=sigma
|
|
1484
1510
|
)
|
|
@@ -2180,6 +2206,7 @@ def constantSpeedROCD(
|
|
|
2180
2206
|
}
|
|
2181
2207
|
|
|
2182
2208
|
flightTrajectory = FT.createFlightTrajectoryDataframe(flightData)
|
|
2209
|
+
|
|
2183
2210
|
return flightTrajectory
|
|
2184
2211
|
|
|
2185
2212
|
|
|
@@ -2242,7 +2269,7 @@ def constantSpeedROCD_time(
|
|
|
2242
2269
|
- speedBrakes: Dictionary specifying whether speed brakes are deployed and their drag coefficient {deployed: False, value: 0.03}.
|
|
2243
2270
|
- ROCD_min: Minimum ROCD to identify the service ceiling [ft/min]. Default varies by aircraft type.
|
|
2244
2271
|
- config: Default aerodynamic configuration. Values: TO, IC, CR, AP, LD. Default is None.
|
|
2245
|
-
-
|
|
2272
|
+
- calculationType: String indicating whether calculation is performed as INTEGRATED or POINT. Default is INTEGRATED.
|
|
2246
2273
|
- m_iter: Number of iterations for the mass integration loop. Default is 5.
|
|
2247
2274
|
|
|
2248
2275
|
:returns: A pandas DataFrame containing the flight trajectory with columns such as:
|
|
@@ -2326,7 +2353,12 @@ def constantSpeedROCD_time(
|
|
|
2326
2353
|
raise Exception("Undefined Heading value combination")
|
|
2327
2354
|
|
|
2328
2355
|
# calculation with constant mass (True) or integrated (False)
|
|
2329
|
-
|
|
2356
|
+
calculationType = kwargs.get("calculationType", "INTEGRATED")
|
|
2357
|
+
|
|
2358
|
+
if calculationType == "INTEGRATED":
|
|
2359
|
+
mass_const = False
|
|
2360
|
+
if calculationType == "POINT":
|
|
2361
|
+
mass_const = True
|
|
2330
2362
|
|
|
2331
2363
|
# optional parameter to define initial Baterry State of Charge (SOC)
|
|
2332
2364
|
if AC.BADAFamily.BADAE:
|
|
@@ -2482,6 +2514,25 @@ def constantSpeedROCD_time(
|
|
|
2482
2514
|
)
|
|
2483
2515
|
|
|
2484
2516
|
# aircraft speed
|
|
2517
|
+
if calculationType == "POINT" and AC.BADAFamily.BADAH:
|
|
2518
|
+
[
|
|
2519
|
+
Pav_POINT,
|
|
2520
|
+
Peng_POINT,
|
|
2521
|
+
Preq_POINT,
|
|
2522
|
+
tas_POINT,
|
|
2523
|
+
ROCD_POINT,
|
|
2524
|
+
ESF_POINT,
|
|
2525
|
+
limitation_POINT,
|
|
2526
|
+
] = AC.ARPM.ARPMProcedure(
|
|
2527
|
+
phase=phase,
|
|
2528
|
+
h=H_m,
|
|
2529
|
+
DeltaTemp=DeltaTemp,
|
|
2530
|
+
mass=mass[-1],
|
|
2531
|
+
rating="ARPM",
|
|
2532
|
+
)
|
|
2533
|
+
v = conv.ms2kt(tas_POINT)
|
|
2534
|
+
speedType = "TAS"
|
|
2535
|
+
|
|
2485
2536
|
[M_i, CAS_i, TAS_i] = atm.convertSpeed(
|
|
2486
2537
|
v=v, speedType=speedType, theta=theta, delta=delta, sigma=sigma
|
|
2487
2538
|
)
|
|
@@ -3172,6 +3223,7 @@ def constantSpeedROCD_time(
|
|
|
3172
3223
|
}
|
|
3173
3224
|
|
|
3174
3225
|
flightTrajectory = FT.createFlightTrajectoryDataframe(flightData)
|
|
3226
|
+
|
|
3175
3227
|
return flightTrajectory
|
|
3176
3228
|
|
|
3177
3229
|
|
|
@@ -3233,7 +3285,7 @@ def constantSpeedSlope(
|
|
|
3233
3285
|
- speedBrakes: A dictionary specifying whether speed brakes are deployed and the additional drag coefficient {deployed: False, value: 0.03}.
|
|
3234
3286
|
- ROCD_min: Minimum rate of climb/descent used to determine service ceiling [ft/min]. Default varies based on aircraft type.
|
|
3235
3287
|
- config: Default aerodynamic configuration (TO, IC, CR, AP, LD). Default is None.
|
|
3236
|
-
-
|
|
3288
|
+
- calculationType: String indicating whether calculation is performed as INTEGRATED or POINT. Default is INTEGRATED.
|
|
3237
3289
|
- m_iter: Number of iterations for the mass integration loop. Default is 5.
|
|
3238
3290
|
|
|
3239
3291
|
:returns: A pandas DataFrame containing the flight trajectory with columns such as:
|
|
@@ -3317,7 +3369,12 @@ def constantSpeedSlope(
|
|
|
3317
3369
|
raise Exception("Undefined Heading value combination")
|
|
3318
3370
|
|
|
3319
3371
|
# calculation with constant mass (True) or integrated (False)
|
|
3320
|
-
|
|
3372
|
+
calculationType = kwargs.get("calculationType", "INTEGRATED")
|
|
3373
|
+
|
|
3374
|
+
if calculationType == "INTEGRATED":
|
|
3375
|
+
mass_const = False
|
|
3376
|
+
if calculationType == "POINT":
|
|
3377
|
+
mass_const = True
|
|
3321
3378
|
|
|
3322
3379
|
# optional parameter to define initial Baterry State of Charge (SOC)
|
|
3323
3380
|
if AC.BADAFamily.BADAE:
|
|
@@ -3473,6 +3530,25 @@ def constantSpeedSlope(
|
|
|
3473
3530
|
)
|
|
3474
3531
|
|
|
3475
3532
|
# aircraft speed
|
|
3533
|
+
if calculationType == "POINT" and AC.BADAFamily.BADAH:
|
|
3534
|
+
[
|
|
3535
|
+
Pav_POINT,
|
|
3536
|
+
Peng_POINT,
|
|
3537
|
+
Preq_POINT,
|
|
3538
|
+
tas_POINT,
|
|
3539
|
+
ROCD_POINT,
|
|
3540
|
+
ESF_POINT,
|
|
3541
|
+
limitation_POINT,
|
|
3542
|
+
] = AC.ARPM.ARPMProcedure(
|
|
3543
|
+
phase=phase,
|
|
3544
|
+
h=H_m,
|
|
3545
|
+
DeltaTemp=DeltaTemp,
|
|
3546
|
+
mass=mass[-1],
|
|
3547
|
+
rating="ARPM",
|
|
3548
|
+
)
|
|
3549
|
+
v = conv.ms2kt(tas_POINT)
|
|
3550
|
+
speedType = "TAS"
|
|
3551
|
+
|
|
3476
3552
|
[M_i, CAS_i, TAS_i] = atm.convertSpeed(
|
|
3477
3553
|
v=v, speedType=speedType, theta=theta, delta=delta, sigma=sigma
|
|
3478
3554
|
)
|
|
@@ -4178,6 +4254,7 @@ def constantSpeedSlope(
|
|
|
4178
4254
|
}
|
|
4179
4255
|
|
|
4180
4256
|
flightTrajectory = FT.createFlightTrajectoryDataframe(flightData)
|
|
4257
|
+
|
|
4181
4258
|
return flightTrajectory
|
|
4182
4259
|
|
|
4183
4260
|
|
|
@@ -4237,7 +4314,7 @@ def constantSpeedSlope_time(
|
|
|
4237
4314
|
- config: Default aerodynamic configuration {TO, IC, CR, AP, LD}. If not provided, configuration is calculated automatically.
|
|
4238
4315
|
- speedBrakes: Dictionary specifying if speed brakes are deployed and additional drag coefficient {deployed: False, value: 0.03}.
|
|
4239
4316
|
- ROCD_min: Minimum Rate of Climb/Descent to determine service ceiling [ft/min]. Defaults depend on aircraft type and engine.
|
|
4240
|
-
-
|
|
4317
|
+
- calculationType: String indicating whether calculation is performed as INTEGRATED or POINT. Default is INTEGRATED.
|
|
4241
4318
|
- m_iter: Number of iterations for mass integration. Default is 5.
|
|
4242
4319
|
|
|
4243
4320
|
:returns: A pandas DataFrame containing the flight trajectory with columns such as:
|
|
@@ -4321,7 +4398,12 @@ def constantSpeedSlope_time(
|
|
|
4321
4398
|
raise Exception("Undefined Heading value combination")
|
|
4322
4399
|
|
|
4323
4400
|
# calculation with constant mass (True) or integrated (False)
|
|
4324
|
-
|
|
4401
|
+
calculationType = kwargs.get("calculationType", "INTEGRATED")
|
|
4402
|
+
|
|
4403
|
+
if calculationType == "INTEGRATED":
|
|
4404
|
+
mass_const = False
|
|
4405
|
+
if calculationType == "POINT":
|
|
4406
|
+
mass_const = True
|
|
4325
4407
|
|
|
4326
4408
|
# optional parameter to define initial Baterry State of Charge (SOC)
|
|
4327
4409
|
if AC.BADAFamily.BADAE:
|
|
@@ -4473,6 +4555,25 @@ def constantSpeedSlope_time(
|
|
|
4473
4555
|
)
|
|
4474
4556
|
|
|
4475
4557
|
# aircraft speed
|
|
4558
|
+
if calculationType == "POINT" and AC.BADAFamily.BADAH:
|
|
4559
|
+
[
|
|
4560
|
+
Pav_POINT,
|
|
4561
|
+
Peng_POINT,
|
|
4562
|
+
Preq_POINT,
|
|
4563
|
+
tas_POINT,
|
|
4564
|
+
ROCD_POINT,
|
|
4565
|
+
ESF_POINT,
|
|
4566
|
+
limitation_POINT,
|
|
4567
|
+
] = AC.ARPM.ARPMProcedure(
|
|
4568
|
+
phase=phase,
|
|
4569
|
+
h=H_m,
|
|
4570
|
+
DeltaTemp=DeltaTemp,
|
|
4571
|
+
mass=mass[-1],
|
|
4572
|
+
rating="ARPM",
|
|
4573
|
+
)
|
|
4574
|
+
v = conv.ms2kt(tas_POINT)
|
|
4575
|
+
speedType = "TAS"
|
|
4576
|
+
|
|
4476
4577
|
[M_i, CAS_i, TAS_i] = atm.convertSpeed(
|
|
4477
4578
|
v=v, speedType=speedType, theta=theta, delta=delta, sigma=sigma
|
|
4478
4579
|
)
|
|
@@ -5175,6 +5276,7 @@ def constantSpeedSlope_time(
|
|
|
5175
5276
|
}
|
|
5176
5277
|
|
|
5177
5278
|
flightTrajectory = FT.createFlightTrajectoryDataframe(flightData)
|
|
5279
|
+
|
|
5178
5280
|
return flightTrajectory
|
|
5179
5281
|
|
|
5180
5282
|
|
|
@@ -5237,7 +5339,7 @@ def constantSpeedRating(
|
|
|
5237
5339
|
- speedBrakes: A dictionary specifying whether speed brakes are deployed and the additional drag coefficient {deployed: False, value: 0.03}.
|
|
5238
5340
|
- ROCD_min: Minimum rate of climb/descent used to determine service ceiling [ft/min]. Default varies based on aircraft type.
|
|
5239
5341
|
- config: Default aerodynamic configuration (TO, IC, CR, AP, LD). Default is None.
|
|
5240
|
-
-
|
|
5342
|
+
- calculationType: String indicating whether calculation is performed as INTEGRATED or POINT. Default is INTEGRATED.
|
|
5241
5343
|
- m_iter: Number of iterations for the mass integration loop. Default is 5.
|
|
5242
5344
|
|
|
5243
5345
|
:returns: A pandas DataFrame containing the flight trajectory with columns such as:
|
|
@@ -5321,7 +5423,12 @@ def constantSpeedRating(
|
|
|
5321
5423
|
raise Exception("Undefined Heading value combination")
|
|
5322
5424
|
|
|
5323
5425
|
# calculation with constant mass (True) or integrated (False)
|
|
5324
|
-
|
|
5426
|
+
calculationType = kwargs.get("calculationType", "INTEGRATED")
|
|
5427
|
+
|
|
5428
|
+
if calculationType == "INTEGRATED":
|
|
5429
|
+
mass_const = False
|
|
5430
|
+
if calculationType == "POINT":
|
|
5431
|
+
mass_const = True
|
|
5325
5432
|
|
|
5326
5433
|
# optional parameter to define initial Baterry State of Charge (SOC)
|
|
5327
5434
|
if AC.BADAFamily.BADAE:
|
|
@@ -5504,6 +5611,25 @@ def constantSpeedRating(
|
|
|
5504
5611
|
)
|
|
5505
5612
|
|
|
5506
5613
|
# aircraft speed
|
|
5614
|
+
if calculationType == "POINT" and AC.BADAFamily.BADAH:
|
|
5615
|
+
[
|
|
5616
|
+
Pav_POINT,
|
|
5617
|
+
Peng_POINT,
|
|
5618
|
+
Preq_POINT,
|
|
5619
|
+
tas_POINT,
|
|
5620
|
+
ROCD_POINT,
|
|
5621
|
+
ESF_POINT,
|
|
5622
|
+
limitation_POINT,
|
|
5623
|
+
] = AC.ARPM.ARPMProcedure(
|
|
5624
|
+
phase=phase,
|
|
5625
|
+
h=H_m,
|
|
5626
|
+
DeltaTemp=DeltaTemp,
|
|
5627
|
+
mass=mass[-1],
|
|
5628
|
+
rating=rating,
|
|
5629
|
+
)
|
|
5630
|
+
v = conv.ms2kt(tas_POINT)
|
|
5631
|
+
speedType = "TAS"
|
|
5632
|
+
|
|
5507
5633
|
[M_i, CAS_i, TAS_i] = atm.convertSpeed(
|
|
5508
5634
|
v=v, speedType=speedType, theta=theta, delta=delta, sigma=sigma
|
|
5509
5635
|
)
|
|
@@ -5580,9 +5706,12 @@ def constantSpeedRating(
|
|
|
5580
5706
|
M=M_i,
|
|
5581
5707
|
DeltaTemp=DeltaTemp,
|
|
5582
5708
|
) # [N]
|
|
5583
|
-
CT = AC.CT(Thrust=THR_i, delta=delta)
|
|
5584
5709
|
FUEL_i = AC.ff(
|
|
5585
|
-
|
|
5710
|
+
rating=rating,
|
|
5711
|
+
delta=delta,
|
|
5712
|
+
theta=theta,
|
|
5713
|
+
M=M_i,
|
|
5714
|
+
DeltaTemp=DeltaTemp,
|
|
5586
5715
|
)
|
|
5587
5716
|
|
|
5588
5717
|
# BADA3
|
|
@@ -5616,12 +5745,7 @@ def constantSpeedRating(
|
|
|
5616
5745
|
DeltaTemp=DeltaTemp,
|
|
5617
5746
|
)
|
|
5618
5747
|
FUEL_i = AC.ff(
|
|
5619
|
-
flightPhase=phase,
|
|
5620
|
-
v=TAS_i,
|
|
5621
|
-
h=H_m,
|
|
5622
|
-
T=THR_i,
|
|
5623
|
-
config=config_i,
|
|
5624
|
-
adapted=True,
|
|
5748
|
+
flightPhase=phase, v=TAS_i, h=H_m, T=THR_i, config=config_i
|
|
5625
5749
|
)
|
|
5626
5750
|
|
|
5627
5751
|
if Hp_i != Hp_init: # exclude first point: initial m already known
|
|
@@ -6095,6 +6219,7 @@ def constantSpeedRating(
|
|
|
6095
6219
|
}
|
|
6096
6220
|
|
|
6097
6221
|
flightTrajectory = FT.createFlightTrajectoryDataframe(flightData)
|
|
6222
|
+
|
|
6098
6223
|
return flightTrajectory
|
|
6099
6224
|
|
|
6100
6225
|
|
|
@@ -6160,7 +6285,7 @@ def constantSpeedRating_time(
|
|
|
6160
6285
|
- speedBrakes: A dictionary specifying whether speed brakes are deployed and the additional drag coefficient {deployed: False, value: 0.03}.
|
|
6161
6286
|
- ROCD_min: Minimum rate of climb/descent to determine service ceiling [ft/min]. Default varies by aircraft type.
|
|
6162
6287
|
- config: Default aerodynamic configuration (TO, IC, CR, AP, LD). Default is None.
|
|
6163
|
-
-
|
|
6288
|
+
- calculationType: String indicating whether calculation is performed as INTEGRATED or POINT. Default is INTEGRATED.
|
|
6164
6289
|
- m_iter: Number of iterations for the mass integration loop. Default is 5.
|
|
6165
6290
|
|
|
6166
6291
|
:returns: A pandas DataFrame containing the flight trajectory with columns such as:
|
|
@@ -6244,7 +6369,12 @@ def constantSpeedRating_time(
|
|
|
6244
6369
|
raise Exception("Undefined Heading value combination")
|
|
6245
6370
|
|
|
6246
6371
|
# calculation with constant mass (True) or integrated (False)
|
|
6247
|
-
|
|
6372
|
+
calculationType = kwargs.get("calculationType", "INTEGRATED")
|
|
6373
|
+
|
|
6374
|
+
if calculationType == "INTEGRATED":
|
|
6375
|
+
mass_const = False
|
|
6376
|
+
if calculationType == "POINT":
|
|
6377
|
+
mass_const = True
|
|
6248
6378
|
|
|
6249
6379
|
# optional parameter to define initial Baterry State of Charge (SOC)
|
|
6250
6380
|
if AC.BADAFamily.BADAE:
|
|
@@ -6430,6 +6560,25 @@ def constantSpeedRating_time(
|
|
|
6430
6560
|
)
|
|
6431
6561
|
|
|
6432
6562
|
# aircraft speed
|
|
6563
|
+
if calculationType == "POINT" and AC.BADAFamily.BADAH:
|
|
6564
|
+
[
|
|
6565
|
+
Pav_POINT,
|
|
6566
|
+
Peng_POINT,
|
|
6567
|
+
Preq_POINT,
|
|
6568
|
+
tas_POINT,
|
|
6569
|
+
ROCD_POINT,
|
|
6570
|
+
ESF_POINT,
|
|
6571
|
+
limitation_POINT,
|
|
6572
|
+
] = AC.ARPM.ARPMProcedure(
|
|
6573
|
+
phase=phase,
|
|
6574
|
+
h=H_m,
|
|
6575
|
+
DeltaTemp=DeltaTemp,
|
|
6576
|
+
mass=mass[-1],
|
|
6577
|
+
rating=rating,
|
|
6578
|
+
)
|
|
6579
|
+
v = conv.ms2kt(tas_POINT)
|
|
6580
|
+
speedType = "TAS"
|
|
6581
|
+
|
|
6433
6582
|
[M_i, CAS_i, TAS_i] = atm.convertSpeed(
|
|
6434
6583
|
v=v, speedType=speedType, theta=theta, delta=delta, sigma=sigma
|
|
6435
6584
|
)
|
|
@@ -6508,9 +6657,12 @@ def constantSpeedRating_time(
|
|
|
6508
6657
|
M=M_i,
|
|
6509
6658
|
DeltaTemp=DeltaTemp,
|
|
6510
6659
|
) # [N]
|
|
6511
|
-
CT = AC.CT(Thrust=THR_i, delta=delta)
|
|
6512
6660
|
FUEL_i = AC.ff(
|
|
6513
|
-
|
|
6661
|
+
rating=rating,
|
|
6662
|
+
delta=delta,
|
|
6663
|
+
theta=theta,
|
|
6664
|
+
M=M_i,
|
|
6665
|
+
DeltaTemp=DeltaTemp,
|
|
6514
6666
|
)
|
|
6515
6667
|
|
|
6516
6668
|
# BADA3
|
|
@@ -6544,12 +6696,7 @@ def constantSpeedRating_time(
|
|
|
6544
6696
|
DeltaTemp=DeltaTemp,
|
|
6545
6697
|
)
|
|
6546
6698
|
FUEL_i = AC.ff(
|
|
6547
|
-
flightPhase=phase,
|
|
6548
|
-
v=TAS_i,
|
|
6549
|
-
h=H_m,
|
|
6550
|
-
T=THR_i,
|
|
6551
|
-
config=config_i,
|
|
6552
|
-
adapted=False,
|
|
6699
|
+
flightPhase=phase, v=TAS_i, h=H_m, T=THR_i, config=config_i
|
|
6553
6700
|
) # MCMB(climb) or IDLE(descent)
|
|
6554
6701
|
|
|
6555
6702
|
# BADAH or BADAE
|
|
@@ -7008,6 +7155,7 @@ def constantSpeedRating_time(
|
|
|
7008
7155
|
}
|
|
7009
7156
|
|
|
7010
7157
|
flightTrajectory = FT.createFlightTrajectoryDataframe(flightData)
|
|
7158
|
+
|
|
7011
7159
|
return flightTrajectory
|
|
7012
7160
|
|
|
7013
7161
|
|
|
@@ -7082,7 +7230,7 @@ def accDec(
|
|
|
7082
7230
|
- speed_step: Speed step size for the iterative calculation [-] for M, [kt] for TAS/CAS. Default is 0.01 Mach, 5 kt for TAS/CAS.
|
|
7083
7231
|
- SOC_init: Initial battery state of charge for electric aircraft (BADAE) [%]. Default is 100.
|
|
7084
7232
|
- config: Default aerodynamic configuration (TO, IC, CR, AP, LD). Default is None.
|
|
7085
|
-
-
|
|
7233
|
+
- calculationType: String indicating whether calculation is performed as INTEGRATED or POINT. Default is INTEGRATED.
|
|
7086
7234
|
- m_iter: Number of iterations for the mass integration loop. Default is 10 for BADA3/4/H, 5 for BADAE.
|
|
7087
7235
|
|
|
7088
7236
|
:returns: A pandas DataFrame containing the flight trajectory with columns such as:
|
|
@@ -7166,7 +7314,12 @@ def accDec(
|
|
|
7166
7314
|
raise Exception("Undefined Heading value combination")
|
|
7167
7315
|
|
|
7168
7316
|
# calculation with constant mass (True) or integrated (False)
|
|
7169
|
-
|
|
7317
|
+
calculationType = kwargs.get("calculationType", "INTEGRATED")
|
|
7318
|
+
|
|
7319
|
+
if calculationType == "INTEGRATED":
|
|
7320
|
+
mass_const = False
|
|
7321
|
+
if calculationType == "POINT":
|
|
7322
|
+
mass_const = True
|
|
7170
7323
|
|
|
7171
7324
|
# optional parameter to define initial Baterry State of Charge (SOC)
|
|
7172
7325
|
if AC.BADAFamily.BADAE:
|
|
@@ -8283,6 +8436,7 @@ def accDec(
|
|
|
8283
8436
|
}
|
|
8284
8437
|
|
|
8285
8438
|
flightTrajectory = FT.createFlightTrajectoryDataframe(flightData)
|
|
8439
|
+
|
|
8286
8440
|
return flightTrajectory
|
|
8287
8441
|
|
|
8288
8442
|
|
|
@@ -8359,7 +8513,7 @@ def accDec_time(
|
|
|
8359
8513
|
- step_length: Length of each time step in the calculation [s]. Default is 1 second.
|
|
8360
8514
|
- SOC_init: Initial battery state of charge for electric aircraft (BADAE) [%]. Default is 100.
|
|
8361
8515
|
- config: Default aerodynamic configuration (TO, IC, CR, AP, LD). Default is None.
|
|
8362
|
-
-
|
|
8516
|
+
- calculationType: String indicating whether calculation is performed as INTEGRATED or POINT. Default is INTEGRATED.
|
|
8363
8517
|
- m_iter: Number of iterations for the mass integration loop. Default is 10 for BADA3/4/H, 5 for BADAE.
|
|
8364
8518
|
|
|
8365
8519
|
:returns: A pandas DataFrame containing the flight trajectory with columns such as:
|
|
@@ -8443,7 +8597,12 @@ def accDec_time(
|
|
|
8443
8597
|
raise Exception("Undefined Heading value combination")
|
|
8444
8598
|
|
|
8445
8599
|
# calculation with constant mass (True) or integrated (False)
|
|
8446
|
-
|
|
8600
|
+
calculationType = kwargs.get("calculationType", "INTEGRATED")
|
|
8601
|
+
|
|
8602
|
+
if calculationType == "INTEGRATED":
|
|
8603
|
+
mass_const = False
|
|
8604
|
+
if calculationType == "POINT":
|
|
8605
|
+
mass_const = True
|
|
8447
8606
|
|
|
8448
8607
|
# optional parameter to define initial Baterry State of Charge (SOC)
|
|
8449
8608
|
if AC.BADAFamily.BADAE:
|
|
@@ -9554,4 +9713,5 @@ def accDec_time(
|
|
|
9554
9713
|
}
|
|
9555
9714
|
|
|
9556
9715
|
flightTrajectory = FT.createFlightTrajectoryDataframe(flightData)
|
|
9716
|
+
|
|
9557
9717
|
return flightTrajectory
|
pyBADA/aircraft.py
CHANGED
pyBADA/atmosphere.py
CHANGED
pyBADA/bada3.py
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
"""
|
|
3
|
-
pyBADA
|
|
4
3
|
Generic BADA3 aircraft performance module
|
|
5
|
-
Developped @EUROCONTROL (EIH)
|
|
6
|
-
2024
|
|
7
4
|
"""
|
|
8
5
|
|
|
9
6
|
from math import sqrt, isnan, asin, atan
|
|
@@ -2270,7 +2267,7 @@ class FlightEnvelope(BADA3):
|
|
|
2270
2267
|
buffetLimit = self.lowSpeedBuffetLimit(
|
|
2271
2268
|
h=h, mass=mass, DeltaTemp=DeltaTemp, nz=nz
|
|
2272
2269
|
)
|
|
2273
|
-
if buffetLimit
|
|
2270
|
+
if isnan(buffetLimit):
|
|
2274
2271
|
Vmin = VminStall
|
|
2275
2272
|
else:
|
|
2276
2273
|
Vmin = max(
|
pyBADA/bada4.py
CHANGED
|
@@ -2116,6 +2116,9 @@ class FlightEnvelope(BADA4):
|
|
|
2116
2116
|
theta=theta, delta=delta, mass=mass, HLid=HLid, LG=LG, nz=1.0
|
|
2117
2117
|
)
|
|
2118
2118
|
|
|
2119
|
+
if VminCertified is None or VmaxCertified is None:
|
|
2120
|
+
return None
|
|
2121
|
+
|
|
2119
2122
|
maxCASList = []
|
|
2120
2123
|
for CAS in np.linspace(
|
|
2121
2124
|
VminCertified, VmaxCertified, num=200, endpoint=True
|
pyBADA/badaH.py
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
"""
|
|
3
|
-
pyBADA
|
|
4
3
|
Generic BADAH aircraft performance module
|
|
5
|
-
Developped @EUROCONTROL (EIH)
|
|
6
|
-
2024
|
|
7
4
|
"""
|
|
8
5
|
|
|
9
6
|
import xml.etree.ElementTree as ET
|
|
@@ -4136,7 +4133,9 @@ class BadaHAircraft(BADAH):
|
|
|
4136
4133
|
|
|
4137
4134
|
else:
|
|
4138
4135
|
# AC name cannot be found
|
|
4139
|
-
raise ValueError(
|
|
4136
|
+
raise ValueError(
|
|
4137
|
+
acName + " Cannot be found at: " + self.filePath
|
|
4138
|
+
)
|
|
4140
4139
|
|
|
4141
4140
|
def __str__(self):
|
|
4142
4141
|
return f"(BADAH, AC_name: {self.acName}, searched_AC_name: {self.SearchedACName}, model_ICAO: {self.ICAO}, ID: {id(self.AC)})"
|
pyBADA/configuration.py
CHANGED
pyBADA/constants.py
CHANGED