Skip to content

Commit

Permalink
Handle when resp_vol4s are empty
Browse files Browse the repository at this point in the history
From an evaluation standpoint, if a system returns an invalid response, the test harness should fail the evaluation rather than exit with an exception.
  • Loading branch information
StevenPG authored Dec 4, 2024
1 parent 346b780 commit f3eb499
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions monitoring/uss_qualifier/scenarios/astm/utm/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ def validate_op_intent_details(

# Check that the USS is providing reasonable volume 4D
resp_vol4s = op_intent_details.volumes + op_intent_details.off_nominal_volumes
if len(resp_vol4s) == 0:
errors_text.append('OperationalIntentResponse did not return required volumes or off nominal volumes.')
return "; ".join(errors_text) if len(errors_text) > 0 else None

vol4c = Volume4DCollection.from_f3548v21(resp_vol4s)
resp_alts = vol4c.meter_altitude_bounds
resp_start = vol4c.time_start.datetime
Expand Down

0 comments on commit f3eb499

Please sign in to comment.