On Wed, Sep 5, 2012 at 2:17 PM, Gautier Hattenberger <address@hidden>
The master branch is now using a general state interface common to all firmwares (https://github.com/paparazzi/paparazzi/commit/dbdbbaf6c265c2abeaafcb588e39d2fa6a33536f).
This interface holds the most important vehicle states like attitude, position, speed, acceleration in different representations (eulers, quaternion, utm, lla, ltp, ...). The estimation filters (AHRS, INS, ...) can directly feed this central interface each with their own format. A key feature of this system is that you don't access the variables directly anymore, but use inline function to get (and set) the state and an automatic conversion is perform 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).
The files holding this interface are sw/airborne/state.c and .h
Most of the possible internal conversions are already implemented and are sufficient to cover the current state of the airborne code.
Moreover, all the firmwares/subsystems/modules in the master should now be converted to this new state interface.
Please use this interface for your futur developments and don't hesitate to report bugs. It is recommanded to make careful pre-flight checks and to do simulations before flying.
The known bugs are some debug messages that might send 0.
This new feature closes https://github.com/paparazzi/paparazzi/issues/101 and https://github.com/paparazzi/paparazzi/pull/237
A wiki page was started a long time ago and is a bit out-dated but gives the general idea of the interface (http://paparazzi.enac.fr/wiki/DevGuide/StateInterface). The doxygen docs will be automatically generated very soon.
Gautier (and Felix)
Paparazzi-devel mailing list