The idea is to create a general state interface that holds the most
important vehicle states like attitude, position, speed, acceleration. This interface can then be used by fixedwing and rotorcraft firmwares. It will also replace the estimator interface for fixedwings (a new estimator_ir will be created to hold the attitude estimates from the IR sensors). Hence it will be also be possible to switch between estimation from IMU and IR (e.g. for IR fallbacks).
With this we can also make sure that we can e.g. run any AHRS or INS algorithm regardless if it is used for fixedwing or rotorcraft. (Right now you have to convert it and copy it to estimator for fw).
Another key feature of the state interface is that you don't access the variables directly anymore, but use inline functions to set and get the state and the different representations will only be computed when needed.
When you e.g. set the position in ECEF coordinates, you only set the status bit for that position representation (clearing all others). If you then want to get the position in local NED coordinates this representation is computed on-the-fly and the status bit for that representation set. If you get the same representation again before a new position has been set, the representation won't be recomputed because it is already up-to-date (status bit for that position representation is one).
I also documented the interface and the structs used. You can use Doxygen to generate html docs for this by running doxygen in your main paparazzi folder. The generated html files are in the dox directory.
Comments, suggestions and patches are welcome...
[Prev in Thread]
[Next in Thread]
[Paparazzi-devel] RFC: new_state_interface,