Problem Description
There needs a way to be able to configure the jsbsim in various ways.
Configure the JSBSim FDM models
Configure sensor configurations on the vehicle
Solution
This adds a configuration parser that configures the jsbsim bridge with three systems. The lower elements on the list have higher priorities.
Configuration files: There exists one configuration file for each models. The configuration file exists under the config directory.
Command line arguments: Command line arguments are passed to configure the bridge dynamically on execution.
Environment variables: Use environment variables to override some configurations.
This also improves what are passed as command line arguments. The improvements are as the following.
The command line arguments that are necessary is reduced to 1. Although it sitll uses the 3rd argument, once this PR is merged I will switch to getopt based command line interface, since this also requires changes in the sitl_run.sh script in PX4/Firmware
The model directory/model file that was being handled in https://github.com/PX4/Firmware/blob/master/Tools/setup_jsbsim.bash is no longer necessary. Instead, it is specified as part of the config file. If the jsbsimbridge tag is not specified, it defaults to the models/<model>/<model>.xml path as this is the default behavior of JSBSim
Problem Description There needs a way to be able to configure the jsbsim in various ways.
Solution This adds a configuration parser that configures the jsbsim bridge with three systems. The lower elements on the list have higher priorities.
config
directory.This also improves what are passed as command line arguments. The improvements are as the following.
getopt
based command line interface, since this also requires changes in thesitl_run.sh
script in PX4/Firmwarejsbsimbridge
tag is not specified, it defaults to themodels/<model>/<model>.xml
path as this is the default behavior of JSBSimAdditional Context