-
Notifications
You must be signed in to change notification settings - Fork 32
parse_json() and configs.json
configs.json serves as an input file for configurations for quick scan, such as what aspects of the program are simulated, the label of the vehicle, whether the program is being run on a quadcopter or VTOL, etc. If you are working with a parameter that should be an input to the entire quick scan program, add it to configs.json. At the beginning of quick scan, it will be parsed into a dictionary called configs. Then, access that dictionary in the area of code that you're working in to see the value of the parameter.
Details on how these work:
parse_json():
Searches the current directory for the .json file specified in the first command line argument; if the specified file is found, returns a dict of its contents. Otherwise, a FileNotFound exception is raised. If no command line arguments are given, the function defaults to searching for "configs.json".
configs.json:
Text file that contains a set of key-value pairs in the form
{ "keyA": valuea, "keyB": valueb, ... "keyX": valuex }
where keys are strings and values are numbers, strings, booleans, etc.
Note: Currently, "xbee_port_name" and "mission_control_MAC" are hard-coded in and are computer dependent.
- Project Overview
- Dependency List
- GCS JSON Message Formatting
- Dronekit mission_basic.py
- Continuous Integration with Travis
- Engineering Requirements
- Test Hierarchy
- Style Guide
- Glossary