Skip to content

Commit 2b9db8f

Browse files
fixed minor bugs
1 parent e00d1be commit 2b9db8f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

client/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def main():
179179
kwargs['prediction_sea_level_descent_rate'] = float(args.prediction_descent_rate)
180180

181181
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)
183183

184184
if args.prediction_float_duration is not None:
185185
kwargs['prediction_float_duration'] = timedelta(seconds=float(args.prediction_float_duration))

packetraven/predicts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ def get(self) -> {str: Any}:
204204
response = response.json()
205205
if 'error' not in response:
206206
# 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
208207
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
209209
for stage in response['prediction']:
210210
# if a descent stage exists, we don't need to do anything
211211
if stage['stage'] == 'descent':
@@ -414,7 +414,7 @@ def get_predictions(
414414
if len(packets_at_float_altitude) > 0 and packets_at_float_altitude[-1].time == packet_track.times[-1]:
415415
float_start_time = packets_at_float_altitude[0].time
416416
descent_only = False
417-
elif packet_track.ascent_rates[-1] > 0:
417+
elif packet_track.ascent_rates[-1] >= 0:
418418
float_start_time = prediction_start_time + timedelta(seconds=(float_altitude - prediction_start_location[2]) / ascent_rate)
419419
descent_only = False
420420
else:

0 commit comments

Comments
 (0)