Skip to content

[monitorlib] Add generic flight_planning client #234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

BenjaminPelletier
Copy link
Member

This PR primarily introduces a new API-agnostic client to command USSs to perform flight planning activities. The business object data structures are patterned off the new flight_planning API, but the business objects are intended to be independent of API development and the first implementation of this flight planning client in this PR uses the legacy scd API. That new client is then used in the existing FlightPlanner object to minimize changes in a single PR -- a later PR will remove or substantially change the FlightPlanner object to more closely align with the new flight_planning API and this client. Another later PR will also switch flight intent data from the existing format to the FlightInfoTemplate format established in this PR, at which point injection using the new client will be simpler and we can avoid the current double conversion between legacy SCD API and new flight planning paradigm.

A bug with moderate functional impact is fixed: previously, mock_uss would reject attempts to make a flight Nonconforming when it conflicted with another operational intent even though off-nominal operational intents should be allowed to conflict with other operational intents. Note that a lot of lines are marked as changes in routes_injection, but most of lines 300+ are just indenting previously-existing code. A few other smaller potential bugs are fixed as well: the off-nominal volumes are counted as well when computing operational intent bounds.

A bug/TODO in conflict_equal_priority_not_permitted hiding the bug above is also fixed now that NotSupported is available.

The flight_intent_validation scenario is updated to remove the test case where a nominal flight with off-nominal volumes is injected since this is merely an invalid injection request (which can no longer be represented with the new client) and not really testing the standard requirements. Instead, OPIN0015 is still tested by checking nominal operational intents for off_nominal_volumes at each opportunity.

Since ConflictWithFlight is deprecated, Rejected is added as another acceptable result whenever ConflictWithFlight is expected.

A small bug in test_steps is fixed for responses that do not specify certain optional fields.

@BenjaminPelletier BenjaminPelletier marked this pull request as ready for review October 10, 2023 03:06
Copy link
Contributor

@barroco barroco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job at mapping the legacy api to the new one. Thanks for breaking it down in an isolated PR.

@BenjaminPelletier BenjaminPelletier merged commit 5d7821e into interuss:main Oct 11, 2023
@BenjaminPelletier BenjaminPelletier deleted the feature/flight-planning-client branch October 11, 2023 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants