pyBADA 0.1.1__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 +589 -379
- pyBADA/aircraft.py +81 -134
- pyBADA/atmosphere.py +0 -3
- pyBADA/bada3.py +270 -316
- pyBADA/bada4.py +215 -260
- pyBADA/badaH.py +87 -173
- pyBADA/configuration.py +60 -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.1.dist-info → pybada-0.1.3.dist-info}/RECORD +18 -18
- {pybada-0.1.1.dist-info → pybada-0.1.3.dist-info}/WHEEL +1 -1
- pybada-0.1.1.dist-info/METADATA +0 -72
- {pybada-0.1.1.dist-info → pybada-0.1.3.dist-info}/licenses/AUTHORS +0 -0
- {pybada-0.1.1.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
|
|
@@ -80,6 +77,7 @@ def constantSpeedLevel(
|
|
|
80
77
|
:param maxRFL: Maximum cruise altitude limit [ft]. Default is infinity.
|
|
81
78
|
:param wS: Wind speed component along the longitudinal axis (positive for headwind, negative for tailwind) [kt]. Default is 0.0.
|
|
82
79
|
:param turnMetrics: Dictionary containing turn parameters:
|
|
80
|
+
|
|
83
81
|
- rateOfTurn [deg/s]
|
|
84
82
|
- bankAngle [deg]
|
|
85
83
|
- directionOfTurn {LEFT/RIGHT}. Default is no turn (straight flight).
|
|
@@ -87,70 +85,67 @@ def constantSpeedLevel(
|
|
|
87
85
|
:param Lat: Geographical latitude of the starting point [deg].
|
|
88
86
|
:param Lon: Geographical longitude of the starting point [deg].
|
|
89
87
|
:param initialHeading: Dictionary defining the initial heading and its type:
|
|
88
|
+
|
|
90
89
|
- magnetic: Magnetic heading [deg].
|
|
91
90
|
- true: True heading [deg].
|
|
92
91
|
- constantHeading: Whether to fly along a constant heading (loxodrome). Default is None.
|
|
93
92
|
:param flightPhase: Defines the phase of flight, e.g., "Cruise", "Climb", "Descent". Default is "Cruise".
|
|
94
93
|
:param magneticDeclinationGrid: Optional magnetic declination grid to correct headings. Default is None.
|
|
95
94
|
:param kwargs: Additional optional parameters:
|
|
96
|
-
|
|
95
|
+
|
|
97
96
|
- SOC_init: Initial battery state of charge for electric aircraft [%]. Default is 100 for BADAE.
|
|
98
97
|
- speedBrakes: Dictionary defining whether speed brakes are deployed and their drag coefficient {deployed: False, value: 0.03}.
|
|
99
98
|
- ROCD_min: Minimum rate of climb/descent threshold to identify service ceiling [ft/min]. Default varies by aircraft type.
|
|
100
99
|
- config: Default aerodynamic configuration. Values: TO, IC, CR, AP, LD.
|
|
101
100
|
- HpStep: Altitude step for step climb [ft]. Default is 2000 ft.
|
|
102
|
-
-
|
|
101
|
+
- calculationType: String indicating whether calculation is performed as INTEGRATED or POINT. Default is INTEGRATED.
|
|
103
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.
|
|
104
103
|
|
|
105
104
|
:returns: A pandas DataFrame containing the flight trajectory with columns such as:
|
|
106
|
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
-
|
|
114
|
-
-
|
|
115
|
-
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
-
|
|
123
|
-
-
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
-
-
|
|
128
|
-
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
-
|
|
134
|
-
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
-
|
|
138
|
-
-
|
|
139
|
-
-
|
|
140
|
-
-
|
|
141
|
-
|
|
105
|
+
|
|
106
|
+
- **Hp** - wAltitude [ft]
|
|
107
|
+
- **TAS** - True Air Speed [kt]
|
|
108
|
+
- **CAS** - Calibrated Air Speed [kt]
|
|
109
|
+
- **GS** - Ground Speed [kt]
|
|
110
|
+
- **M** - Mach number [-]
|
|
111
|
+
- **ROCD** - Rate of Climb/Descent [ft/min]
|
|
112
|
+
- **ESF** - Energy Share Factor [-]
|
|
113
|
+
- **FUEL** - Fuel flow [kg/s]
|
|
114
|
+
- **FUELCONSUMED** - Total fuel consumed [kg]
|
|
115
|
+
- **THR** - Thrust force [N]
|
|
116
|
+
- **DRAG** - Drag force [N]
|
|
117
|
+
- **time** - Elapsed time [s]
|
|
118
|
+
- **dist** - Distance flown [NM]
|
|
119
|
+
- **slope** - Trajectory slope [deg]
|
|
120
|
+
- **mass** - Aircraft mass [kg]
|
|
121
|
+
- **config** - Aerodynamic configuration
|
|
122
|
+
- **LAT** - Latitude [deg]
|
|
123
|
+
- **LON** - Longitude [deg]
|
|
124
|
+
- **HDGTrue** - True heading [deg]
|
|
125
|
+
- **HDGMagnetic** - Magnetic heading [deg]
|
|
126
|
+
- **BankAngle** - Bank angle [deg]
|
|
127
|
+
- **ROT** - Rate of turn [deg/s]
|
|
128
|
+
- **Comment** - Comments for each segment
|
|
129
|
+
|
|
130
|
+
- **For BADAH:**
|
|
131
|
+
- **Preq** - Required power [W]
|
|
132
|
+
- **Peng** - Generated power [W]
|
|
133
|
+
- **Pav** - Available power [W]
|
|
134
|
+
|
|
135
|
+
- **For BADAE (electric aircraft):**
|
|
136
|
+
- **Pmec** - Mechanical power [W]
|
|
137
|
+
- **Pelc** - Electrical power [W]
|
|
138
|
+
- **Pbat** - Power supplied by the battery [W]
|
|
139
|
+
- **SOCr** - Rate of battery state of charge depletion [%/h]
|
|
140
|
+
- **SOC** - Battery state of charge [%]
|
|
141
|
+
- **Ibat** - Battery current [A]
|
|
142
|
+
- **Vbat** - Battery voltage [V]
|
|
143
|
+
- **Vgbat** - Ground battery voltage [V]
|
|
142
144
|
:rtype: pandas.DataFrame
|
|
143
145
|
|
|
144
146
|
This function works by iteratively calculating the flight trajectory for a given segment of the flight,
|
|
145
147
|
taking into account the specified flight conditions, and updating the aircraft’s state (altitude, speed, fuel, etc.)
|
|
146
148
|
at each step of the iteration. The trajectory is returned as a DataFrame containing all relevant flight parameters.
|
|
147
|
-
|
|
148
|
-
Key considerations:
|
|
149
|
-
- Magnetic declination can be corrected based on the provided grid.
|
|
150
|
-
- Supports handling turns and constant heading navigation.
|
|
151
|
-
- Step climbs are optionally allowed if enabled.
|
|
152
|
-
- Takes into account wind speed and flight phase-specific configurations.
|
|
153
|
-
- Power and fuel consumption are calculated differently for each BADA family (BADAH and BADAE handle power instead of fuel in different ways).
|
|
154
149
|
"""
|
|
155
150
|
|
|
156
151
|
rateOfTurn = turnMetrics["rateOfTurn"]
|
|
@@ -191,7 +186,12 @@ def constantSpeedLevel(
|
|
|
191
186
|
raise Exception("Undefined Heading value combination")
|
|
192
187
|
|
|
193
188
|
# calculation with constant mass (True) or integrated (False)
|
|
194
|
-
|
|
189
|
+
calculationType = kwargs.get("calculationType", "INTEGRATED")
|
|
190
|
+
|
|
191
|
+
if calculationType == "INTEGRATED":
|
|
192
|
+
mass_const = False
|
|
193
|
+
if calculationType == "POINT":
|
|
194
|
+
mass_const = True
|
|
195
195
|
|
|
196
196
|
# optional parameter to define initial Baterry State of Charge (SOC)
|
|
197
197
|
if AC.BADAFamily.BADAE:
|
|
@@ -1167,6 +1167,7 @@ def constantSpeedLevel(
|
|
|
1167
1167
|
}
|
|
1168
1168
|
|
|
1169
1169
|
flightTrajectory = FT.createFlightTrajectoryDataframe(flightData)
|
|
1170
|
+
|
|
1170
1171
|
return flightTrajectory
|
|
1171
1172
|
|
|
1172
1173
|
|
|
@@ -1208,12 +1209,14 @@ def constantSpeedROCD(
|
|
|
1208
1209
|
:param DeltaTemp: Deviation from standard ISA temperature [K].
|
|
1209
1210
|
:param wS: Wind speed component along the longitudinal axis [kt]. Positive values for headwind, negative for tailwind. Default is 0.0.
|
|
1210
1211
|
:param turnMetrics: Dictionary defining turn parameters:
|
|
1212
|
+
|
|
1211
1213
|
- rateOfTurn [deg/s]
|
|
1212
1214
|
- bankAngle [deg]
|
|
1213
1215
|
- directionOfTurn {LEFT/RIGHT}. Default is straight flight.
|
|
1214
1216
|
:param Lat: Geographical latitude of the starting point [deg]. Default is None.
|
|
1215
1217
|
:param Lon: Geographical longitude of the starting point [deg]. Default is None.
|
|
1216
1218
|
:param initialHeading: Dictionary defining the initial heading (magnetic or true) and whether to fly a constant heading:
|
|
1219
|
+
|
|
1217
1220
|
- magnetic: Magnetic heading [deg].
|
|
1218
1221
|
- true: True heading [deg].
|
|
1219
1222
|
- constantHeading: Whether to fly along a constant heading (loxodrome). Default is None.
|
|
@@ -1221,51 +1224,55 @@ def constantSpeedROCD(
|
|
|
1221
1224
|
:param directionOfTurn: Direction of the turn {LEFT, RIGHT}. Default is None.
|
|
1222
1225
|
:param magneticDeclinationGrid: Optional grid of magnetic declinations used to correct headings. Default is None.
|
|
1223
1226
|
:param kwargs: Additional optional parameters:
|
|
1227
|
+
|
|
1224
1228
|
- Hp_step: Altitude step size [ft]. Default is 1000 for BADA3/4, 500 for BADAH/BADAE.
|
|
1225
1229
|
- SOC_init: Initial state of charge for electric aircraft [%]. Default is 100 for BADAE.
|
|
1226
1230
|
- speedBrakes: Dictionary specifying whether speed brakes are deployed and their drag coefficient {deployed: False, value: 0.03}.
|
|
1227
1231
|
- ROCD_min: Minimum ROCD to identify the service ceiling [ft/min]. Default varies by aircraft type.
|
|
1228
1232
|
- config: Default aerodynamic configuration. Values: TO, IC, CR, AP, LD. Default is None.
|
|
1229
|
-
-
|
|
1233
|
+
- calculationType: String indicating whether calculation is performed as INTEGRATED or POINT. Default is INTEGRATED.
|
|
1230
1234
|
- m_iter: Number of iterations for the mass integration loop. Default is 5.
|
|
1231
1235
|
|
|
1232
|
-
:returns: A pandas DataFrame containing the flight trajectory
|
|
1233
|
-
|
|
1234
|
-
-
|
|
1235
|
-
-
|
|
1236
|
-
-
|
|
1237
|
-
-
|
|
1238
|
-
-
|
|
1239
|
-
-
|
|
1240
|
-
-
|
|
1241
|
-
-
|
|
1242
|
-
-
|
|
1243
|
-
-
|
|
1244
|
-
-
|
|
1245
|
-
-
|
|
1246
|
-
-
|
|
1247
|
-
-
|
|
1248
|
-
-
|
|
1249
|
-
-
|
|
1250
|
-
-
|
|
1251
|
-
-
|
|
1252
|
-
-
|
|
1253
|
-
-
|
|
1254
|
-
-
|
|
1255
|
-
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
-
|
|
1261
|
-
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
-
|
|
1265
|
-
-
|
|
1266
|
-
-
|
|
1267
|
-
-
|
|
1268
|
-
|
|
1236
|
+
:returns: A pandas DataFrame containing the flight trajectory with columns such as:
|
|
1237
|
+
|
|
1238
|
+
- **Hp** - wAltitude [ft]
|
|
1239
|
+
- **TAS** - True Air Speed [kt]
|
|
1240
|
+
- **CAS** - Calibrated Air Speed [kt]
|
|
1241
|
+
- **GS** - Ground Speed [kt]
|
|
1242
|
+
- **M** - Mach number [-]
|
|
1243
|
+
- **ROCD** - Rate of Climb/Descent [ft/min]
|
|
1244
|
+
- **ESF** - Energy Share Factor [-]
|
|
1245
|
+
- **FUEL** - Fuel flow [kg/s]
|
|
1246
|
+
- **FUELCONSUMED** - Total fuel consumed [kg]
|
|
1247
|
+
- **THR** - Thrust force [N]
|
|
1248
|
+
- **DRAG** - Drag force [N]
|
|
1249
|
+
- **time** - Elapsed time [s]
|
|
1250
|
+
- **dist** - Distance flown [NM]
|
|
1251
|
+
- **slope** - Trajectory slope [deg]
|
|
1252
|
+
- **mass** - Aircraft mass [kg]
|
|
1253
|
+
- **config** - Aerodynamic configuration
|
|
1254
|
+
- **LAT** - Latitude [deg]
|
|
1255
|
+
- **LON** - Longitude [deg]
|
|
1256
|
+
- **HDGTrue** - True heading [deg]
|
|
1257
|
+
- **HDGMagnetic** - Magnetic heading [deg]
|
|
1258
|
+
- **BankAngle** - Bank angle [deg]
|
|
1259
|
+
- **ROT** - Rate of turn [deg/s]
|
|
1260
|
+
- **Comment** - Comments for each segment
|
|
1261
|
+
|
|
1262
|
+
- **For BADAH:**
|
|
1263
|
+
- **Preq** - Required power [W]
|
|
1264
|
+
- **Peng** - Generated power [W]
|
|
1265
|
+
- **Pav** - Available power [W]
|
|
1266
|
+
|
|
1267
|
+
- **For BADAE (electric aircraft):**
|
|
1268
|
+
- **Pmec** - Mechanical power [W]
|
|
1269
|
+
- **Pelc** - Electrical power [W]
|
|
1270
|
+
- **Pbat** - Power supplied by the battery [W]
|
|
1271
|
+
- **SOCr** - Rate of battery state of charge depletion [%/h]
|
|
1272
|
+
- **SOC** - Battery state of charge [%]
|
|
1273
|
+
- **Ibat** - Battery current [A]
|
|
1274
|
+
- **Vbat** - Battery voltage [V]
|
|
1275
|
+
- **Vgbat** - Ground battery voltage [V]
|
|
1269
1276
|
:rtype: pandas.DataFrame
|
|
1270
1277
|
|
|
1271
1278
|
Notes:
|
|
@@ -1312,7 +1319,12 @@ def constantSpeedROCD(
|
|
|
1312
1319
|
raise Exception("Undefined Heading value combination")
|
|
1313
1320
|
|
|
1314
1321
|
# calculation with constant mass (True) or integrated (False)
|
|
1315
|
-
|
|
1322
|
+
calculationType = kwargs.get("calculationType", "INTEGRATED")
|
|
1323
|
+
|
|
1324
|
+
if calculationType == "INTEGRATED":
|
|
1325
|
+
mass_const = False
|
|
1326
|
+
if calculationType == "POINT":
|
|
1327
|
+
mass_const = True
|
|
1316
1328
|
|
|
1317
1329
|
# optional parameter to define initial Baterry State of Charge (SOC)
|
|
1318
1330
|
if AC.BADAFamily.BADAE:
|
|
@@ -1474,6 +1486,25 @@ def constantSpeedROCD(
|
|
|
1474
1486
|
)
|
|
1475
1487
|
|
|
1476
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
|
+
|
|
1477
1508
|
[M_i, CAS_i, TAS_i] = atm.convertSpeed(
|
|
1478
1509
|
v=v, speedType=speedType, theta=theta, delta=delta, sigma=sigma
|
|
1479
1510
|
)
|
|
@@ -2175,6 +2206,7 @@ def constantSpeedROCD(
|
|
|
2175
2206
|
}
|
|
2176
2207
|
|
|
2177
2208
|
flightTrajectory = FT.createFlightTrajectoryDataframe(flightData)
|
|
2209
|
+
|
|
2178
2210
|
return flightTrajectory
|
|
2179
2211
|
|
|
2180
2212
|
|
|
@@ -2216,12 +2248,14 @@ def constantSpeedROCD_time(
|
|
|
2216
2248
|
:param DeltaTemp: Deviation from standard ISA temperature [K].
|
|
2217
2249
|
:param wS: Wind speed component along the longitudinal axis [kt]. Default is 0.0.
|
|
2218
2250
|
:param turnMetrics: Dictionary defining turn parameters:
|
|
2251
|
+
|
|
2219
2252
|
- rateOfTurn [deg/s]
|
|
2220
2253
|
- bankAngle [deg]
|
|
2221
2254
|
- directionOfTurn {LEFT/RIGHT}. Default is straight flight.
|
|
2222
2255
|
:param Lat: Geographical latitude at the start [deg]. Default is None.
|
|
2223
2256
|
:param Lon: Geographical longitude at the start [deg]. Default is None.
|
|
2224
2257
|
:param initialHeading: Dictionary defining the initial heading (magnetic or true) and whether to fly a constant heading:
|
|
2258
|
+
|
|
2225
2259
|
- magnetic: Magnetic heading [deg].
|
|
2226
2260
|
- true: True heading [deg].
|
|
2227
2261
|
- constantHeading: Whether to fly along a constant heading (loxodrome). Default is None.
|
|
@@ -2229,51 +2263,55 @@ def constantSpeedROCD_time(
|
|
|
2229
2263
|
:param directionOfTurn: Direction of the turn {LEFT, RIGHT}. Default is None.
|
|
2230
2264
|
:param magneticDeclinationGrid: Optional grid of magnetic declinations used to correct headings. Default is None.
|
|
2231
2265
|
:param kwargs: Additional optional parameters:
|
|
2266
|
+
|
|
2232
2267
|
- step_length: Step size in seconds for time iteration. Default is 1 second.
|
|
2233
2268
|
- SOC_init: Initial state of charge for electric aircraft [%]. Default is 100 for BADAE.
|
|
2234
2269
|
- speedBrakes: Dictionary specifying whether speed brakes are deployed and their drag coefficient {deployed: False, value: 0.03}.
|
|
2235
2270
|
- ROCD_min: Minimum ROCD to identify the service ceiling [ft/min]. Default varies by aircraft type.
|
|
2236
2271
|
- config: Default aerodynamic configuration. Values: TO, IC, CR, AP, LD. Default is None.
|
|
2237
|
-
-
|
|
2272
|
+
- calculationType: String indicating whether calculation is performed as INTEGRATED or POINT. Default is INTEGRATED.
|
|
2238
2273
|
- m_iter: Number of iterations for the mass integration loop. Default is 5.
|
|
2239
2274
|
|
|
2240
|
-
:returns: A pandas DataFrame containing the flight trajectory
|
|
2241
|
-
|
|
2242
|
-
-
|
|
2243
|
-
-
|
|
2244
|
-
-
|
|
2245
|
-
-
|
|
2246
|
-
-
|
|
2247
|
-
-
|
|
2248
|
-
-
|
|
2249
|
-
-
|
|
2250
|
-
-
|
|
2251
|
-
-
|
|
2252
|
-
-
|
|
2253
|
-
-
|
|
2254
|
-
-
|
|
2255
|
-
-
|
|
2256
|
-
-
|
|
2257
|
-
-
|
|
2258
|
-
-
|
|
2259
|
-
-
|
|
2260
|
-
-
|
|
2261
|
-
-
|
|
2262
|
-
-
|
|
2263
|
-
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
-
|
|
2269
|
-
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
-
|
|
2273
|
-
-
|
|
2274
|
-
-
|
|
2275
|
-
-
|
|
2276
|
-
|
|
2275
|
+
:returns: A pandas DataFrame containing the flight trajectory with columns such as:
|
|
2276
|
+
|
|
2277
|
+
- **Hp** - wAltitude [ft]
|
|
2278
|
+
- **TAS** - True Air Speed [kt]
|
|
2279
|
+
- **CAS** - Calibrated Air Speed [kt]
|
|
2280
|
+
- **GS** - Ground Speed [kt]
|
|
2281
|
+
- **M** - Mach number [-]
|
|
2282
|
+
- **ROCD** - Rate of Climb/Descent [ft/min]
|
|
2283
|
+
- **ESF** - Energy Share Factor [-]
|
|
2284
|
+
- **FUEL** - Fuel flow [kg/s]
|
|
2285
|
+
- **FUELCONSUMED** - Total fuel consumed [kg]
|
|
2286
|
+
- **THR** - Thrust force [N]
|
|
2287
|
+
- **DRAG** - Drag force [N]
|
|
2288
|
+
- **time** - Elapsed time [s]
|
|
2289
|
+
- **dist** - Distance flown [NM]
|
|
2290
|
+
- **slope** - Trajectory slope [deg]
|
|
2291
|
+
- **mass** - Aircraft mass [kg]
|
|
2292
|
+
- **config** - Aerodynamic configuration
|
|
2293
|
+
- **LAT** - Latitude [deg]
|
|
2294
|
+
- **LON** - Longitude [deg]
|
|
2295
|
+
- **HDGTrue** - True heading [deg]
|
|
2296
|
+
- **HDGMagnetic** - Magnetic heading [deg]
|
|
2297
|
+
- **BankAngle** - Bank angle [deg]
|
|
2298
|
+
- **ROT** - Rate of turn [deg/s]
|
|
2299
|
+
- **Comment** - Comments for each segment
|
|
2300
|
+
|
|
2301
|
+
- **For BADAH:**
|
|
2302
|
+
- **Preq** - Required power [W]
|
|
2303
|
+
- **Peng** - Generated power [W]
|
|
2304
|
+
- **Pav** - Available power [W]
|
|
2305
|
+
|
|
2306
|
+
- **For BADAE (electric aircraft):**
|
|
2307
|
+
- **Pmec** - Mechanical power [W]
|
|
2308
|
+
- **Pelc** - Electrical power [W]
|
|
2309
|
+
- **Pbat** - Power supplied by the battery [W]
|
|
2310
|
+
- **SOCr** - Rate of battery state of charge depletion [%/h]
|
|
2311
|
+
- **SOC** - Battery state of charge [%]
|
|
2312
|
+
- **Ibat** - Battery current [A]
|
|
2313
|
+
- **Vbat** - Battery voltage [V]
|
|
2314
|
+
- **Vgbat** - Ground battery voltage [V]
|
|
2277
2315
|
:rtype: pandas.DataFrame
|
|
2278
2316
|
"""
|
|
2279
2317
|
|
|
@@ -2315,7 +2353,12 @@ def constantSpeedROCD_time(
|
|
|
2315
2353
|
raise Exception("Undefined Heading value combination")
|
|
2316
2354
|
|
|
2317
2355
|
# calculation with constant mass (True) or integrated (False)
|
|
2318
|
-
|
|
2356
|
+
calculationType = kwargs.get("calculationType", "INTEGRATED")
|
|
2357
|
+
|
|
2358
|
+
if calculationType == "INTEGRATED":
|
|
2359
|
+
mass_const = False
|
|
2360
|
+
if calculationType == "POINT":
|
|
2361
|
+
mass_const = True
|
|
2319
2362
|
|
|
2320
2363
|
# optional parameter to define initial Baterry State of Charge (SOC)
|
|
2321
2364
|
if AC.BADAFamily.BADAE:
|
|
@@ -2471,6 +2514,25 @@ def constantSpeedROCD_time(
|
|
|
2471
2514
|
)
|
|
2472
2515
|
|
|
2473
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
|
+
|
|
2474
2536
|
[M_i, CAS_i, TAS_i] = atm.convertSpeed(
|
|
2475
2537
|
v=v, speedType=speedType, theta=theta, delta=delta, sigma=sigma
|
|
2476
2538
|
)
|
|
@@ -3161,6 +3223,7 @@ def constantSpeedROCD_time(
|
|
|
3161
3223
|
}
|
|
3162
3224
|
|
|
3163
3225
|
flightTrajectory = FT.createFlightTrajectoryDataframe(flightData)
|
|
3226
|
+
|
|
3164
3227
|
return flightTrajectory
|
|
3165
3228
|
|
|
3166
3229
|
|
|
@@ -3201,12 +3264,14 @@ def constantSpeedSlope(
|
|
|
3201
3264
|
:param DeltaTemp: Deviation from the standard ISA temperature [K].
|
|
3202
3265
|
:param wS: Wind speed component along the longitudinal axis (affects ground speed) [kt]. Default is 0.0.
|
|
3203
3266
|
:param turnMetrics: A dictionary defining the turn parameters:
|
|
3267
|
+
|
|
3204
3268
|
- rateOfTurn [deg/s]
|
|
3205
3269
|
- bankAngle [deg]
|
|
3206
3270
|
- directionOfTurn {LEFT/RIGHT}. Default is straight flight.
|
|
3207
3271
|
:param Lat: Initial latitude [deg]. Default is None.
|
|
3208
3272
|
:param Lon: Initial longitude [deg]. Default is None.
|
|
3209
3273
|
:param initialHeading: A dictionary defining the initial heading (magnetic or true) and whether to fly a constant heading:
|
|
3274
|
+
|
|
3210
3275
|
- magnetic: Magnetic heading [deg].
|
|
3211
3276
|
- true: True heading [deg].
|
|
3212
3277
|
- constantHeading: Whether to maintain a constant heading. Default is None.
|
|
@@ -3214,51 +3279,55 @@ def constantSpeedSlope(
|
|
|
3214
3279
|
:param directionOfTurn: Direction of the turn {LEFT, RIGHT}. Default is None.
|
|
3215
3280
|
:param magneticDeclinationGrid: Optional grid of magnetic declination used to correct magnetic heading. Default is None.
|
|
3216
3281
|
:param kwargs: Additional optional parameters:
|
|
3282
|
+
|
|
3217
3283
|
- Hp_step: Step size in altitude for the iterative calculation [ft]. Default is 1000 ft for BADA3/BADA4, 500 ft for BADAH/BADAE.
|
|
3218
3284
|
- SOC_init: Initial battery state of charge for electric aircraft (BADAE) [%]. Default is 100.
|
|
3219
3285
|
- speedBrakes: A dictionary specifying whether speed brakes are deployed and the additional drag coefficient {deployed: False, value: 0.03}.
|
|
3220
3286
|
- ROCD_min: Minimum rate of climb/descent used to determine service ceiling [ft/min]. Default varies based on aircraft type.
|
|
3221
3287
|
- config: Default aerodynamic configuration (TO, IC, CR, AP, LD). Default is None.
|
|
3222
|
-
-
|
|
3288
|
+
- calculationType: String indicating whether calculation is performed as INTEGRATED or POINT. Default is INTEGRATED.
|
|
3223
3289
|
- m_iter: Number of iterations for the mass integration loop. Default is 5.
|
|
3224
3290
|
|
|
3225
|
-
:returns: A pandas DataFrame containing flight trajectory
|
|
3226
|
-
|
|
3227
|
-
-
|
|
3228
|
-
-
|
|
3229
|
-
-
|
|
3230
|
-
-
|
|
3231
|
-
-
|
|
3232
|
-
-
|
|
3233
|
-
-
|
|
3234
|
-
-
|
|
3235
|
-
-
|
|
3236
|
-
-
|
|
3237
|
-
-
|
|
3238
|
-
-
|
|
3239
|
-
-
|
|
3240
|
-
-
|
|
3241
|
-
-
|
|
3242
|
-
-
|
|
3243
|
-
-
|
|
3244
|
-
-
|
|
3245
|
-
-
|
|
3246
|
-
-
|
|
3247
|
-
-
|
|
3248
|
-
-
|
|
3249
|
-
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
-
|
|
3253
|
-
|
|
3254
|
-
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
-
|
|
3258
|
-
-
|
|
3259
|
-
-
|
|
3260
|
-
-
|
|
3261
|
-
-
|
|
3291
|
+
:returns: A pandas DataFrame containing the flight trajectory with columns such as:
|
|
3292
|
+
|
|
3293
|
+
- **Hp** - wAltitude [ft]
|
|
3294
|
+
- **TAS** - True Air Speed [kt]
|
|
3295
|
+
- **CAS** - Calibrated Air Speed [kt]
|
|
3296
|
+
- **GS** - Ground Speed [kt]
|
|
3297
|
+
- **M** - Mach number [-]
|
|
3298
|
+
- **ROCD** - Rate of Climb/Descent [ft/min]
|
|
3299
|
+
- **ESF** - Energy Share Factor [-]
|
|
3300
|
+
- **FUEL** - Fuel flow [kg/s]
|
|
3301
|
+
- **FUELCONSUMED** - Total fuel consumed [kg]
|
|
3302
|
+
- **THR** - Thrust force [N]
|
|
3303
|
+
- **DRAG** - Drag force [N]
|
|
3304
|
+
- **time** - Elapsed time [s]
|
|
3305
|
+
- **dist** - Distance flown [NM]
|
|
3306
|
+
- **slope** - Trajectory slope [deg]
|
|
3307
|
+
- **mass** - Aircraft mass [kg]
|
|
3308
|
+
- **config** - Aerodynamic configuration
|
|
3309
|
+
- **LAT** - Latitude [deg]
|
|
3310
|
+
- **LON** - Longitude [deg]
|
|
3311
|
+
- **HDGTrue** - True heading [deg]
|
|
3312
|
+
- **HDGMagnetic** - Magnetic heading [deg]
|
|
3313
|
+
- **BankAngle** - Bank angle [deg]
|
|
3314
|
+
- **ROT** - Rate of turn [deg/s]
|
|
3315
|
+
- **Comment** - Comments for each segment
|
|
3316
|
+
|
|
3317
|
+
- **For BADAH:**
|
|
3318
|
+
- **Preq** - Required power [W]
|
|
3319
|
+
- **Peng** - Generated power [W]
|
|
3320
|
+
- **Pav** - Available power [W]
|
|
3321
|
+
|
|
3322
|
+
- **For BADAE (electric aircraft):**
|
|
3323
|
+
- **Pmec** - Mechanical power [W]
|
|
3324
|
+
- **Pelc** - Electrical power [W]
|
|
3325
|
+
- **Pbat** - Power supplied by the battery [W]
|
|
3326
|
+
- **SOCr** - Rate of battery state of charge depletion [%/h]
|
|
3327
|
+
- **SOC** - Battery state of charge [%]
|
|
3328
|
+
- **Ibat** - Battery current [A]
|
|
3329
|
+
- **Vbat** - Battery voltage [V]
|
|
3330
|
+
- **Vgbat** - Ground battery voltage [V]
|
|
3262
3331
|
:rtype: pandas.DataFrame
|
|
3263
3332
|
"""
|
|
3264
3333
|
|
|
@@ -3300,7 +3369,12 @@ def constantSpeedSlope(
|
|
|
3300
3369
|
raise Exception("Undefined Heading value combination")
|
|
3301
3370
|
|
|
3302
3371
|
# calculation with constant mass (True) or integrated (False)
|
|
3303
|
-
|
|
3372
|
+
calculationType = kwargs.get("calculationType", "INTEGRATED")
|
|
3373
|
+
|
|
3374
|
+
if calculationType == "INTEGRATED":
|
|
3375
|
+
mass_const = False
|
|
3376
|
+
if calculationType == "POINT":
|
|
3377
|
+
mass_const = True
|
|
3304
3378
|
|
|
3305
3379
|
# optional parameter to define initial Baterry State of Charge (SOC)
|
|
3306
3380
|
if AC.BADAFamily.BADAE:
|
|
@@ -3456,6 +3530,25 @@ def constantSpeedSlope(
|
|
|
3456
3530
|
)
|
|
3457
3531
|
|
|
3458
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
|
+
|
|
3459
3552
|
[M_i, CAS_i, TAS_i] = atm.convertSpeed(
|
|
3460
3553
|
v=v, speedType=speedType, theta=theta, delta=delta, sigma=sigma
|
|
3461
3554
|
)
|
|
@@ -4161,6 +4254,7 @@ def constantSpeedSlope(
|
|
|
4161
4254
|
}
|
|
4162
4255
|
|
|
4163
4256
|
flightTrajectory = FT.createFlightTrajectoryDataframe(flightData)
|
|
4257
|
+
|
|
4164
4258
|
return flightTrajectory
|
|
4165
4259
|
|
|
4166
4260
|
|
|
@@ -4198,12 +4292,14 @@ def constantSpeedSlope_time(
|
|
|
4198
4292
|
:param DeltaTemp: Deviation from standard ISA temperature [K].
|
|
4199
4293
|
:param wS: Longitudinal wind speed component (affects ground speed) [kt]. Default is 0.0.
|
|
4200
4294
|
:param turnMetrics: A dictionary defining the turn parameters:
|
|
4295
|
+
|
|
4201
4296
|
- rateOfTurn [deg/s]
|
|
4202
4297
|
- bankAngle [deg]
|
|
4203
4298
|
- directionOfTurn {LEFT/RIGHT}. Default is straight flight.
|
|
4204
4299
|
:param Lat: Initial latitude [deg]. Default is None.
|
|
4205
4300
|
:param Lon: Initial longitude [deg]. Default is None.
|
|
4206
4301
|
:param initialHeading: A dictionary specifying the initial heading (magnetic or true) and whether to fly a constant heading:
|
|
4302
|
+
|
|
4207
4303
|
- magnetic: Magnetic heading [deg].
|
|
4208
4304
|
- true: True heading [deg].
|
|
4209
4305
|
- constantHeading: Whether to maintain a constant heading [True/False].
|
|
@@ -4211,53 +4307,56 @@ def constantSpeedSlope_time(
|
|
|
4211
4307
|
:param directionOfTurn: Direction of turn {LEFT, RIGHT}. Default is None.
|
|
4212
4308
|
:param magneticDeclinationGrid: Optional magnetic declination grid for correcting magnetic heading. Default is None.
|
|
4213
4309
|
:param kwargs: Additional optional parameters:
|
|
4310
|
+
|
|
4214
4311
|
- step_length: Step length for trajectory calculation [s]. Default is 1 second.
|
|
4215
4312
|
- Hp_step: Altitude step size for calculations [ft]. Default is 1000 ft for BADA3/BADA4, 500 ft for BADAH/BADAE.
|
|
4216
4313
|
- SOC_init: Initial battery state of charge (for electric aircraft) [%]. Default is 100.
|
|
4217
4314
|
- config: Default aerodynamic configuration {TO, IC, CR, AP, LD}. If not provided, configuration is calculated automatically.
|
|
4218
4315
|
- speedBrakes: Dictionary specifying if speed brakes are deployed and additional drag coefficient {deployed: False, value: 0.03}.
|
|
4219
4316
|
- ROCD_min: Minimum Rate of Climb/Descent to determine service ceiling [ft/min]. Defaults depend on aircraft type and engine.
|
|
4220
|
-
-
|
|
4317
|
+
- calculationType: String indicating whether calculation is performed as INTEGRATED or POINT. Default is INTEGRATED.
|
|
4221
4318
|
- m_iter: Number of iterations for mass integration. Default is 5.
|
|
4222
4319
|
|
|
4223
|
-
:returns: A pandas DataFrame containing the flight trajectory
|
|
4224
|
-
- Hp: Pressure altitude [ft]
|
|
4225
|
-
- TAS: True Air Speed [kt]
|
|
4226
|
-
- CAS: Calibrated Air Speed [kt]
|
|
4227
|
-
- GS: Ground Speed [kt]
|
|
4228
|
-
- M: Mach number [-]
|
|
4229
|
-
- ROCD: Rate of Climb/Descent [ft/min]
|
|
4230
|
-
- ESF: Energy Share Factor [-]
|
|
4231
|
-
- FUEL: Fuel flow [kg/s]
|
|
4232
|
-
- FUELCONSUMED: Total fuel consumed [kg]
|
|
4233
|
-
- THR: Thrust force [N]
|
|
4234
|
-
- DRAG: Drag force [N]
|
|
4235
|
-
- time: Elapsed time [s]
|
|
4236
|
-
- dist: Distance flown [NM]
|
|
4237
|
-
- slope: Trajectory slope (angle) [deg]
|
|
4238
|
-
- mass: Aircraft mass [kg]
|
|
4239
|
-
- config: Aerodynamic configuration
|
|
4240
|
-
- LAT: Latitude [deg]
|
|
4241
|
-
- LON: Longitude [deg]
|
|
4242
|
-
- HDGTrue: True heading [deg]
|
|
4243
|
-
- HDGMagnetic: Magnetic heading [deg]
|
|
4244
|
-
- BankAngle: Bank angle during turns [deg]
|
|
4245
|
-
- ROT: Rate of turn [deg/s]
|
|
4246
|
-
- Comment: Descriptive comments about the trajectory segment.
|
|
4247
|
-
- For BADAH:
|
|
4248
|
-
- Preq: Power required for level flight [W]
|
|
4249
|
-
- Peng: Generated power [W]
|
|
4250
|
-
- Pav: Available power [W]
|
|
4251
|
-
- For BADAE (electric aircraft):
|
|
4252
|
-
- Pmec: Mechanical power [W]
|
|
4253
|
-
- Pelc: Electrical power [W]
|
|
4254
|
-
- Pbat: Battery power [W]
|
|
4255
|
-
- SOCr: Battery state of charge rate of depletion [%/h]
|
|
4256
|
-
- SOC: Battery state of charge [%]
|
|
4257
|
-
- Ibat: Battery current [A]
|
|
4258
|
-
- Vbat: Battery voltage [V]
|
|
4259
|
-
- Vgbat: Ground battery voltage [V]
|
|
4320
|
+
:returns: A pandas DataFrame containing the flight trajectory with columns such as:
|
|
4260
4321
|
|
|
4322
|
+
- **Hp** - wAltitude [ft]
|
|
4323
|
+
- **TAS** - True Air Speed [kt]
|
|
4324
|
+
- **CAS** - Calibrated Air Speed [kt]
|
|
4325
|
+
- **GS** - Ground Speed [kt]
|
|
4326
|
+
- **M** - Mach number [-]
|
|
4327
|
+
- **ROCD** - Rate of Climb/Descent [ft/min]
|
|
4328
|
+
- **ESF** - Energy Share Factor [-]
|
|
4329
|
+
- **FUEL** - Fuel flow [kg/s]
|
|
4330
|
+
- **FUELCONSUMED** - Total fuel consumed [kg]
|
|
4331
|
+
- **THR** - Thrust force [N]
|
|
4332
|
+
- **DRAG** - Drag force [N]
|
|
4333
|
+
- **time** - Elapsed time [s]
|
|
4334
|
+
- **dist** - Distance flown [NM]
|
|
4335
|
+
- **slope** - Trajectory slope [deg]
|
|
4336
|
+
- **mass** - Aircraft mass [kg]
|
|
4337
|
+
- **config** - Aerodynamic configuration
|
|
4338
|
+
- **LAT** - Latitude [deg]
|
|
4339
|
+
- **LON** - Longitude [deg]
|
|
4340
|
+
- **HDGTrue** - True heading [deg]
|
|
4341
|
+
- **HDGMagnetic** - Magnetic heading [deg]
|
|
4342
|
+
- **BankAngle** - Bank angle [deg]
|
|
4343
|
+
- **ROT** - Rate of turn [deg/s]
|
|
4344
|
+
- **Comment** - Comments for each segment
|
|
4345
|
+
|
|
4346
|
+
- **For BADAH:**
|
|
4347
|
+
- **Preq** - Required power [W]
|
|
4348
|
+
- **Peng** - Generated power [W]
|
|
4349
|
+
- **Pav** - Available power [W]
|
|
4350
|
+
|
|
4351
|
+
- **For BADAE (electric aircraft):**
|
|
4352
|
+
- **Pmec** - Mechanical power [W]
|
|
4353
|
+
- **Pelc** - Electrical power [W]
|
|
4354
|
+
- **Pbat** - Power supplied by the battery [W]
|
|
4355
|
+
- **SOCr** - Rate of battery state of charge depletion [%/h]
|
|
4356
|
+
- **SOC** - Battery state of charge [%]
|
|
4357
|
+
- **Ibat** - Battery current [A]
|
|
4358
|
+
- **Vbat** - Battery voltage [V]
|
|
4359
|
+
- **Vgbat** - Ground battery voltage [V]
|
|
4261
4360
|
:rtype: pandas.DataFrame
|
|
4262
4361
|
"""
|
|
4263
4362
|
|
|
@@ -4299,7 +4398,12 @@ def constantSpeedSlope_time(
|
|
|
4299
4398
|
raise Exception("Undefined Heading value combination")
|
|
4300
4399
|
|
|
4301
4400
|
# calculation with constant mass (True) or integrated (False)
|
|
4302
|
-
|
|
4401
|
+
calculationType = kwargs.get("calculationType", "INTEGRATED")
|
|
4402
|
+
|
|
4403
|
+
if calculationType == "INTEGRATED":
|
|
4404
|
+
mass_const = False
|
|
4405
|
+
if calculationType == "POINT":
|
|
4406
|
+
mass_const = True
|
|
4303
4407
|
|
|
4304
4408
|
# optional parameter to define initial Baterry State of Charge (SOC)
|
|
4305
4409
|
if AC.BADAFamily.BADAE:
|
|
@@ -4451,6 +4555,25 @@ def constantSpeedSlope_time(
|
|
|
4451
4555
|
)
|
|
4452
4556
|
|
|
4453
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
|
+
|
|
4454
4577
|
[M_i, CAS_i, TAS_i] = atm.convertSpeed(
|
|
4455
4578
|
v=v, speedType=speedType, theta=theta, delta=delta, sigma=sigma
|
|
4456
4579
|
)
|
|
@@ -5153,6 +5276,7 @@ def constantSpeedSlope_time(
|
|
|
5153
5276
|
}
|
|
5154
5277
|
|
|
5155
5278
|
flightTrajectory = FT.createFlightTrajectoryDataframe(flightData)
|
|
5279
|
+
|
|
5156
5280
|
return flightTrajectory
|
|
5157
5281
|
|
|
5158
5282
|
|
|
@@ -5193,12 +5317,14 @@ def constantSpeedRating(
|
|
|
5193
5317
|
:param DeltaTemp: Deviation from the standard ISA temperature [K].
|
|
5194
5318
|
:param wS: Wind speed component along the longitudinal axis (affects ground speed) [kt]. Default is 0.0.
|
|
5195
5319
|
:param turnMetrics: A dictionary defining the turn parameters:
|
|
5320
|
+
|
|
5196
5321
|
- rateOfTurn [deg/s]
|
|
5197
5322
|
- bankAngle [deg]
|
|
5198
5323
|
- directionOfTurn {LEFT/RIGHT}. Default is straight flight.
|
|
5199
5324
|
:param Lat: Initial latitude [deg]. Default is None.
|
|
5200
5325
|
:param Lon: Initial longitude [deg]. Default is None.
|
|
5201
5326
|
:param initialHeading: A dictionary defining the initial heading (magnetic or true) and whether to fly a constant heading:
|
|
5327
|
+
|
|
5202
5328
|
- magnetic: Magnetic heading [deg].
|
|
5203
5329
|
- true: True heading [deg].
|
|
5204
5330
|
- constantHeading: Whether to maintain a constant heading. Default is None.
|
|
@@ -5207,51 +5333,55 @@ def constantSpeedRating(
|
|
|
5207
5333
|
:param expedite: Boolean flag to expedite climb/descent. Default is False.
|
|
5208
5334
|
:param magneticDeclinationGrid: Optional grid of magnetic declination used to correct magnetic heading. Default is None.
|
|
5209
5335
|
:param kwargs: Additional optional parameters:
|
|
5336
|
+
|
|
5210
5337
|
- Hp_step: Step size in altitude for the iterative calculation [ft]. Default is 1000 ft for BADA3/BADA4, 500 ft for BADAH/BADAE.
|
|
5211
5338
|
- SOC_init: Initial battery state of charge for electric aircraft (BADAE) [%]. Default is 100.
|
|
5212
5339
|
- speedBrakes: A dictionary specifying whether speed brakes are deployed and the additional drag coefficient {deployed: False, value: 0.03}.
|
|
5213
5340
|
- ROCD_min: Minimum rate of climb/descent used to determine service ceiling [ft/min]. Default varies based on aircraft type.
|
|
5214
5341
|
- config: Default aerodynamic configuration (TO, IC, CR, AP, LD). Default is None.
|
|
5215
|
-
-
|
|
5342
|
+
- calculationType: String indicating whether calculation is performed as INTEGRATED or POINT. Default is INTEGRATED.
|
|
5216
5343
|
- m_iter: Number of iterations for the mass integration loop. Default is 5.
|
|
5217
5344
|
|
|
5218
|
-
:returns: A pandas DataFrame containing flight trajectory
|
|
5219
|
-
|
|
5220
|
-
-
|
|
5221
|
-
-
|
|
5222
|
-
-
|
|
5223
|
-
-
|
|
5224
|
-
-
|
|
5225
|
-
-
|
|
5226
|
-
-
|
|
5227
|
-
-
|
|
5228
|
-
-
|
|
5229
|
-
-
|
|
5230
|
-
-
|
|
5231
|
-
-
|
|
5232
|
-
-
|
|
5233
|
-
-
|
|
5234
|
-
-
|
|
5235
|
-
-
|
|
5236
|
-
-
|
|
5237
|
-
-
|
|
5238
|
-
-
|
|
5239
|
-
-
|
|
5240
|
-
-
|
|
5241
|
-
-
|
|
5242
|
-
-
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
-
|
|
5246
|
-
|
|
5247
|
-
-
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
-
|
|
5251
|
-
-
|
|
5252
|
-
-
|
|
5253
|
-
-
|
|
5254
|
-
-
|
|
5345
|
+
:returns: A pandas DataFrame containing the flight trajectory with columns such as:
|
|
5346
|
+
|
|
5347
|
+
- **Hp** - wAltitude [ft]
|
|
5348
|
+
- **TAS** - True Air Speed [kt]
|
|
5349
|
+
- **CAS** - Calibrated Air Speed [kt]
|
|
5350
|
+
- **GS** - Ground Speed [kt]
|
|
5351
|
+
- **M** - Mach number [-]
|
|
5352
|
+
- **ROCD** - Rate of Climb/Descent [ft/min]
|
|
5353
|
+
- **ESF** - Energy Share Factor [-]
|
|
5354
|
+
- **FUEL** - Fuel flow [kg/s]
|
|
5355
|
+
- **FUELCONSUMED** - Total fuel consumed [kg]
|
|
5356
|
+
- **THR** - Thrust force [N]
|
|
5357
|
+
- **DRAG** - Drag force [N]
|
|
5358
|
+
- **time** - Elapsed time [s]
|
|
5359
|
+
- **dist** - Distance flown [NM]
|
|
5360
|
+
- **slope** - Trajectory slope [deg]
|
|
5361
|
+
- **mass** - Aircraft mass [kg]
|
|
5362
|
+
- **config** - Aerodynamic configuration
|
|
5363
|
+
- **LAT** - Latitude [deg]
|
|
5364
|
+
- **LON** - Longitude [deg]
|
|
5365
|
+
- **HDGTrue** - True heading [deg]
|
|
5366
|
+
- **HDGMagnetic** - Magnetic heading [deg]
|
|
5367
|
+
- **BankAngle** - Bank angle [deg]
|
|
5368
|
+
- **ROT** - Rate of turn [deg/s]
|
|
5369
|
+
- **Comment** - Comments for each segment
|
|
5370
|
+
|
|
5371
|
+
- **For BADAH:**
|
|
5372
|
+
- **Preq** - Required power [W]
|
|
5373
|
+
- **Peng** - Generated power [W]
|
|
5374
|
+
- **Pav** - Available power [W]
|
|
5375
|
+
|
|
5376
|
+
- **For BADAE (electric aircraft):**
|
|
5377
|
+
- **Pmec** - Mechanical power [W]
|
|
5378
|
+
- **Pelc** - Electrical power [W]
|
|
5379
|
+
- **Pbat** - Power supplied by the battery [W]
|
|
5380
|
+
- **SOCr** - Rate of battery state of charge depletion [%/h]
|
|
5381
|
+
- **SOC** - Battery state of charge [%]
|
|
5382
|
+
- **Ibat** - Battery current [A]
|
|
5383
|
+
- **Vbat** - Battery voltage [V]
|
|
5384
|
+
- **Vgbat** - Ground battery voltage [V]
|
|
5255
5385
|
:rtype: pandas.DataFrame
|
|
5256
5386
|
"""
|
|
5257
5387
|
|
|
@@ -5293,7 +5423,12 @@ def constantSpeedRating(
|
|
|
5293
5423
|
raise Exception("Undefined Heading value combination")
|
|
5294
5424
|
|
|
5295
5425
|
# calculation with constant mass (True) or integrated (False)
|
|
5296
|
-
|
|
5426
|
+
calculationType = kwargs.get("calculationType", "INTEGRATED")
|
|
5427
|
+
|
|
5428
|
+
if calculationType == "INTEGRATED":
|
|
5429
|
+
mass_const = False
|
|
5430
|
+
if calculationType == "POINT":
|
|
5431
|
+
mass_const = True
|
|
5297
5432
|
|
|
5298
5433
|
# optional parameter to define initial Baterry State of Charge (SOC)
|
|
5299
5434
|
if AC.BADAFamily.BADAE:
|
|
@@ -5476,6 +5611,25 @@ def constantSpeedRating(
|
|
|
5476
5611
|
)
|
|
5477
5612
|
|
|
5478
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
|
+
|
|
5479
5633
|
[M_i, CAS_i, TAS_i] = atm.convertSpeed(
|
|
5480
5634
|
v=v, speedType=speedType, theta=theta, delta=delta, sigma=sigma
|
|
5481
5635
|
)
|
|
@@ -5552,9 +5706,12 @@ def constantSpeedRating(
|
|
|
5552
5706
|
M=M_i,
|
|
5553
5707
|
DeltaTemp=DeltaTemp,
|
|
5554
5708
|
) # [N]
|
|
5555
|
-
CT = AC.CT(Thrust=THR_i, delta=delta)
|
|
5556
5709
|
FUEL_i = AC.ff(
|
|
5557
|
-
|
|
5710
|
+
rating=rating,
|
|
5711
|
+
delta=delta,
|
|
5712
|
+
theta=theta,
|
|
5713
|
+
M=M_i,
|
|
5714
|
+
DeltaTemp=DeltaTemp,
|
|
5558
5715
|
)
|
|
5559
5716
|
|
|
5560
5717
|
# BADA3
|
|
@@ -5588,12 +5745,7 @@ def constantSpeedRating(
|
|
|
5588
5745
|
DeltaTemp=DeltaTemp,
|
|
5589
5746
|
)
|
|
5590
5747
|
FUEL_i = AC.ff(
|
|
5591
|
-
flightPhase=phase,
|
|
5592
|
-
v=TAS_i,
|
|
5593
|
-
h=H_m,
|
|
5594
|
-
T=THR_i,
|
|
5595
|
-
config=config_i,
|
|
5596
|
-
adapted=True,
|
|
5748
|
+
flightPhase=phase, v=TAS_i, h=H_m, T=THR_i, config=config_i
|
|
5597
5749
|
)
|
|
5598
5750
|
|
|
5599
5751
|
if Hp_i != Hp_init: # exclude first point: initial m already known
|
|
@@ -6067,6 +6219,7 @@ def constantSpeedRating(
|
|
|
6067
6219
|
}
|
|
6068
6220
|
|
|
6069
6221
|
flightTrajectory = FT.createFlightTrajectoryDataframe(flightData)
|
|
6222
|
+
|
|
6070
6223
|
return flightTrajectory
|
|
6071
6224
|
|
|
6072
6225
|
|
|
@@ -6109,12 +6262,14 @@ def constantSpeedRating_time(
|
|
|
6109
6262
|
:param DeltaTemp: Deviation from the standard ISA temperature [K].
|
|
6110
6263
|
:param wS: Wind speed component along the longitudinal axis (affects ground speed) [kt]. Default is 0.0.
|
|
6111
6264
|
:param turnMetrics: A dictionary defining the turn parameters:
|
|
6265
|
+
|
|
6112
6266
|
- rateOfTurn [deg/s]
|
|
6113
6267
|
- bankAngle [deg]
|
|
6114
6268
|
- directionOfTurn {LEFT/RIGHT}. Default is straight flight.
|
|
6115
6269
|
:param Lat: Initial latitude [deg]. Default is None.
|
|
6116
6270
|
:param Lon: Initial longitude [deg]. Default is None.
|
|
6117
6271
|
:param initialHeading: A dictionary defining the initial heading (magnetic or true) and whether to fly a constant heading:
|
|
6272
|
+
|
|
6118
6273
|
- magnetic: Magnetic heading [deg].
|
|
6119
6274
|
- true: True heading [deg].
|
|
6120
6275
|
- constantHeading: Whether to maintain a constant heading. Default is None.
|
|
@@ -6124,51 +6279,55 @@ def constantSpeedRating_time(
|
|
|
6124
6279
|
:param magneticDeclinationGrid: Optional grid of magnetic declination used to correct magnetic heading. Default is None.
|
|
6125
6280
|
:param initRating: Initial engine rating settings. Default is None.
|
|
6126
6281
|
:param kwargs: Additional optional parameters:
|
|
6282
|
+
|
|
6127
6283
|
- step_length: Step size in time for the iterative calculation [s]. Default is 1 s.
|
|
6128
6284
|
- SOC_init: Initial battery state of charge for electric aircraft (BADAE) [%]. Default is 100.
|
|
6129
6285
|
- speedBrakes: A dictionary specifying whether speed brakes are deployed and the additional drag coefficient {deployed: False, value: 0.03}.
|
|
6130
6286
|
- ROCD_min: Minimum rate of climb/descent to determine service ceiling [ft/min]. Default varies by aircraft type.
|
|
6131
6287
|
- config: Default aerodynamic configuration (TO, IC, CR, AP, LD). Default is None.
|
|
6132
|
-
-
|
|
6288
|
+
- calculationType: String indicating whether calculation is performed as INTEGRATED or POINT. Default is INTEGRATED.
|
|
6133
6289
|
- m_iter: Number of iterations for the mass integration loop. Default is 5.
|
|
6134
6290
|
|
|
6135
|
-
:returns: A pandas DataFrame containing flight trajectory
|
|
6136
|
-
|
|
6137
|
-
-
|
|
6138
|
-
-
|
|
6139
|
-
-
|
|
6140
|
-
-
|
|
6141
|
-
-
|
|
6142
|
-
-
|
|
6143
|
-
-
|
|
6144
|
-
-
|
|
6145
|
-
-
|
|
6146
|
-
-
|
|
6147
|
-
-
|
|
6148
|
-
-
|
|
6149
|
-
-
|
|
6150
|
-
-
|
|
6151
|
-
-
|
|
6152
|
-
-
|
|
6153
|
-
-
|
|
6154
|
-
-
|
|
6155
|
-
-
|
|
6156
|
-
-
|
|
6157
|
-
-
|
|
6158
|
-
-
|
|
6159
|
-
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
-
|
|
6163
|
-
|
|
6164
|
-
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
-
|
|
6168
|
-
-
|
|
6169
|
-
-
|
|
6170
|
-
-
|
|
6171
|
-
-
|
|
6291
|
+
:returns: A pandas DataFrame containing the flight trajectory with columns such as:
|
|
6292
|
+
|
|
6293
|
+
- **Hp** - wAltitude [ft]
|
|
6294
|
+
- **TAS** - True Air Speed [kt]
|
|
6295
|
+
- **CAS** - Calibrated Air Speed [kt]
|
|
6296
|
+
- **GS** - Ground Speed [kt]
|
|
6297
|
+
- **M** - Mach number [-]
|
|
6298
|
+
- **ROCD** - Rate of Climb/Descent [ft/min]
|
|
6299
|
+
- **ESF** - Energy Share Factor [-]
|
|
6300
|
+
- **FUEL** - Fuel flow [kg/s]
|
|
6301
|
+
- **FUELCONSUMED** - Total fuel consumed [kg]
|
|
6302
|
+
- **THR** - Thrust force [N]
|
|
6303
|
+
- **DRAG** - Drag force [N]
|
|
6304
|
+
- **time** - Elapsed time [s]
|
|
6305
|
+
- **dist** - Distance flown [NM]
|
|
6306
|
+
- **slope** - Trajectory slope [deg]
|
|
6307
|
+
- **mass** - Aircraft mass [kg]
|
|
6308
|
+
- **config** - Aerodynamic configuration
|
|
6309
|
+
- **LAT** - Latitude [deg]
|
|
6310
|
+
- **LON** - Longitude [deg]
|
|
6311
|
+
- **HDGTrue** - True heading [deg]
|
|
6312
|
+
- **HDGMagnetic** - Magnetic heading [deg]
|
|
6313
|
+
- **BankAngle** - Bank angle [deg]
|
|
6314
|
+
- **ROT** - Rate of turn [deg/s]
|
|
6315
|
+
- **Comment** - Comments for each segment
|
|
6316
|
+
|
|
6317
|
+
- **For BADAH:**
|
|
6318
|
+
- **Preq** - Required power [W]
|
|
6319
|
+
- **Peng** - Generated power [W]
|
|
6320
|
+
- **Pav** - Available power [W]
|
|
6321
|
+
|
|
6322
|
+
- **For BADAE (electric aircraft):**
|
|
6323
|
+
- **Pmec** - Mechanical power [W]
|
|
6324
|
+
- **Pelc** - Electrical power [W]
|
|
6325
|
+
- **Pbat** - Power supplied by the battery [W]
|
|
6326
|
+
- **SOCr** - Rate of battery state of charge depletion [%/h]
|
|
6327
|
+
- **SOC** - Battery state of charge [%]
|
|
6328
|
+
- **Ibat** - Battery current [A]
|
|
6329
|
+
- **Vbat** - Battery voltage [V]
|
|
6330
|
+
- **Vgbat** - Ground battery voltage [V]
|
|
6172
6331
|
:rtype: pandas.DataFrame
|
|
6173
6332
|
"""
|
|
6174
6333
|
|
|
@@ -6210,7 +6369,12 @@ def constantSpeedRating_time(
|
|
|
6210
6369
|
raise Exception("Undefined Heading value combination")
|
|
6211
6370
|
|
|
6212
6371
|
# calculation with constant mass (True) or integrated (False)
|
|
6213
|
-
|
|
6372
|
+
calculationType = kwargs.get("calculationType", "INTEGRATED")
|
|
6373
|
+
|
|
6374
|
+
if calculationType == "INTEGRATED":
|
|
6375
|
+
mass_const = False
|
|
6376
|
+
if calculationType == "POINT":
|
|
6377
|
+
mass_const = True
|
|
6214
6378
|
|
|
6215
6379
|
# optional parameter to define initial Baterry State of Charge (SOC)
|
|
6216
6380
|
if AC.BADAFamily.BADAE:
|
|
@@ -6396,6 +6560,25 @@ def constantSpeedRating_time(
|
|
|
6396
6560
|
)
|
|
6397
6561
|
|
|
6398
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
|
+
|
|
6399
6582
|
[M_i, CAS_i, TAS_i] = atm.convertSpeed(
|
|
6400
6583
|
v=v, speedType=speedType, theta=theta, delta=delta, sigma=sigma
|
|
6401
6584
|
)
|
|
@@ -6474,9 +6657,12 @@ def constantSpeedRating_time(
|
|
|
6474
6657
|
M=M_i,
|
|
6475
6658
|
DeltaTemp=DeltaTemp,
|
|
6476
6659
|
) # [N]
|
|
6477
|
-
CT = AC.CT(Thrust=THR_i, delta=delta)
|
|
6478
6660
|
FUEL_i = AC.ff(
|
|
6479
|
-
|
|
6661
|
+
rating=rating,
|
|
6662
|
+
delta=delta,
|
|
6663
|
+
theta=theta,
|
|
6664
|
+
M=M_i,
|
|
6665
|
+
DeltaTemp=DeltaTemp,
|
|
6480
6666
|
)
|
|
6481
6667
|
|
|
6482
6668
|
# BADA3
|
|
@@ -6510,12 +6696,7 @@ def constantSpeedRating_time(
|
|
|
6510
6696
|
DeltaTemp=DeltaTemp,
|
|
6511
6697
|
)
|
|
6512
6698
|
FUEL_i = AC.ff(
|
|
6513
|
-
flightPhase=phase,
|
|
6514
|
-
v=TAS_i,
|
|
6515
|
-
h=H_m,
|
|
6516
|
-
T=THR_i,
|
|
6517
|
-
config=config_i,
|
|
6518
|
-
adapted=False,
|
|
6699
|
+
flightPhase=phase, v=TAS_i, h=H_m, T=THR_i, config=config_i
|
|
6519
6700
|
) # MCMB(climb) or IDLE(descent)
|
|
6520
6701
|
|
|
6521
6702
|
# BADAH or BADAE
|
|
@@ -6974,6 +7155,7 @@ def constantSpeedRating_time(
|
|
|
6974
7155
|
}
|
|
6975
7156
|
|
|
6976
7157
|
flightTrajectory = FT.createFlightTrajectoryDataframe(flightData)
|
|
7158
|
+
|
|
6977
7159
|
return flightTrajectory
|
|
6978
7160
|
|
|
6979
7161
|
|
|
@@ -7006,6 +7188,7 @@ def accDec(
|
|
|
7006
7188
|
|
|
7007
7189
|
.. note::
|
|
7008
7190
|
The control law used during the segment depends on the targets provided in the input parameter 'control':
|
|
7191
|
+
|
|
7009
7192
|
- ROCD/slope+ESF: Law based on ROCD/slope + ESF
|
|
7010
7193
|
- ROCD/slope+acc: Law based on ROCD/slope + acceleration
|
|
7011
7194
|
- ROCD/slope only: Law based on rating + ROCD/slope
|
|
@@ -7019,6 +7202,7 @@ def accDec(
|
|
|
7019
7202
|
:param v_final: Final speed [kt] (CAS/TAS) or [-] MACH.
|
|
7020
7203
|
:param phase: Vertical evolution phase {Climb, Descent, Cruise}.
|
|
7021
7204
|
:param control: A dictionary containing the following targets:
|
|
7205
|
+
|
|
7022
7206
|
- ROCDtarget: Rate of climb/descent to be followed [ft/min].
|
|
7023
7207
|
- slopetarget: Slope (flight path angle) to be followed [deg].
|
|
7024
7208
|
- acctarget: Acceleration to be followed [m/s^2].
|
|
@@ -7028,61 +7212,67 @@ def accDec(
|
|
|
7028
7212
|
:param DeltaTemp: Deviation from the standard ISA temperature [K].
|
|
7029
7213
|
:param wS: Wind speed component along the longitudinal axis (affects ground speed) [kt]. Default is 0.0.
|
|
7030
7214
|
:param turnMetrics: A dictionary defining turn parameters:
|
|
7215
|
+
|
|
7031
7216
|
- rateOfTurn [deg/s]
|
|
7032
7217
|
- bankAngle [deg]
|
|
7033
7218
|
- directionOfTurn {LEFT/RIGHT}. Default is straight flight.
|
|
7034
7219
|
:param Lat: Initial latitude [deg]. Default is None.
|
|
7035
7220
|
:param Lon: Initial longitude [deg]. Default is None.
|
|
7036
7221
|
:param initialHeading: A dictionary defining the initial heading (magnetic or true) and whether to fly a constant heading:
|
|
7222
|
+
|
|
7037
7223
|
- magnetic: Magnetic heading [deg].
|
|
7038
7224
|
- true: True heading [deg].
|
|
7039
7225
|
- constantHeading: Whether to maintain a constant heading. Default is None.
|
|
7040
7226
|
:param reducedPower: Boolean specifying if reduced power is applied during the climb. Default is None.
|
|
7041
7227
|
:param magneticDeclinationGrid: Optional grid of magnetic declination used to correct magnetic heading. Default is None.
|
|
7042
7228
|
:param kwargs: Additional optional parameters:
|
|
7229
|
+
|
|
7043
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.
|
|
7044
7231
|
- SOC_init: Initial battery state of charge for electric aircraft (BADAE) [%]. Default is 100.
|
|
7045
7232
|
- config: Default aerodynamic configuration (TO, IC, CR, AP, LD). Default is None.
|
|
7046
|
-
-
|
|
7233
|
+
- calculationType: String indicating whether calculation is performed as INTEGRATED or POINT. Default is INTEGRATED.
|
|
7047
7234
|
- m_iter: Number of iterations for the mass integration loop. Default is 10 for BADA3/4/H, 5 for BADAE.
|
|
7048
|
-
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
-
|
|
7052
|
-
-
|
|
7053
|
-
-
|
|
7054
|
-
-
|
|
7055
|
-
-
|
|
7056
|
-
-
|
|
7057
|
-
-
|
|
7058
|
-
-
|
|
7059
|
-
-
|
|
7060
|
-
-
|
|
7061
|
-
-
|
|
7062
|
-
-
|
|
7063
|
-
-
|
|
7064
|
-
-
|
|
7065
|
-
-
|
|
7066
|
-
-
|
|
7067
|
-
-
|
|
7068
|
-
-
|
|
7069
|
-
-
|
|
7070
|
-
-
|
|
7071
|
-
-
|
|
7072
|
-
-
|
|
7073
|
-
-
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
-
|
|
7077
|
-
|
|
7078
|
-
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
-
|
|
7082
|
-
-
|
|
7083
|
-
-
|
|
7084
|
-
-
|
|
7085
|
-
-
|
|
7235
|
+
|
|
7236
|
+
:returns: A pandas DataFrame containing the flight trajectory with columns such as:
|
|
7237
|
+
|
|
7238
|
+
- **Hp** - wAltitude [ft]
|
|
7239
|
+
- **TAS** - True Air Speed [kt]
|
|
7240
|
+
- **CAS** - Calibrated Air Speed [kt]
|
|
7241
|
+
- **GS** - Ground Speed [kt]
|
|
7242
|
+
- **M** - Mach number [-]
|
|
7243
|
+
- **ROCD** - Rate of Climb/Descent [ft/min]
|
|
7244
|
+
- **ESF** - Energy Share Factor [-]
|
|
7245
|
+
- **FUEL** - Fuel flow [kg/s]
|
|
7246
|
+
- **FUELCONSUMED** - Total fuel consumed [kg]
|
|
7247
|
+
- **THR** - Thrust force [N]
|
|
7248
|
+
- **DRAG** - Drag force [N]
|
|
7249
|
+
- **time** - Elapsed time [s]
|
|
7250
|
+
- **dist** - Distance flown [NM]
|
|
7251
|
+
- **slope** - Trajectory slope [deg]
|
|
7252
|
+
- **mass** - Aircraft mass [kg]
|
|
7253
|
+
- **config** - Aerodynamic configuration
|
|
7254
|
+
- **LAT** - Latitude [deg]
|
|
7255
|
+
- **LON** - Longitude [deg]
|
|
7256
|
+
- **HDGTrue** - True heading [deg]
|
|
7257
|
+
- **HDGMagnetic** - Magnetic heading [deg]
|
|
7258
|
+
- **BankAngle** - Bank angle [deg]
|
|
7259
|
+
- **ROT** - Rate of turn [deg/s]
|
|
7260
|
+
- **Comment** - Comments for each segment
|
|
7261
|
+
|
|
7262
|
+
- **For BADAH:**
|
|
7263
|
+
- **Preq** - Required power [W]
|
|
7264
|
+
- **Peng** - Generated power [W]
|
|
7265
|
+
- **Pav** - Available power [W]
|
|
7266
|
+
|
|
7267
|
+
- **For BADAE (electric aircraft):**
|
|
7268
|
+
- **Pmec** - Mechanical power [W]
|
|
7269
|
+
- **Pelc** - Electrical power [W]
|
|
7270
|
+
- **Pbat** - Power supplied by the battery [W]
|
|
7271
|
+
- **SOCr** - Rate of battery state of charge depletion [%/h]
|
|
7272
|
+
- **SOC** - Battery state of charge [%]
|
|
7273
|
+
- **Ibat** - Battery current [A]
|
|
7274
|
+
- **Vbat** - Battery voltage [V]
|
|
7275
|
+
- **Vgbat** - Ground battery voltage [V]
|
|
7086
7276
|
:rtype: pandas.DataFrame
|
|
7087
7277
|
"""
|
|
7088
7278
|
|
|
@@ -7124,7 +7314,12 @@ def accDec(
|
|
|
7124
7314
|
raise Exception("Undefined Heading value combination")
|
|
7125
7315
|
|
|
7126
7316
|
# calculation with constant mass (True) or integrated (False)
|
|
7127
|
-
|
|
7317
|
+
calculationType = kwargs.get("calculationType", "INTEGRATED")
|
|
7318
|
+
|
|
7319
|
+
if calculationType == "INTEGRATED":
|
|
7320
|
+
mass_const = False
|
|
7321
|
+
if calculationType == "POINT":
|
|
7322
|
+
mass_const = True
|
|
7128
7323
|
|
|
7129
7324
|
# optional parameter to define initial Baterry State of Charge (SOC)
|
|
7130
7325
|
if AC.BADAFamily.BADAE:
|
|
@@ -8241,6 +8436,7 @@ def accDec(
|
|
|
8241
8436
|
}
|
|
8242
8437
|
|
|
8243
8438
|
flightTrajectory = FT.createFlightTrajectoryDataframe(flightData)
|
|
8439
|
+
|
|
8244
8440
|
return flightTrajectory
|
|
8245
8441
|
|
|
8246
8442
|
|
|
@@ -8274,6 +8470,7 @@ def accDec_time(
|
|
|
8274
8470
|
|
|
8275
8471
|
.. note::
|
|
8276
8472
|
The control law used during the segment depends on the targets provided in the input parameter 'control':
|
|
8473
|
+
|
|
8277
8474
|
- ROCD/slope+ESF: Law based on ROCD/slope + ESF
|
|
8278
8475
|
- ROCD/slope+acc: Law based on ROCD/slope + acceleration
|
|
8279
8476
|
- ROCD/slope only: Law based on rating + ROCD/slope
|
|
@@ -8288,6 +8485,7 @@ def accDec_time(
|
|
|
8288
8485
|
:param speedEvol: Evolution of speed {acc, dec} (acceleration or deceleration).
|
|
8289
8486
|
:param phase: Vertical evolution phase {Climb, Descent, Cruise}.
|
|
8290
8487
|
:param control: A dictionary containing the following targets:
|
|
8488
|
+
|
|
8291
8489
|
- ROCDtarget: Rate of climb/descent to be followed [ft/min].
|
|
8292
8490
|
- slopetarget: Slope (flight path angle) to be followed [deg].
|
|
8293
8491
|
- acctarget: Acceleration to be followed [m/s^2].
|
|
@@ -8297,61 +8495,67 @@ def accDec_time(
|
|
|
8297
8495
|
:param DeltaTemp: Deviation from the standard ISA temperature [K].
|
|
8298
8496
|
:param wS: Wind speed component along the longitudinal axis (affects ground speed) [kt]. Default is 0.0.
|
|
8299
8497
|
:param turnMetrics: A dictionary defining turn parameters:
|
|
8498
|
+
|
|
8300
8499
|
- rateOfTurn [deg/s]
|
|
8301
8500
|
- bankAngle [deg]
|
|
8302
8501
|
- directionOfTurn {LEFT/RIGHT}. Default is straight flight.
|
|
8303
8502
|
:param Lat: Initial latitude [deg]. Default is None.
|
|
8304
8503
|
:param Lon: Initial longitude [deg]. Default is None.
|
|
8305
8504
|
:param initialHeading: A dictionary defining the initial heading (magnetic or true) and whether to fly a constant heading:
|
|
8505
|
+
|
|
8306
8506
|
- magnetic: Magnetic heading [deg].
|
|
8307
8507
|
- true: True heading [deg].
|
|
8308
8508
|
- constantHeading: Whether to maintain a constant heading. Default is None.
|
|
8309
8509
|
:param reducedPower: Boolean specifying if reduced power is applied during the climb. Default is None.
|
|
8310
8510
|
:param magneticDeclinationGrid: Optional grid of magnetic declination used to correct magnetic heading. Default is None.
|
|
8311
8511
|
:param kwargs: Additional optional parameters:
|
|
8512
|
+
|
|
8312
8513
|
- step_length: Length of each time step in the calculation [s]. Default is 1 second.
|
|
8313
8514
|
- SOC_init: Initial battery state of charge for electric aircraft (BADAE) [%]. Default is 100.
|
|
8314
8515
|
- config: Default aerodynamic configuration (TO, IC, CR, AP, LD). Default is None.
|
|
8315
|
-
-
|
|
8516
|
+
- calculationType: String indicating whether calculation is performed as INTEGRATED or POINT. Default is INTEGRATED.
|
|
8316
8517
|
- m_iter: Number of iterations for the mass integration loop. Default is 10 for BADA3/4/H, 5 for BADAE.
|
|
8317
|
-
|
|
8318
|
-
|
|
8319
|
-
|
|
8320
|
-
-
|
|
8321
|
-
-
|
|
8322
|
-
-
|
|
8323
|
-
-
|
|
8324
|
-
-
|
|
8325
|
-
-
|
|
8326
|
-
-
|
|
8327
|
-
-
|
|
8328
|
-
-
|
|
8329
|
-
-
|
|
8330
|
-
-
|
|
8331
|
-
-
|
|
8332
|
-
-
|
|
8333
|
-
-
|
|
8334
|
-
-
|
|
8335
|
-
-
|
|
8336
|
-
-
|
|
8337
|
-
-
|
|
8338
|
-
-
|
|
8339
|
-
-
|
|
8340
|
-
-
|
|
8341
|
-
-
|
|
8342
|
-
-
|
|
8343
|
-
|
|
8344
|
-
|
|
8345
|
-
-
|
|
8346
|
-
|
|
8347
|
-
-
|
|
8348
|
-
|
|
8349
|
-
|
|
8350
|
-
-
|
|
8351
|
-
-
|
|
8352
|
-
-
|
|
8353
|
-
-
|
|
8354
|
-
-
|
|
8518
|
+
|
|
8519
|
+
:returns: A pandas DataFrame containing the flight trajectory with columns such as:
|
|
8520
|
+
|
|
8521
|
+
- **Hp** - wAltitude [ft]
|
|
8522
|
+
- **TAS** - True Air Speed [kt]
|
|
8523
|
+
- **CAS** - Calibrated Air Speed [kt]
|
|
8524
|
+
- **GS** - Ground Speed [kt]
|
|
8525
|
+
- **M** - Mach number [-]
|
|
8526
|
+
- **ROCD** - Rate of Climb/Descent [ft/min]
|
|
8527
|
+
- **ESF** - Energy Share Factor [-]
|
|
8528
|
+
- **FUEL** - Fuel flow [kg/s]
|
|
8529
|
+
- **FUELCONSUMED** - Total fuel consumed [kg]
|
|
8530
|
+
- **THR** - Thrust force [N]
|
|
8531
|
+
- **DRAG** - Drag force [N]
|
|
8532
|
+
- **time** - Elapsed time [s]
|
|
8533
|
+
- **dist** - Distance flown [NM]
|
|
8534
|
+
- **slope** - Trajectory slope [deg]
|
|
8535
|
+
- **mass** - Aircraft mass [kg]
|
|
8536
|
+
- **config** - Aerodynamic configuration
|
|
8537
|
+
- **LAT** - Latitude [deg]
|
|
8538
|
+
- **LON** - Longitude [deg]
|
|
8539
|
+
- **HDGTrue** - True heading [deg]
|
|
8540
|
+
- **HDGMagnetic** - Magnetic heading [deg]
|
|
8541
|
+
- **BankAngle** - Bank angle [deg]
|
|
8542
|
+
- **ROT** - Rate of turn [deg/s]
|
|
8543
|
+
- **Comment** - Comments for each segment
|
|
8544
|
+
|
|
8545
|
+
- **For BADAH:**
|
|
8546
|
+
- **Preq** - Required power [W]
|
|
8547
|
+
- **Peng** - Generated power [W]
|
|
8548
|
+
- **Pav** - Available power [W]
|
|
8549
|
+
|
|
8550
|
+
- **For BADAE (electric aircraft):**
|
|
8551
|
+
- **Pmec** - Mechanical power [W]
|
|
8552
|
+
- **Pelc** - Electrical power [W]
|
|
8553
|
+
- **Pbat** - Power supplied by the battery [W]
|
|
8554
|
+
- **SOCr** - Rate of battery state of charge depletion [%/h]
|
|
8555
|
+
- **SOC** - Battery state of charge [%]
|
|
8556
|
+
- **Ibat** - Battery current [A]
|
|
8557
|
+
- **Vbat** - Battery voltage [V]
|
|
8558
|
+
- **Vgbat** - Ground battery voltage [V]
|
|
8355
8559
|
:rtype: pandas.DataFrame
|
|
8356
8560
|
"""
|
|
8357
8561
|
|
|
@@ -8393,7 +8597,12 @@ def accDec_time(
|
|
|
8393
8597
|
raise Exception("Undefined Heading value combination")
|
|
8394
8598
|
|
|
8395
8599
|
# calculation with constant mass (True) or integrated (False)
|
|
8396
|
-
|
|
8600
|
+
calculationType = kwargs.get("calculationType", "INTEGRATED")
|
|
8601
|
+
|
|
8602
|
+
if calculationType == "INTEGRATED":
|
|
8603
|
+
mass_const = False
|
|
8604
|
+
if calculationType == "POINT":
|
|
8605
|
+
mass_const = True
|
|
8397
8606
|
|
|
8398
8607
|
# optional parameter to define initial Baterry State of Charge (SOC)
|
|
8399
8608
|
if AC.BADAFamily.BADAE:
|
|
@@ -9504,4 +9713,5 @@ def accDec_time(
|
|
|
9504
9713
|
}
|
|
9505
9714
|
|
|
9506
9715
|
flightTrajectory = FT.createFlightTrajectoryDataframe(flightData)
|
|
9716
|
+
|
|
9507
9717
|
return flightTrajectory
|