You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
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 asFlightSettings.get_from_config()
could return aFlightSettings
object, with the object being cached after being created for the first time. Additionally, this method could use command-line arguments (read usingargparse
) 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:
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.The text was updated successfully, but these errors were encountered: