Paparazzi UAS  v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ins_skeleton module

INS module skeleton.

This module is meant to be used with an additional module which implements any of the following

In each of those functions the updated estimate has to be written to the ins_module struct, which is then used to update the state interface.

Example for airframe file

Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!

1 <module name="ins_skeleton">
2  <define name="INS_MODULE_IMU_ID" value="ABI_BROADCAST" />
3  <define name="INS_MODULE_BARO_ID" value="ABI_BROADCAST" />
4  <define name="INS_MODULE_GPS_ID" value="GPS_MULTI_ID" />
5 </module>

Module configuration options

Define Options

  • name: INS_MODULE_IMU_ID value: ABI_BROADCAST
    Description: ABI sender id of IMU messages to subscribe to
  • name: INS_MODULE_BARO_ID value: ABI_BROADCAST
    Description: ABI sender id of BARO_ABS messages to subscribe to
  • name: INS_MODULE_GPS_ID value: GPS_MULTI_ID
    Description: ABI sender id of GPS messages to subscribe to

Module functions

Init Functions

These initialization functions are called once on startup.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw ins_skeleton.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="ins_skeleton" dir="ins">
<doc>
<description>
INS module skeleton.
This module is meant to be used with an additional module which implements any of the following
- ins_module_init()
- ins_module_propagate(struct Int32Vect3 *accel, float dt)
- ins_module_update_gps(struct GpsState *gps_s, float dt)
- ins_module_update_baro(float pressure)
- ins_module_reset_local_origin(void)
In each of those functions the updated estimate has to be written to the ins_module struct,
which is then used to update the state interface.
</description>
<define name="INS_MODULE_IMU_ID" value="ABI_BROADCAST" description="ABI sender id of IMU messages to subscribe to"/>
<define name="INS_MODULE_BARO_ID" value="ABI_BROADCAST" description="ABI sender id of BARO_ABS messages to subscribe to"/>
<define name="INS_MODULE_GPS_ID" value="GPS_MULTI_ID" description="ABI sender id of GPS messages to subscribe to"/>
</doc>
<init fun="ins_module_wrapper_init()"/>
<header>
<file name="ins_skeleton.h"/>
</header>
<makefile target="ap|nps" firmware="rotorcraft">
<define name="INS_TYPE_H" value="modules/ins/ins_skeleton.h" type="string"/>
<file name="ins.c" dir="subsystems"/>
<file name="ins_skeleton.c"/>
</makefile>
</module>