File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ def main():
179
179
kwargs ['prediction_sea_level_descent_rate' ] = float (args .prediction_descent_rate )
180
180
181
181
if args .prediction_float_altitude is not None :
182
- kwargs ['prediction_float_altitude' ] = float (args .prediction_descent_rate )
182
+ kwargs ['prediction_float_altitude' ] = float (args .prediction_float_altitude )
183
183
184
184
if args .prediction_float_duration is not None :
185
185
kwargs ['prediction_float_duration' ] = timedelta (seconds = float (args .prediction_float_duration ))
Original file line number Diff line number Diff line change @@ -204,8 +204,8 @@ def get(self) -> {str: Any}:
204
204
response = response .json ()
205
205
if 'error' not in response :
206
206
# TODO tawhiri currently does not include descent when querying a float profile
207
- # this code runs another prediction query with a standard profile and extracts the descent stage to append to the response from the original query
208
207
if self .profile == FlightProfile .float :
208
+ # this code runs another prediction query with a standard profile and extracts the descent stage to append to the response from the original query
209
209
for stage in response ['prediction' ]:
210
210
# if a descent stage exists, we don't need to do anything
211
211
if stage ['stage' ] == 'descent' :
@@ -414,7 +414,7 @@ def get_predictions(
414
414
if len (packets_at_float_altitude ) > 0 and packets_at_float_altitude [- 1 ].time == packet_track .times [- 1 ]:
415
415
float_start_time = packets_at_float_altitude [0 ].time
416
416
descent_only = False
417
- elif packet_track .ascent_rates [- 1 ] > 0 :
417
+ elif packet_track .ascent_rates [- 1 ] >= 0 :
418
418
float_start_time = prediction_start_time + timedelta (seconds = (float_altitude - prediction_start_location [2 ]) / ascent_rate )
419
419
descent_only = False
420
420
else :
You can’t perform that action at this time.
0 commit comments