It is a bit of a hack, especially we can't disable changing settings if datalink is disabled,
since we need to parse that to enable the datalink via settings again.
Nevertheless it should suffice for most cases and close#934
Continue refactoring of AHRS and INS:
- add GEO_MAG ABI message
- add GPS ABI message
- remove explicit calling of update_gps functions (replaced by GPS ABI callbacks)
- each ins has it's own unique struct/function names
- send STATE_FILTER_STATUS from each implementation (with added id if you run multiple ones)
- use stateIsAttitudeValid() instead of AHRS.is_aligned
- The state interface is initialized with invalid attitude.
It becomes valid as soon as an attitude is set (via one of the stateSetNedToBodyX functions).
This should be only done by an AHRS/INS after it is aligned.
- add possibility to run multiple (currently two) AHRS implementations and switch which one should push the output to the state interface during runtime
`ahrs_init()` and `ins_init()` are now sort of "dispatcher" functions, that init/register the actually used implementation.
As an example using `float_mlkf` as the `PRIMARY_AHRS` and `int_cmpl_quat` as `SECONDARY_AHRS`, in your firmware section of the airframe file:
```
<subsystem name="ahrs" type="float_mlkf"/>
<subsystem name="ahrs" type="int_cmpl_quat">
<configure name="SECONDARY_AHRS" value="int_cmpl_quat"/>
</subsystem>
```
In `ahrs_init()` it calls the ahrs_x_register functions for both. Each of those calls their own ahrs_foo_init and then `ahrs_register_impl(enable_output_function)`, then do the ABI binding and register periodic telemetry functions.
The "enable_output_function" pointer is used to keep a reference to the implementation functions to switch on/off publishing of the output to the state interface.
Hence you can call `ahrs_switch(idx)` at runtime to switch the output of the AHRS implementations.
E.g. with idx=1 switch to the output of the secondary AHRS (with 0 being the primary)
Add the `conf/settings/estimators/ahrs_secondary.xml` settings file to switch them via settings.
Flight recorder module
Allow to define the messages to be logged from the telemetry file (with FlightRecorder process).
Working with SD log on Apogee, but should also work with data logger over uart.
The periodic telemetry structures had to be merged in a single one, so messages are registering for all telemetries.
* master: (76 commits)
[ocaml] [sim] Switched to dynamic linking on OS X.
[ocaml] remove leftover file
[ocaml] clean up sed invocation
remove more sim_uart
remove unused sim_uart
fix typo in ivy_transport
remove max3100 module and update gsm module
[device] rename transmit with put_byte
[device] rename get_char with get_byte
Fixing sed invocation on OS X.
[fix][ocaml] fix formatting of MOVE_WP and ACINFO
[fix][ocaml] uint32 are actually stored in Int64
remove obsolete link macros
[ins] start considering BODY_TO_GPS translation
[gcs] don't call Gtk element before GtkInit
[ocaml][simulator] remove myGtkInit by calling init directly in simsitl.ml
[ocaml] remove myGtkInit.ml, call Main.init directly in gcs.ml
[ocaml] replace LABLGTK2GNOMECANVAS in META.pprz
[ocaml] remove dysfunct caml_from_c_example
[ocaml] remove old unused gtk files
...
An interesting lesson here is that ocamlc assumes that all .so files are
shared libraries. It does not do the same for .dylib files. This is why
we have to compile a dylib and save it away as a .so so that ocamlc is
able to do the right thing.
Use the generic device interface for receiving data stream (transmission was already done).
Tested on stm32f4 (xbee_api, ublox over uart, log), lpc21 (transparant), ardrone2 (udp, ublox over ftdi)
This is also a necessary step to continue the rt_chibios integration due to conflicting definition of peripherals (when used with uppercase).