Skip to content

Commit

Permalink
[modules] move INS from subsystems to modules
Browse files Browse the repository at this point in the history
  • Loading branch information
gautierhattenberger committed Nov 12, 2021
1 parent 246de70 commit f7e16fc
Show file tree
Hide file tree
Showing 54 changed files with 133 additions and 133 deletions.
10 changes: 5 additions & 5 deletions conf/modules/ins.xml
Expand Up @@ -16,14 +16,14 @@
<provides>ins</provides>
</dep>
<header>
<file name="ins_int.h" dir="subsystems/ins"/>
<file name="ins_int.h" dir="modules/ins"/>
</header>
<init fun="ins_int_init()"/>
<makefile target="ap|nps|hitl">
<define name="INS_TYPE_H" value="subsystems/ins/ins_int.h" type="string"/>
<file name="ins.c" dir="subsystems"/>
<file name="ins_int.c" dir="subsystems/ins"/>
<file name="vf_float.c" dir="subsystems/ins"/>
<define name="INS_TYPE_H" value="modules/ins/ins_int.h" type="string"/>
<file name="ins.c"/>
<file name="ins_int.c"/>
<file name="vf_float.c"/>
<test firmware="rotorcraft"/>
</makefile>
</module>
8 changes: 4 additions & 4 deletions conf/modules/ins_alt_float.xml
Expand Up @@ -17,13 +17,13 @@
<provides>ins</provides>
</dep>
<header>
<file name="ins_alt_float.h" dir="subsystems/ins"/>
<file name="ins_alt_float.h"/>
</header>
<init fun="ins_alt_float_init()"/>
<makefile target="ap|nps|sim" firmware="fixedwing">
<define name="INS_TYPE_H" value="subsystems/ins/ins_alt_float.h" type="string"/>
<file name="ins.c" dir="subsystems"/>
<file name="ins_alt_float.c" dir="subsystems/ins"/>
<define name="INS_TYPE_H" value="modules/ins/ins_alt_float.h" type="string"/>
<file name="ins.c"/>
<file name="ins_alt_float.c"/>
<test firmware="fixedwing"/>
</makefile>
</module>
12 changes: 6 additions & 6 deletions conf/modules/ins_ekf2.xml
Expand Up @@ -31,8 +31,8 @@
<dl_settings NAME="INS">
<!-- EKF2 Configuration parameters -->
<dl_settings name="ekf2">
<dl_setting var="ekf2_params.mag_fusion_type" min="0" step="1" max="5" shortname="mag_fusion" values="AUTO|HEADING|3D|AUTOFW|INDOOR|NONE" module="subsystems/ins/ins_ekf2" handler="change_param"/>
<dl_setting var="ekf2_params.fusion_mode" min="0" max="1" step="1" shortname="remove_gps" values="FALSE|TRUE" module="subsystems/ins/ins_ekf2" handler="remove_gps" type="bool" persistent="true"/>
<dl_setting var="ekf2_params.mag_fusion_type" min="0" step="1" max="5" shortname="mag_fusion" values="AUTO|HEADING|3D|AUTOFW|INDOOR|NONE" module="modules/ins/ins_ekf2" handler="change_param"/>
<dl_setting var="ekf2_params.fusion_mode" min="0" max="1" step="1" shortname="remove_gps" values="FALSE|TRUE" module="modules/ins/ins_ekf2" handler="remove_gps" type="bool" persistent="true"/>
</dl_settings>
</dl_settings>
</settings>
Expand All @@ -41,17 +41,17 @@
<provides>ins,ahrs</provides>
</dep>
<header>
<file name="ins_ekf2.h" dir="subsystems/ins"/>
<file name="ins_ekf2.h"/>
</header>
<init fun="ins_ekf2_init()"/>
<periodic fun="ins_ekf2_update()" autorun="TRUE"/>
<makefile target="ap|nps">
<configure name="CXXSTANDARD" value="-std=c++11"/>

<!-- EKF2 files -->
<define name="INS_TYPE_H" value="subsystems/ins/ins_ekf2.h" type="string"/>
<file name="ins.c" dir="subsystems"/>
<file name="ins_ekf2.cpp" dir="subsystems/ins"/>
<define name="INS_TYPE_H" value="modules/ins/ins_ekf2.h" type="string"/>
<file name="ins.c"/>
<file name="ins_ekf2.cpp"/>

<!-- Include the ecl and matrix libraries from ext -->
<include name="$(PAPARAZZI_SRC)/sw/ext/ecl/"/>
Expand Down
12 changes: 6 additions & 6 deletions conf/modules/ins_extended.xml
Expand Up @@ -25,7 +25,7 @@
<settings>
<dl_settings NAME="Ins Extended">
<dl_settings NAME="INS">
<dl_setting MAX="10" MIN="0" STEP="0.1" VAR="vff.accel_noise" shortname="accel_noise" module="subsystems/ins/vf_extended_float"/>
<dl_setting MAX="10" MIN="0" STEP="0.1" VAR="vff.accel_noise" shortname="accel_noise" module="modules/ins/vf_extended_float"/>
<dl_setting MAX="10" MIN="0" STEP="0.1" VAR="vff.r_baro" shortname="r_baro"/>
<dl_setting MAX="10" MIN="0" STEP="0.1" VAR="vff.r_alt" shortname="r_alt"/>
<dl_setting MAX="10" MIN="0" STEP="0.1" VAR="vff.r_obs_height" shortname="r_obs_height"/>
Expand All @@ -38,14 +38,14 @@
</dep>

<header>
<file name="ins_int.h" dir="subsystems/ins"/>
<file name="ins_int.h"/>
</header>
<init fun="ins_int_init()"/>
<makefile target="ap|nps">
<define name="INS_TYPE_H" value="subsystems/ins/ins_int.h" type="string"/>
<file name="ins.c" dir="subsystems"/>
<file name="ins_int.c" dir="subsystems/ins"/>
<file name="vf_extended_float.c" dir="subsystems/ins"/>
<define name="INS_TYPE_H" value="modules/ins/ins_int.h" type="string"/>
<file name="ins.c"/>
<file name="ins_int.c"/>
<file name="vf_extended_float.c"/>
<define name="USE_VFF_EXTENDED"/>
<test firmware="rotorcraft"/>
</makefile>
Expand Down
12 changes: 6 additions & 6 deletions conf/modules/ins_float_invariant.xml
Expand Up @@ -13,7 +13,7 @@
<dl_settings>
<dl_settings NAME="invariant">
<dl_setting MAX="1" MIN="1" STEP="1" VAR="ins_float_inv.reset" shortname="reset"/>
<dl_setting MAX="10" MIN="0." STEP="0.001" VAR="ins_float_inv.gains.lv" shortname="lv" module="subsystems/ins/ins_float_invariant"/>
<dl_setting MAX="10" MIN="0." STEP="0.001" VAR="ins_float_inv.gains.lv" shortname="lv" module="modules/ins/ins_float_invariant"/>
<dl_setting MAX="10" MIN="0." STEP="0.001" VAR="ins_float_inv.gains.lb" shortname="lb"/>
<dl_setting MAX="10" MIN="0." STEP="0.001" VAR="ins_float_inv.gains.mv" shortname="mv"/>
<dl_setting MAX="10" MIN="0." STEP="0.01" VAR="ins_float_inv.gains.mh" shortname="mh"/>
Expand All @@ -34,7 +34,7 @@
<provides>ins,ahrs</provides>
</dep>
<header>
<file name="ins_float_invariant_wrapper.h" dir="subsystems/ins"/>
<file name="ins_float_invariant_wrapper.h"/>
</header>
<init fun="ins_float_invariant_wrapper_init()"/>
<makefile target="ap|nps">
Expand All @@ -43,12 +43,12 @@
<define name="USE_MAGNETOMETER" cond="ifeq (,$(findstring $(USE_MAGNETOMETER),0 FALSE))"/>

<file name="ahrs_aligner.c" dir="modules/ahrs"/>
<file name="ins.c" dir="subsystems"/>
<file name="ins_float_invariant.c" dir="subsystems/ins"/>
<file name="ins_float_invariant_wrapper.c" dir="subsystems/ins"/>
<file name="ins.c"/>
<file name="ins_float_invariant.c"/>
<file name="ins_float_invariant_wrapper.c"/>

<define name="USE_AHRS_ALIGNER"/>
<define name="INS_TYPE_H" value="subsystems/ins/ins_float_invariant_wrapper.h" type="string"/>
<define name="INS_TYPE_H" value="modules/ins/ins_float_invariant_wrapper.h" type="string"/>
<test firmware="rotorcraft"/>
</makefile>
<makefile target="sim">
Expand Down
20 changes: 10 additions & 10 deletions conf/modules/ins_gps_passthrough.xml
Expand Up @@ -12,23 +12,23 @@
<provides>ins</provides>
</dep>
<header>
<file name="ins_gps_passthrough.h" dir="subsystems/ins"/>
<file name="ins_gps_passthrough.h"/>
</header>
<init fun="ins_gps_passthrough_init()"/>
<makefile target="ap|nps" firmware="rotorcraft">
<define name="INS_TYPE_H" value="subsystems/ins/ins_gps_passthrough.h" type="string"/>
<file name="ins.c" dir="subsystems"/>
<file name="ins_gps_passthrough.c" dir="subsystems/ins"/>
<define name="INS_TYPE_H" value="modules/ins/ins_gps_passthrough.h" type="string"/>
<file name="ins.c"/>
<file name="ins_gps_passthrough.c"/>
<test firmware="rotorcraft"/>
</makefile>
<makefile target="ap|sim|nps" firmware="fixedwing">
<define name="INS_TYPE_H" value="subsystems/ins/ins_gps_passthrough.h" type="string"/>
<file name="ins.c" dir="subsystems"/>
<file name="ins_gps_passthrough_utm.c" dir="subsystems/ins"/>
<define name="INS_TYPE_H" value="modules/ins/ins_gps_passthrough.h" type="string"/>
<file name="ins.c"/>
<file name="ins_gps_passthrough_utm.c"/>
</makefile>
<makefile target="ap" firmware="rover">
<define name="INS_TYPE_H" value="subsystems/ins/ins_gps_passthrough.h" type="string"/>
<file name="ins.c" dir="subsystems"/>
<file name="ins_gps_passthrough.c" dir="subsystems/ins"/>
<define name="INS_TYPE_H" value="modules/ins/ins_gps_passthrough.h" type="string"/>
<file name="ins.c"/>
<file name="ins_gps_passthrough.c"/>
</makefile>
</module>
12 changes: 6 additions & 6 deletions conf/modules/ins_hff.xml
Expand Up @@ -16,15 +16,15 @@
<provides>ins</provides>
</dep>
<header>
<file name="ins_int.h" dir="subsystems/ins"/>
<file name="ins_int.h"/>
</header>
<init fun="ins_int_init()"/>
<makefile target="ap|nps">
<define name="INS_TYPE_H" value="subsystems/ins/ins_int.h" type="string"/>
<file name="ins.c" dir="subsystems"/>
<file name="ins_int.c" dir="subsystems/ins"/>
<file name="vf_float.c" dir="subsystems/ins"/>
<file name="hf_float.c" dir="subsystems/ins"/>
<define name="INS_TYPE_H" value="modules/ins/ins_int.h" type="string"/>
<file name="ins.c"/>
<file name="ins_int.c"/>
<file name="vf_float.c"/>
<file name="hf_float.c"/>
<define name="USE_HFF"/>
<test firmware="rotorcraft">
<define name="AHRS_PROPAGATE_FREQUENCY" value="500"/>
Expand Down
14 changes: 7 additions & 7 deletions conf/modules/ins_hff_extended.xml
Expand Up @@ -19,7 +19,7 @@
<settings>
<dl_settings NAME="Ins Extended">
<dl_settings NAME="INS">
<dl_setting MAX="10" MIN="0" STEP="0.1" VAR="vff.accel_noise" shortname="accel_noise" module="subsystems/ins/vf_extended_float"/>
<dl_setting MAX="10" MIN="0" STEP="0.1" VAR="vff.accel_noise" shortname="accel_noise" module="modules/ins/vf_extended_float"/>
<dl_setting MAX="10" MIN="0" STEP="0.1" VAR="vff.r_baro" shortname="r_baro"/>
<dl_setting MAX="10" MIN="0" STEP="0.1" VAR="vff.r_alt" shortname="r_alt"/>
<dl_setting MAX="10" MIN="0" STEP="0.1" VAR="vff.r_obs_height" shortname="r_obs_height"/>
Expand All @@ -32,16 +32,16 @@
</dep>

<header>
<file name="ins_int.h" dir="subsystems/ins"/>
<file name="ins_int.h"/>
</header>
<init fun="ins_int_init()"/>
<makefile target="ap|nps">
<define name="INS_TYPE_H" value="subsystems/ins/ins_int.h" type="string"/>
<file name="ins.c" dir="subsystems"/>
<file name="ins_int.c" dir="subsystems/ins"/>
<file name="vf_extended_float.c" dir="subsystems/ins"/>
<define name="INS_TYPE_H" value="modules/ins/ins_int.h" type="string"/>
<file name="ins.c"/>
<file name="ins_int.c"/>
<file name="vf_extended_float.c"/>
<define name="USE_VFF_EXTENDED"/>
<file name="hf_float.c" dir="subsystems/ins"/>
<file name="hf_float.c"/>
<define name="USE_HFF"/>
<test firmware="rotorcraft">
<define name="AHRS_PROPAGATE_FREQUENCY" value="500"/>
Expand Down
2 changes: 1 addition & 1 deletion conf/modules/ins_mekf_wind.xml
Expand Up @@ -73,7 +73,7 @@
<define name="USE_MAGNETOMETER" cond="ifeq (,$(findstring $(USE_MAGNETOMETER),0 FALSE))"/>
<include name="$(PAPARAZZI_SRC)/sw/ext/eigen"/>
<file name="ahrs_aligner.c" dir="modules/ahrs"/>
<file name="ins.c" dir="subsystems"/>
<file name="ins.c"/>
<file name="ins_mekf_wind.cpp"/>
<file name="ins_mekf_wind_wrapper.c"/>
<flag name="LDFLAGS" value="lstdc++" />
Expand Down
14 changes: 7 additions & 7 deletions conf/modules/ins_nps.xml
Expand Up @@ -12,7 +12,7 @@
</dep>
<autoload name="gps_nps"/>
<header>
<file name="ins_gps_passthrough.h" dir="subsystems/ins"/>
<file name="ins_gps_passthrough.h"/>
</header>
<init fun="ins_gps_passthrough_init()"/>
<makefile target="nps|hitl">
Expand All @@ -30,13 +30,13 @@
</makefile>

<makefile target="nps|hitl" firmware="rotorcraft">
<define name="INS_TYPE_H" value="subsystems/ins/ins_gps_passthrough.h" type="string"/>
<file name="ins.c" dir="subsystems"/>
<file name="ins_gps_passthrough.c" dir="subsystems/ins"/>
<define name="INS_TYPE_H" value="modules/ins/ins_gps_passthrough.h" type="string"/>
<file name="ins.c"/>
<file name="ins_gps_passthrough.c"/>
</makefile>
<makefile target="nps|hitl" firmware="fixedwing">
<define name="INS_TYPE_H" value="subsystems/ins/ins_gps_passthrough.h" type="string"/>
<file name="ins.c" dir="subsystems"/>
<file name="ins_gps_passthrough_utm.c" dir="subsystems/ins"/>
<define name="INS_TYPE_H" value="modules/ins/ins_gps_passthrough.h" type="string"/>
<file name="ins.c"/>
<file name="ins_gps_passthrough_utm.c"/>
</makefile>
</module>
8 changes: 4 additions & 4 deletions conf/modules/ins_sim.xml
Expand Up @@ -13,7 +13,7 @@
<autoload name="imu_sim"/>
<autoload name="gps_sim"/>
<header>
<file name="ins_gps_passthrough.h" dir="subsystems/ins"/>
<file name="ins_gps_passthrough.h"/>
</header>
<init fun="ins_gps_passthrough_init()"/>
<makefile target="sim">
Expand All @@ -22,9 +22,9 @@
<define name="USE_AHRS"/>
<define name="AHRS_TYPE_H" value="modules/ahrs/ahrs_sim.h" type="string"/>

<file name="ins.c" dir="subsystems"/>
<file name="ins_gps_passthrough_utm.c" dir="subsystems/ins"/>
<define name="INS_TYPE_H" value="subsystems/ins/ins_gps_passthrough.h" type="string"/>
<file name="ins.c"/>
<file name="ins_gps_passthrough_utm.c"/>
<define name="INS_TYPE_H" value="modules/ins/ins_gps_passthrough.h" type="string"/>
<test firmware="rotorcraft">
<define name="PRIMARY_AHRS" value="ahrs_sim"/>
<define name="AHRS_TYPE_H" value="modules/ahrs/ahrs_sim.h" type="string"/>
Expand Down
2 changes: 1 addition & 1 deletion conf/modules/ins_skeleton.xml
Expand Up @@ -28,7 +28,7 @@
</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.c"/>
<file name="ins_skeleton.c"/>
<test firmware="rotorcraft"/>
</makefile>
Expand Down
14 changes: 7 additions & 7 deletions conf/modules/ins_vectornav.xml
Expand Up @@ -17,7 +17,7 @@
<autoload name="imu_sim"/>
<autoload name="imu_nps"/>
<header>
<file name="ins.h" dir="subsystems"/>
<file name="ins.h"/>
</header>
<init fun="ins_vectornav_init()"/>
<periodic fun="ins_vectornav_monitor()" freq="1.0" autorun="TRUE"/>
Expand All @@ -33,21 +33,21 @@

<file name="vn200_serial.c" dir="peripherals"/>

<file name="ins.c" dir="subsystems"/>
<file name="ins_vectornav.c" dir="subsystems/ins"/>
<file name="ins_vectornav_wrapper.c" dir="subsystems/ins"/>
<define name="INS_TYPE_H" value="subsystems/ins/ins_vectornav_wrapper.h" type="string"/>
<file name="ins.c"/>
<file name="ins_vectornav.c"/>
<file name="ins_vectornav_wrapper.c"/>
<define name="INS_TYPE_H" value="modules/ins/ins_vectornav_wrapper.h" type="string"/>

<file name="gps.c" dir="modules/gps"/>
<define name="USE_GPS"/>
<raw>
ifdef SECONDARY_GPS
ifneq (,$(findstring $(SECONDARY_GPS), vectornav))
# this is the secondary GPS
ap.CFLAGS += -DGPS_SECONDARY_TYPE_H=\"subsystems/ins/ins_vectornav_wrapper.h\"
ap.CFLAGS += -DGPS_SECONDARY_TYPE_H=\"modules/ins/ins_vectornav_wrapper.h\"
ap.CFLAGS += -DSECONDARY_GPS=GPS_VECTORNAV
else
ap.CFLAGS += -DGPS_TYPE_H=\"subsystems/ins/ins_vectornav_wrapper.h\"
ap.CFLAGS += -DGPS_TYPE_H=\"modules/ins/ins_vectornav_wrapper.h\"
ap.CFLAGS += -DPRIMARY_GPS=GPS_VECTORNAV
endif
else
Expand Down
2 changes: 1 addition & 1 deletion conf/modules/ins_xsens.xml
Expand Up @@ -25,7 +25,7 @@
<file name="xsens.c"/>
<file name="xsens_parser.c"/>
<file name="ins_xsens.c"/>
<file name="ins.c" dir="subsystems"/>
<file name="ins.c"/>
<configure name="XSENS_PORT" default="uart1" case="upper|lower"/>
<configure name="XSENS_BAUD" default="B115200"/>
<define name="USE_$(XSENS_PORT_UPPER)" value="1"/>
Expand Down
2 changes: 1 addition & 1 deletion conf/modules/ins_xsens700.xml
Expand Up @@ -25,7 +25,7 @@
<file name="xsens700.c"/>
<file name="xsens_parser.c"/>
<file name="ins_xsens700.c"/>
<file name="ins.c" dir="subsystems"/>
<file name="ins.c"/>
<configure name="XSENS_PORT" default="uart1" case="upper|lower"/>
<configure name="XSENS_BAUD" default="B115200"/>
<define name="USE_$(XSENS_PORT_UPPER)" value="1"/>
Expand Down
2 changes: 1 addition & 1 deletion sw/airborne/boards/ardrone/navdata.c
Expand Up @@ -43,7 +43,7 @@

#include "std.h"
#include "navdata.h"
#include "subsystems/ins.h"
#include "modules/ins/ins.h"
#include "modules/ahrs/ahrs.h"
#include "modules/core/abi.h"
#include "mcu_periph/gpio.h"
Expand Down
2 changes: 1 addition & 1 deletion sw/airborne/firmwares/rotorcraft/guidance/guidance_indi.c
Expand Up @@ -33,7 +33,7 @@
*/
#include "generated/airframe.h"
#include "firmwares/rotorcraft/guidance/guidance_indi.h"
#include "subsystems/ins/ins_int.h"
#include "modules/ins/ins_int.h"
#include "modules/radio_control/radio_control.h"
#include "state.h"
#include "modules/imu/imu.h"
Expand Down
Expand Up @@ -29,7 +29,7 @@

#include "generated/airframe.h"
#include "firmwares/rotorcraft/guidance/guidance_indi_hybrid.h"
#include "subsystems/ins/ins_int.h"
#include "modules/ins/ins_int.h"
#include "modules/radio_control/radio_control.h"
#include "state.h"
#include "modules/imu/imu.h"
Expand Down
2 changes: 1 addition & 1 deletion sw/airborne/firmwares/rotorcraft/navigation.c
Expand Up @@ -32,7 +32,7 @@

#include "pprz_debug.h"
#include "modules/gps/gps.h" // needed by auto_nav from the flight plan
#include "subsystems/ins.h"
#include "modules/ins/ins.h"
#include "state.h"

#include "autopilot.h"
Expand Down
2 changes: 1 addition & 1 deletion sw/airborne/firmwares/rover/navigation.c
Expand Up @@ -31,7 +31,7 @@

#include "pprz_debug.h"
#include "modules/gps/gps.h" // needed by auto_nav from the flight plan
#include "subsystems/ins.h"
#include "modules/ins/ins.h"
#include "state.h"

#include "autopilot.h"
Expand Down

0 comments on commit f7e16fc

Please sign in to comment.