Skip to content
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

Add Mission Config File #5

Open
RexBerry opened this issue Aug 30, 2024 · 0 comments
Open

Add Mission Config File #5

RexBerry opened this issue Aug 30, 2024 · 0 comments
Labels
enhancement New feature or request flight Flight subteam / controls the flight or overarching control of the drone

Comments

@RexBerry
Copy link

RexBerry commented Aug 30, 2024

Add Mission Config File

Problem

Multiple locations in the code have to be changed to configure the mission settings and sim mode flag, with some tests requiring command-line arguments.

Solution

Add a mission_config.json file with mission settings and change the code to use it.

Code could be changed to use the state_machine.FlightSettings class, which could be modified to read from the config file. A method such as FlightSettings.get_from_config() could return a FlightSettings object, with the object being cached after being created for the first time. Additionally, this method could use command-line arguments (read using argparse) to allow the user to choose a different config file and override specific settings (for example, a -s option to set the sim flag).

Example mission_config.json:

{
    "waypointData": "flight/data/waypoint_data.json",
    "simFlag": true,
    "skipWaypoint": false,
    "standardObjectCount": 5
}

The config file could also contain other constants, such as the waypoint tolerance. Make sure the units (e.g., meters) are clearly documented.

Additional Information

Search the repo for waypoint_data.json, golf_data.json, sim_flag, and --sim to find most of the code that needs to be changed.

@RexBerry RexBerry added enhancement New feature or request flight Flight subteam / controls the flight or overarching control of the drone labels Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request flight Flight subteam / controls the flight or overarching control of the drone
Projects
None yet
Development

No branches or pull requests

1 participant