From 26b66809b056a27d7622e01f362bc2b981dbac09 Mon Sep 17 00:00:00 2001 From: Gautier Hattenberger Date: Thu, 27 Sep 2018 11:15:27 +0200 Subject: [PATCH] Conf cleaning (#2327) * [cleaning] remove PBN module * [cleaning] remove ENOSE module * [cleaning] update ENAC conf * Cleaning on flight plans * [cleaning] clean example and test conf * add gazebo to the install step and compile example airframe --- .gitmodules | 1 - .travis.yml | 4 +- conf/airframes/ENAC/conf_enac.xml | 84 +----- conf/airframes/ENAC/fixed-wing/crrcsim.xml | 19 +- conf/airframes/ENAC/fixed-wing/funjet2.xml | 247 ---------------- conf/airframes/ENAC/fixed-wing/merlin.xml | 198 ------------- conf/airframes/ENAC/fixed-wing/mythe.xml | 265 ------------------ conf/airframes/ENAC/fixed-wing/quark1.xml | 214 -------------- conf/airframes/ENAC/quadrotor/ard2_102.xml | 34 --- conf/airframes/ENAC/quadrotor/bebop_201.xml | 219 --------------- conf/airframes/ENAC/quadrotor/blender.xml | 246 ---------------- .../ENAC/quadrotor/ladybird_lisa_s.xml | 241 ---------------- conf/conf_example.xml | 143 ---------- conf/conf_tests.xml | 165 ++--------- conf/flight_plans/IS.xml | 160 ----------- .../{ => formation}/form_follow.xml | 2 +- .../{ => formation}/form_leader.xml | 2 +- conf/flight_plans/generic.xml | 50 ---- conf/flight_plans/{ => legacy}/corsica.xml | 2 +- .../{ => legacy}/corsica_sectors.xml | 2 +- conf/flight_plans/{ => legacy}/creidlitz.xml | 2 +- conf/flight_plans/{ => legacy}/fp_tp_auto.xml | 2 +- .../{ => legacy}/grosslobke_demo.xml | 2 +- .../{ => legacy}/grosslobke_kreise.xml | 0 .../{ => legacy}/grosslobke_start.xml | 0 .../{ => legacy}/ingolfsskali.xml | 2 +- conf/flight_plans/{ => legacy}/kalscott.xml | 2 +- .../{ => legacy}/muret_demo_1.xml | 0 conf/flight_plans/{ => legacy}/muret_for.xml | 2 +- conf/flight_plans/{ => legacy}/nordlys.xml | 2 +- .../quadshot_land_takeoff_again.xml | 2 +- .../{ => legacy}/rotorcraft_krooz.xml | 2 +- .../{ => legacy}/rotorcraft_oa_avoid.xml | 2 +- .../{ => legacy}/slayer_training.xml | 2 +- .../versatile_carto_fixe_muret.xml | 2 +- conf/flight_plans/xsens_cachejunction.xml | 102 ------- conf/modules/enose.xml | 34 --- conf/modules/pbn.xml | 39 --- .../arch/sim/modules/enose/sim_enose.c | 29 -- sw/airborne/boards/pc_sim.h | 3 + sw/airborne/modules/enose/anemotaxis.c | 108 ------- sw/airborne/modules/enose/anemotaxis.h | 10 - sw/airborne/modules/enose/chemo_detect.c | 38 --- sw/airborne/modules/enose/chemo_detect.h | 12 - sw/airborne/modules/enose/chemotaxis.c | 57 ---- sw/airborne/modules/enose/chemotaxis.h | 9 - sw/airborne/modules/enose/enose.c | 92 ------ sw/airborne/modules/enose/enose.h | 34 --- .../modules/sensors/pressure_board_navarro.c | 161 ----------- .../modules/sensors/pressure_board_navarro.h | 62 ---- sw/airborne/subsystems/abi_sender_ids.h | 4 - 51 files changed, 54 insertions(+), 3062 deletions(-) delete mode 100644 conf/airframes/ENAC/fixed-wing/funjet2.xml delete mode 100644 conf/airframes/ENAC/fixed-wing/merlin.xml delete mode 100644 conf/airframes/ENAC/fixed-wing/mythe.xml delete mode 100644 conf/airframes/ENAC/fixed-wing/quark1.xml delete mode 100644 conf/airframes/ENAC/quadrotor/ard2_102.xml delete mode 100644 conf/airframes/ENAC/quadrotor/bebop_201.xml delete mode 100644 conf/airframes/ENAC/quadrotor/blender.xml delete mode 100644 conf/airframes/ENAC/quadrotor/ladybird_lisa_s.xml delete mode 100644 conf/flight_plans/IS.xml rename conf/flight_plans/{ => formation}/form_follow.xml (97%) rename conf/flight_plans/{ => formation}/form_leader.xml (98%) delete mode 100644 conf/flight_plans/generic.xml rename conf/flight_plans/{ => legacy}/corsica.xml (98%) rename conf/flight_plans/{ => legacy}/corsica_sectors.xml (96%) rename conf/flight_plans/{ => legacy}/creidlitz.xml (98%) rename conf/flight_plans/{ => legacy}/fp_tp_auto.xml (99%) rename conf/flight_plans/{ => legacy}/grosslobke_demo.xml (99%) rename conf/flight_plans/{ => legacy}/grosslobke_kreise.xml (100%) rename conf/flight_plans/{ => legacy}/grosslobke_start.xml (100%) rename conf/flight_plans/{ => legacy}/ingolfsskali.xml (98%) rename conf/flight_plans/{ => legacy}/kalscott.xml (98%) rename conf/flight_plans/{ => legacy}/muret_demo_1.xml (100%) rename conf/flight_plans/{ => legacy}/muret_for.xml (94%) rename conf/flight_plans/{ => legacy}/nordlys.xml (98%) rename conf/flight_plans/{ => legacy}/quadshot_land_takeoff_again.xml (98%) rename conf/flight_plans/{ => legacy}/rotorcraft_krooz.xml (98%) rename conf/flight_plans/{ => legacy}/rotorcraft_oa_avoid.xml (94%) rename conf/flight_plans/{ => legacy}/slayer_training.xml (98%) rename conf/flight_plans/{ => legacy}/versatile_carto_fixe_muret.xml (99%) delete mode 100644 conf/flight_plans/xsens_cachejunction.xml delete mode 100644 conf/modules/enose.xml delete mode 100644 conf/modules/pbn.xml delete mode 100644 sw/airborne/arch/sim/modules/enose/sim_enose.c delete mode 100644 sw/airborne/modules/enose/anemotaxis.c delete mode 100644 sw/airborne/modules/enose/anemotaxis.h delete mode 100644 sw/airborne/modules/enose/chemo_detect.c delete mode 100644 sw/airborne/modules/enose/chemo_detect.h delete mode 100644 sw/airborne/modules/enose/chemotaxis.c delete mode 100644 sw/airborne/modules/enose/chemotaxis.h delete mode 100644 sw/airborne/modules/enose/enose.c delete mode 100644 sw/airborne/modules/enose/enose.h delete mode 100644 sw/airborne/modules/sensors/pressure_board_navarro.c delete mode 100644 sw/airborne/modules/sensors/pressure_board_navarro.h diff --git a/.gitmodules b/.gitmodules index 7ca58eb691..77acd9b9e7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -41,7 +41,6 @@ [submodule "sw/ext/tudelft_gazebo_models"] path = sw/ext/tudelft_gazebo_models url = https://github.com/tudelft/gazebo_models.git - shallow = true [submodule "sw/ext/eigen"] path = sw/ext/eigen url = https://github.com/eigenteam/eigen-git-mirror.git diff --git a/.travis.yml b/.travis.yml index 83114b5a7b..915826e1b1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,9 +7,11 @@ compiler: before_install: - sudo add-apt-repository ppa:paparazzi-uav/ppa -y - sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa -y + - sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' + - wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - - sudo apt-get update -q install: - - sudo apt-get install -y --force-yes paparazzi-dev paparazzi-jsbsim gcc-arm-embedded gcc-arm-linux-gnueabi libipc-run-perl rustc cargo + - sudo apt-get install -y --force-yes paparazzi-dev paparazzi-jsbsim gcc-arm-embedded gcc-arm-linux-gnueabi libipc-run-perl rustc cargo libgazebo7-dev script: - arm-none-eabi-gcc --version - if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then if [ "${TRAVIS_EVENT_TYPE}" == "cron" ]; then make test_all_confs; else make test; fi; fi diff --git a/conf/airframes/ENAC/conf_enac.xml b/conf/airframes/ENAC/conf_enac.xml index d63ab66b25..fe532310d2 100644 --- a/conf/airframes/ENAC/conf_enac.xml +++ b/conf/airframes/ENAC/conf_enac.xml @@ -21,28 +21,6 @@ settings_modules="modules/stabilization_int_quat.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps_ubx_ucenter.xml modules/gps.xml modules/imu_common.xml" gui_color="yellow" /> - - - - - - - + - - - - - - - - @@ -47,15 +39,6 @@ - - - - diff --git a/conf/airframes/ENAC/fixed-wing/funjet2.xml b/conf/airframes/ENAC/fixed-wing/funjet2.xml deleted file mode 100644 index 06b55319b4..0000000000 --- a/conf/airframes/ENAC/fixed-wing/funjet2.xml +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
- - - - - - - - - -
- - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - - -
- -
- - -
- -
- - - - - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - - - - - - - - - - - - - - - -
- -
- -
- -
- - - - - -
- -
- - - - - - -
- -
diff --git a/conf/airframes/ENAC/fixed-wing/merlin.xml b/conf/airframes/ENAC/fixed-wing/merlin.xml deleted file mode 100644 index 67fc062509..0000000000 --- a/conf/airframes/ENAC/fixed-wing/merlin.xml +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - - - - - - - -
- - -
- -
- - - - - - - - - - - - - - - -
- -
- - - - - -
- -
- - - - - - - - - - -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- - - - - - - - -
- -
- - - - - -
- -
- diff --git a/conf/airframes/ENAC/fixed-wing/mythe.xml b/conf/airframes/ENAC/fixed-wing/mythe.xml deleted file mode 100644 index 9b4aeb6274..0000000000 --- a/conf/airframes/ENAC/fixed-wing/mythe.xml +++ /dev/null @@ -1,265 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
- - - - - - - - - -
- - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - -
- -
- - -
- -
- - - - - - - - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- - - - - -
- -
- - - - - - -
- -
diff --git a/conf/airframes/ENAC/fixed-wing/quark1.xml b/conf/airframes/ENAC/fixed-wing/quark1.xml deleted file mode 100644 index 6330eac7a4..0000000000 --- a/conf/airframes/ENAC/fixed-wing/quark1.xml +++ /dev/null @@ -1,214 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -
- - -
- -
- - - -
- -
- - - - - - - - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - - - - - - - - - - - - - - - - - -
- -
- - - - - -
- -
- -
- -
diff --git a/conf/airframes/ENAC/quadrotor/ard2_102.xml b/conf/airframes/ENAC/quadrotor/ard2_102.xml deleted file mode 100644 index 74111fa3c4..0000000000 --- a/conf/airframes/ENAC/quadrotor/ard2_102.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - -
- - - - - - - - - - - - - - - - - - - - - - -
- -
diff --git a/conf/airframes/ENAC/quadrotor/bebop_201.xml b/conf/airframes/ENAC/quadrotor/bebop_201.xml deleted file mode 100644 index d5cd93f4f9..0000000000 --- a/conf/airframes/ENAC/quadrotor/bebop_201.xml +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
- - - -
- - - - - - -
- -
- - - - -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - - -
- -
- - - - - - - -
- -
- - - -
- -
- - - - -
- -
- - - - - -
-
diff --git a/conf/airframes/ENAC/quadrotor/blender.xml b/conf/airframes/ENAC/quadrotor/blender.xml deleted file mode 100644 index cf79682026..0000000000 --- a/conf/airframes/ENAC/quadrotor/blender.xml +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - - - - - - - - -
- -
- - - - - - - -
- -
- -
- -
- - - - -
- -
- -
- -
- -
- -
- - - - - -
- -
- -
- -
- - - -
- -
diff --git a/conf/airframes/ENAC/quadrotor/ladybird_lisa_s.xml b/conf/airframes/ENAC/quadrotor/ladybird_lisa_s.xml deleted file mode 100644 index f129adb70e..0000000000 --- a/conf/airframes/ENAC/quadrotor/ladybird_lisa_s.xml +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
- -
- - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
- -
- - - - - -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
- -
- - - - -
- -
- - - -
- -
- - - -
- -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/conf/conf_example.xml b/conf/conf_example.xml index f4c598806d..b575d3fe6f 100644 --- a/conf/conf_example.xml +++ b/conf/conf_example.xml @@ -1,26 +1,4 @@ - - - - - - - - - - - - - diff --git a/conf/conf_tests.xml b/conf/conf_tests.xml index d3ba01cc6b..2757923619 100644 --- a/conf/conf_tests.xml +++ b/conf/conf_tests.xml @@ -1,37 +1,4 @@ - - - - - - - - - - - - - + + diff --git a/conf/flight_plans/IS.xml b/conf/flight_plans/IS.xml deleted file mode 100644 index ff9a8b8c93..0000000000 --- a/conf/flight_plans/IS.xml +++ /dev/null @@ -1,160 +0,0 @@ - - - -
-#include "subsystems/datalink/datalink.h" -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/conf/flight_plans/form_follow.xml b/conf/flight_plans/formation/form_follow.xml similarity index 97% rename from conf/flight_plans/form_follow.xml rename to conf/flight_plans/formation/form_follow.xml index a72076867c..0280b01dbd 100644 --- a/conf/flight_plans/form_follow.xml +++ b/conf/flight_plans/formation/form_follow.xml @@ -1,4 +1,4 @@ - + diff --git a/conf/flight_plans/form_leader.xml b/conf/flight_plans/formation/form_leader.xml similarity index 98% rename from conf/flight_plans/form_leader.xml rename to conf/flight_plans/formation/form_leader.xml index 06333ab7f7..2247f4b8af 100644 --- a/conf/flight_plans/form_leader.xml +++ b/conf/flight_plans/formation/form_leader.xml @@ -1,4 +1,4 @@ - + diff --git a/conf/flight_plans/generic.xml b/conf/flight_plans/generic.xml deleted file mode 100644 index 144b1b6d34..0000000000 --- a/conf/flight_plans/generic.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/conf/flight_plans/corsica.xml b/conf/flight_plans/legacy/corsica.xml similarity index 98% rename from conf/flight_plans/corsica.xml rename to conf/flight_plans/legacy/corsica.xml index 47c5debc2b..6b7e21d2fd 100644 --- a/conf/flight_plans/corsica.xml +++ b/conf/flight_plans/legacy/corsica.xml @@ -1,4 +1,4 @@ - + diff --git a/conf/flight_plans/corsica_sectors.xml b/conf/flight_plans/legacy/corsica_sectors.xml similarity index 96% rename from conf/flight_plans/corsica_sectors.xml rename to conf/flight_plans/legacy/corsica_sectors.xml index 6ee78ab4ad..09b29b53a7 100644 --- a/conf/flight_plans/corsica_sectors.xml +++ b/conf/flight_plans/legacy/corsica_sectors.xml @@ -1,4 +1,4 @@ - + diff --git a/conf/flight_plans/creidlitz.xml b/conf/flight_plans/legacy/creidlitz.xml similarity index 98% rename from conf/flight_plans/creidlitz.xml rename to conf/flight_plans/legacy/creidlitz.xml index b6e3b6fb55..06040a9eb1 100644 --- a/conf/flight_plans/creidlitz.xml +++ b/conf/flight_plans/legacy/creidlitz.xml @@ -1,4 +1,4 @@ - +
diff --git a/conf/flight_plans/fp_tp_auto.xml b/conf/flight_plans/legacy/fp_tp_auto.xml similarity index 99% rename from conf/flight_plans/fp_tp_auto.xml rename to conf/flight_plans/legacy/fp_tp_auto.xml index 92782ef0d2..4a64f0ad03 100644 --- a/conf/flight_plans/fp_tp_auto.xml +++ b/conf/flight_plans/legacy/fp_tp_auto.xml @@ -1,4 +1,4 @@ - +
diff --git a/conf/flight_plans/grosslobke_demo.xml b/conf/flight_plans/legacy/grosslobke_demo.xml similarity index 99% rename from conf/flight_plans/grosslobke_demo.xml rename to conf/flight_plans/legacy/grosslobke_demo.xml index 0e415048a7..37543fe031 100644 --- a/conf/flight_plans/grosslobke_demo.xml +++ b/conf/flight_plans/legacy/grosslobke_demo.xml @@ -1,4 +1,4 @@ - +
diff --git a/conf/flight_plans/grosslobke_kreise.xml b/conf/flight_plans/legacy/grosslobke_kreise.xml similarity index 100% rename from conf/flight_plans/grosslobke_kreise.xml rename to conf/flight_plans/legacy/grosslobke_kreise.xml diff --git a/conf/flight_plans/grosslobke_start.xml b/conf/flight_plans/legacy/grosslobke_start.xml similarity index 100% rename from conf/flight_plans/grosslobke_start.xml rename to conf/flight_plans/legacy/grosslobke_start.xml diff --git a/conf/flight_plans/ingolfsskali.xml b/conf/flight_plans/legacy/ingolfsskali.xml similarity index 98% rename from conf/flight_plans/ingolfsskali.xml rename to conf/flight_plans/legacy/ingolfsskali.xml index 431ce3ba56..03681f88a1 100644 --- a/conf/flight_plans/ingolfsskali.xml +++ b/conf/flight_plans/legacy/ingolfsskali.xml @@ -1,4 +1,4 @@ - +
diff --git a/conf/flight_plans/kalscott.xml b/conf/flight_plans/legacy/kalscott.xml similarity index 98% rename from conf/flight_plans/kalscott.xml rename to conf/flight_plans/legacy/kalscott.xml index a039c09f1c..7dd10a4345 100644 --- a/conf/flight_plans/kalscott.xml +++ b/conf/flight_plans/legacy/kalscott.xml @@ -1,4 +1,4 @@ - +
diff --git a/conf/flight_plans/muret_demo_1.xml b/conf/flight_plans/legacy/muret_demo_1.xml similarity index 100% rename from conf/flight_plans/muret_demo_1.xml rename to conf/flight_plans/legacy/muret_demo_1.xml diff --git a/conf/flight_plans/muret_for.xml b/conf/flight_plans/legacy/muret_for.xml similarity index 94% rename from conf/flight_plans/muret_for.xml rename to conf/flight_plans/legacy/muret_for.xml index 6748cf1d45..20f4b540e9 100644 --- a/conf/flight_plans/muret_for.xml +++ b/conf/flight_plans/legacy/muret_for.xml @@ -1,4 +1,4 @@ - + diff --git a/conf/flight_plans/nordlys.xml b/conf/flight_plans/legacy/nordlys.xml similarity index 98% rename from conf/flight_plans/nordlys.xml rename to conf/flight_plans/legacy/nordlys.xml index efe0fa8d12..773f84c8b4 100644 --- a/conf/flight_plans/nordlys.xml +++ b/conf/flight_plans/legacy/nordlys.xml @@ -1,4 +1,4 @@ - +
diff --git a/conf/flight_plans/quadshot_land_takeoff_again.xml b/conf/flight_plans/legacy/quadshot_land_takeoff_again.xml similarity index 98% rename from conf/flight_plans/quadshot_land_takeoff_again.xml rename to conf/flight_plans/legacy/quadshot_land_takeoff_again.xml index af34add494..96c269aa39 100644 --- a/conf/flight_plans/quadshot_land_takeoff_again.xml +++ b/conf/flight_plans/legacy/quadshot_land_takeoff_again.xml @@ -1,4 +1,4 @@ - + diff --git a/conf/flight_plans/rotorcraft_krooz.xml b/conf/flight_plans/legacy/rotorcraft_krooz.xml similarity index 98% rename from conf/flight_plans/rotorcraft_krooz.xml rename to conf/flight_plans/legacy/rotorcraft_krooz.xml index 6060def627..2581de364f 100644 --- a/conf/flight_plans/rotorcraft_krooz.xml +++ b/conf/flight_plans/legacy/rotorcraft_krooz.xml @@ -1,4 +1,4 @@ - +
diff --git a/conf/flight_plans/rotorcraft_oa_avoid.xml b/conf/flight_plans/legacy/rotorcraft_oa_avoid.xml similarity index 94% rename from conf/flight_plans/rotorcraft_oa_avoid.xml rename to conf/flight_plans/legacy/rotorcraft_oa_avoid.xml index 9a1e42ecfe..dcfd96c1c0 100644 --- a/conf/flight_plans/rotorcraft_oa_avoid.xml +++ b/conf/flight_plans/legacy/rotorcraft_oa_avoid.xml @@ -1,4 +1,4 @@ - +
diff --git a/conf/flight_plans/slayer_training.xml b/conf/flight_plans/legacy/slayer_training.xml similarity index 98% rename from conf/flight_plans/slayer_training.xml rename to conf/flight_plans/legacy/slayer_training.xml index ef2d13859d..2359370bb9 100644 --- a/conf/flight_plans/slayer_training.xml +++ b/conf/flight_plans/legacy/slayer_training.xml @@ -1,4 +1,4 @@ - +
diff --git a/conf/flight_plans/versatile_carto_fixe_muret.xml b/conf/flight_plans/legacy/versatile_carto_fixe_muret.xml similarity index 99% rename from conf/flight_plans/versatile_carto_fixe_muret.xml rename to conf/flight_plans/legacy/versatile_carto_fixe_muret.xml index 0987732e0a..7e4cce76d1 100644 --- a/conf/flight_plans/versatile_carto_fixe_muret.xml +++ b/conf/flight_plans/legacy/versatile_carto_fixe_muret.xml @@ -1,4 +1,4 @@ - + diff --git a/conf/flight_plans/xsens_cachejunction.xml b/conf/flight_plans/xsens_cachejunction.xml deleted file mode 100644 index 841d507330..0000000000 --- a/conf/flight_plans/xsens_cachejunction.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - -
-#include "datalink.h" -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/conf/modules/enose.xml b/conf/modules/enose.xml deleted file mode 100644 index 550fab9e35..0000000000 --- a/conf/modules/enose.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - Chemical Enose sensor - -
- - -
- - - - - - - - - - - - - - - - - - - - - - -
- diff --git a/conf/modules/pbn.xml b/conf/modules/pbn.xml deleted file mode 100644 index fe3d070fb9..0000000000 --- a/conf/modules/pbn.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - Pressure Board Navarro. - - by Matthieu Navarro (2010) - - combine differential and absolute pressure sensor (ETS raw sensors) - controlled by a dspic - return scaled values over I2C - - - - - - - - - - - - - - -
- -
- - - - - - - - -
- diff --git a/sw/airborne/arch/sim/modules/enose/sim_enose.c b/sw/airborne/arch/sim/modules/enose/sim_enose.c deleted file mode 100644 index 89fd32dc32..0000000000 --- a/sw/airborne/arch/sim/modules/enose/sim_enose.c +++ /dev/null @@ -1,29 +0,0 @@ -#include "enose/enose.h" - -uint8_t enose_status; -uint8_t enose_heat[ENOSE_NB_SENSOR]; -uint16_t enose_val[ENOSE_NB_SENSOR]; -uint16_t enose_PID_val; - -uint16_t nominal_val[ENOSE_NB_SENSOR] = {1500, 1500, 4000}; -uint16_t min_val[ENOSE_NB_SENSOR] = {1100, 1200, 2500}; - -void enose_init(void) -{ - int i; - for (i = 0; i < ENOSE_NB_SENSOR; i++) { - enose_val[i] = nominal_val[i]; - } -} -void enose_set_heat(uint8_t no_sensor, uint8_t value) { } -void enose_periodic(void) -{ - int i; - for (i = 0; i < ENOSE_NB_SENSOR; i++) { - if (enose_val[i] < min_val[i]) { - enose_val[i] = min_val[i]; - } - int d = nominal_val[i] - enose_val[i]; - enose_val[i] += d / 10.; - } -} diff --git a/sw/airborne/boards/pc_sim.h b/sw/airborne/boards/pc_sim.h index 11786598a5..75b5479347 100644 --- a/sw/airborne/boards/pc_sim.h +++ b/sw/airborne/boards/pc_sim.h @@ -18,6 +18,9 @@ #define USE_BARO_BOARD 0 #endif #endif + +#include "peripherals/video_device.h" + extern struct video_config_t webcam; // Simulated cameras, see modules/computer_vision/video_thread_nps.c diff --git a/sw/airborne/modules/enose/anemotaxis.c b/sw/airborne/modules/enose/anemotaxis.c deleted file mode 100644 index bbcab961ca..0000000000 --- a/sw/airborne/modules/enose/anemotaxis.c +++ /dev/null @@ -1,108 +0,0 @@ -#include "modules/enose/anemotaxis.h" -#include "generated/airframe.h" -#include "state.h" -#include "std.h" -#include "firmwares/fixedwing/nav.h" -#include "generated/flight_plan.h" -#include "subsystems/datalink/downlink.h" -#include "modules/enose/chemo_detect.h" - -enum status { UTURN, CROSSWIND }; -static enum status status; -static int8_t sign; -static struct point last_plume; - -static void last_plume_was_here(void) -{ - last_plume.x = stateGetPositionEnu_f()->x; - last_plume.y = stateGetPositionEnu_f()->y; -} - -bool nav_anemotaxis_downwind(uint8_t c, float radius) -{ - struct FloatVect2 *wind = stateGetHorizontalWindspeed_f(); - float wind_dir = atan2(wind->x, wind->y); - waypoints[c].x = waypoints[WP_HOME].x + radius * cos(wind_dir); - waypoints[c].y = waypoints[WP_HOME].y + radius * sin(wind_dir); - return false; -} - -bool nav_anemotaxis_init(uint8_t c) -{ - status = UTURN; - sign = 1; - struct FloatVect2 *wind = stateGetHorizontalWindspeed_f(); - float wind_dir = atan2(wind->x, wind->y); - waypoints[c].x = stateGetPositionEnu_f()->x + DEFAULT_CIRCLE_RADIUS * cos(wind_dir + M_PI); - waypoints[c].y = stateGetPositionEnu_f()->y + DEFAULT_CIRCLE_RADIUS * sin(wind_dir + M_PI); - last_plume_was_here(); - return false; -} - -bool nav_anemotaxis(uint8_t c, uint8_t c1, uint8_t c2, uint8_t plume) -{ - if (chemo_sensor) { - last_plume_was_here(); - waypoints[plume].x = stateGetPositionEnu_f()->x; - waypoints[plume].y = stateGetPositionEnu_f()->y; - // DownlinkSendWpNr(plume); - } - - struct FloatVect2 *wind = stateGetHorizontalWindspeed_f(); - float wind_dir = atan2(wind->x, wind->y) + M_PI; - - /** Not null even if wind_east=wind_north=0 */ - float upwind_x = cos(wind_dir); - float upwind_y = sin(wind_dir); - - switch (status) { - case UTURN: - NavCircleWaypoint(c, DEFAULT_CIRCLE_RADIUS * sign); - if (NavQdrCloseTo(DegOfRad(M_PI_2 - wind_dir))) { - float crosswind_x = - upwind_y; - float crosswind_y = upwind_x; - waypoints[c1].x = waypoints[c].x + DEFAULT_CIRCLE_RADIUS * upwind_x; - waypoints[c1].y = waypoints[c].y + DEFAULT_CIRCLE_RADIUS * upwind_y; - - float width = Max(2 * ScalarProduct(upwind_x, upwind_y, stateGetPositionEnu_f()->x - last_plume.x, - stateGetPositionEnu_f()->y - last_plume.y), DEFAULT_CIRCLE_RADIUS); - - waypoints[c2].x = waypoints[c1].x - width * crosswind_x * sign; - waypoints[c2].y = waypoints[c1].y - width * crosswind_y * sign; - - // DownlinkSendWpNr(c1); - // DownlinkSendWpNr(c2); - - status = CROSSWIND; - nav_init_stage(); - } - break; - - case CROSSWIND: - NavSegment(c1, c2); - if (NavApproaching(c2, CARROT)) { - waypoints[c].x = waypoints[c2].x + DEFAULT_CIRCLE_RADIUS * upwind_x; - waypoints[c].y = waypoints[c2].y + DEFAULT_CIRCLE_RADIUS * upwind_y; - - // DownlinkSendWpNr(c); - - sign = -sign; - status = UTURN; - nav_init_stage(); - } - - if (chemo_sensor) { - waypoints[c].x = stateGetPositionEnu_f()->x + DEFAULT_CIRCLE_RADIUS * upwind_x; - waypoints[c].y = stateGetPositionEnu_f()->y + DEFAULT_CIRCLE_RADIUS * upwind_y; - - // DownlinkSendWpNr(c); - - sign = -sign; - status = UTURN; - nav_init_stage(); - } - break; - } - chemo_sensor = 0; - return true; -} diff --git a/sw/airborne/modules/enose/anemotaxis.h b/sw/airborne/modules/enose/anemotaxis.h deleted file mode 100644 index 19b55962ad..0000000000 --- a/sw/airborne/modules/enose/anemotaxis.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef ANEMOTAXIS_H -#define ANEMOTAXIS_H - -#include "std.h" - -extern bool nav_anemotaxis_downwind(uint8_t c, float radius); -extern bool nav_anemotaxis_init(uint8_t c); -extern bool nav_anemotaxis(uint8_t c, uint8_t c1, uint8_t c2, uint8_t plume); - -#endif /** ANEMOTAXIS_H */ diff --git a/sw/airborne/modules/enose/chemo_detect.c b/sw/airborne/modules/enose/chemo_detect.c deleted file mode 100644 index 5cd83b3329..0000000000 --- a/sw/airborne/modules/enose/chemo_detect.c +++ /dev/null @@ -1,38 +0,0 @@ -#include "chemo_detect.h" -#include "enose.h" - -#define DETECT_PERIOD 8 /* *4Hz */ -#define THRESHOLD 150 - -uint16_t chemo_sensor; - -void chemo_init(void) -{ - chemo_sensor = 0; -} - -void chemo_periodic(void) -{ -#ifdef ENOSE - static uint16_t vals[ENOSE_NB_SENSOR][DETECT_PERIOD]; - static int idx; - - /* Detection on the first sensor */ - int dval = enose_val[0] - vals[0][idx]; - if (dval < -THRESHOLD) { - chemo_sensor = -dval; - } else { - chemo_sensor = 0; - } - - int i; - for (i = 0; i < ENOSE_NB_SENSOR; i++) { - vals[i][idx] = enose_val[i]; - } - - idx++; - if (idx > DETECT_PERIOD) { - idx = 0; - } -#endif /* ENOSE */ -} diff --git a/sw/airborne/modules/enose/chemo_detect.h b/sw/airborne/modules/enose/chemo_detect.h deleted file mode 100644 index 02451941c4..0000000000 --- a/sw/airborne/modules/enose/chemo_detect.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef CHEMO_DETECT_H -#define CHEMO_DETECT_H - -#include "std.h" - -extern uint16_t chemo_sensor; -#define MAX_CHEMO 400 - -void chemo_init(void); -void chemo_periodic(void); - -#endif /* CHEMO_DETECT_H */ diff --git a/sw/airborne/modules/enose/chemotaxis.c b/sw/airborne/modules/enose/chemotaxis.c deleted file mode 100644 index 4e2a0b9f85..0000000000 --- a/sw/airborne/modules/enose/chemotaxis.c +++ /dev/null @@ -1,57 +0,0 @@ -#include "modules/enose/chemotaxis.h" -#include "generated/airframe.h" -#include "state.h" -#include "std.h" -#include "firmwares/fixedwing/nav.h" -#include "generated/flight_plan.h" -#include "subsystems/datalink/downlink.h" -#include "modules/enose/chemo_detect.h" - -#define MAX_RADIUS 250 -#define ALPHA 0.5 - -static uint8_t last_plume_value; - -static float radius; -static int8_t sign; - -bool nav_chemotaxis_init(uint8_t c, uint8_t plume) -{ - radius = MAX_RADIUS; - last_plume_value = 0; - sign = 1; - waypoints[plume].x = waypoints[c].x; - waypoints[plume].y = waypoints[c].y; - return false; -} - -bool nav_chemotaxis(uint8_t c, uint8_t plume) -{ - - if (chemo_sensor > last_plume_value) { - /* Move the circle in this direction */ - float x = stateGetPositionEnu_f()->x - waypoints[plume].x; - float y = stateGetPositionEnu_f()->y - waypoints[plume].y; - waypoints[c].x = waypoints[plume].x + ALPHA * x; - waypoints[c].y = waypoints[plume].y + ALPHA * y; - // DownlinkSendWpNr(c); - /* Turn in the right direction */ - float dir_x = cos(M_PI_2 - stateGetHorizontalSpeedDir_f()); - float dir_y = sin(M_PI_2 - stateGetHorizontalSpeedDir_f()); - float pvect = dir_x * y - dir_y * x; - sign = (pvect > 0 ? -1 : 1); - /* Reduce the radius */ - radius = sign * (DEFAULT_CIRCLE_RADIUS + (MAX_CHEMO - chemo_sensor) / (float)MAX_CHEMO * - (MAX_RADIUS - DEFAULT_CIRCLE_RADIUS)); - - - /* Store this plume */ - waypoints[plume].x = stateGetPositionEnu_f()->x; - waypoints[plume].y = stateGetPositionEnu_f()->y; - // DownlinkSendWpNr(plume); - last_plume_value = chemo_sensor; - } - - NavCircleWaypoint(c, radius); - return true; -} diff --git a/sw/airborne/modules/enose/chemotaxis.h b/sw/airborne/modules/enose/chemotaxis.h deleted file mode 100644 index 629017098f..0000000000 --- a/sw/airborne/modules/enose/chemotaxis.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef CHEMOTAXIS_H -#define CHEMOTAXIS_H - -#include "std.h" - -extern bool nav_chemotaxis_init(uint8_t c, uint8_t plume); -extern bool nav_chemotaxis(uint8_t c, uint8_t plume); - -#endif /** CHEMOTAXIS_H */ diff --git a/sw/airborne/modules/enose/enose.c b/sw/airborne/modules/enose/enose.c deleted file mode 100644 index bb7fa9d614..0000000000 --- a/sw/airborne/modules/enose/enose.c +++ /dev/null @@ -1,92 +0,0 @@ -#include - -#include "modules/enose/enose.h" - -#include "mcu_periph/i2c.h" -#include "mcu_periph/adc.h" -#include BOARD_CONFIG - - -uint8_t enose_status; -uint8_t enose_heat[ENOSE_NB_SENSOR]; -uint16_t enose_val[ENOSE_NB_SENSOR]; -uint16_t enose_PID_val; - -#define ENOSE_SLAVE_ADDR 0xAE -#define ENOSE_PWM_ADDR 0x06 -#define ENOSE_DATA_ADDR 0x00 -#define ENOSE_HEAT_INIT 237 - -static uint8_t enose_conf_requested; -static volatile bool enose_i2c_done; -static struct adc_buf buf_PID; - - -void enose_init(void) -{ - uint8_t i; - for (i = 0; i < ENOSE_NB_SENSOR; i++) { - enose_heat[i] = ENOSE_HEAT_INIT; - enose_val[i] = 0; - } - enose_status = ENOSE_IDLE; - enose_conf_requested = true; - enose_i2c_done = true; - -#ifdef ADC_CHANNEL_PID - adc_buf_channel(ADC_CHANNEL_PID, &buf_PID, ADC_CHANNEL_PID_NB_SAMPLES); -#endif -} - - -void enose_set_heat(uint8_t no_sensor, uint8_t value) -{ - enose_heat[no_sensor] = value; - enose_conf_requested = true; -} - - -#include "mcu_periph/uart.h" -#include "pprzlink/messages.h" -#include "subsystems/datalink/downlink.h" - -void enose_periodic(void) -{ - enose_PID_val = buf_PID.sum / buf_PID.av_nb_sample; - - if (enose_i2c_done) { - if (enose_conf_requested) { - const uint8_t msg[] = { ENOSE_PWM_ADDR, enose_heat[0], enose_heat[1], enose_heat[2] }; - memcpy((void *)i2c0_buf, msg, sizeof(msg)); - i2c0_transmit(ENOSE_SLAVE_ADDR, sizeof(msg), &enose_i2c_done); - enose_i2c_done = false; - enose_conf_requested = false; - } else if (enose_status == ENOSE_IDLE) { - enose_status = ENOSE_MEASURING_WR; - const uint8_t msg[] = { ENOSE_DATA_ADDR }; - memcpy((void *)i2c0_buf, msg, sizeof(msg)); - i2c0_transmit(ENOSE_SLAVE_ADDR, sizeof(msg), &enose_i2c_done); - enose_i2c_done = false; - } else if (enose_status == ENOSE_MEASURING_WR) { - enose_status = ENOSE_MEASURING_RD; - i2c0_receive(ENOSE_SLAVE_ADDR, 6, &enose_i2c_done); - enose_i2c_done = false; - } else if (enose_status == ENOSE_MEASURING_RD) { - uint16_t val = (i2c0_buf[0] << 8) | i2c0_buf[1]; - if (val < 5000) { - enose_val[0] = val; - } - val = (i2c0_buf[2] << 8) | i2c0_buf[3]; - if (val < 5000) { - enose_val[1] = val; - } - val = (i2c0_buf[4] << 8) | i2c0_buf[5]; - if (val < 5000) { - enose_val[2] = val; - } - enose_status = ENOSE_IDLE; - } - } - DOWNLINK_SEND_ENOSE_STATUS(DefaultChannel, DefaultDevice, &enose_val[0], &enose_val[1], &enose_val[2], &enose_PID_val, - 3, enose_heat); -} diff --git a/sw/airborne/modules/enose/enose.h b/sw/airborne/modules/enose/enose.h deleted file mode 100644 index fa5b16cba3..0000000000 --- a/sw/airborne/modules/enose/enose.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef ENOSE_H -#define ENOSE_H - -#include "std.h" - -#define ENOSE_NB_SENSOR 3 - -extern uint8_t enose_heat[ENOSE_NB_SENSOR]; -extern uint16_t enose_val[ENOSE_NB_SENSOR]; -extern uint16_t enose_PID_val; - -#define ENOSE_IDLE 0 -#define ENOSE_SETTINGS 1 -#define ENOSE_MEASURING_WR 2 -#define ENOSE_MEASURING_RD 3 - - -extern uint8_t enose_status; - -extern void enose_init(void); - -extern void enose_set_heat(uint8_t no_sensor, uint8_t value); -extern void enose_periodic(void); - -#define enose_SetHeat0(val) {enose_set_heat(0, val);} -#define enose_SetHeat1(val) {enose_set_heat(1, val);} -#define enose_SetHeat2(val) {enose_set_heat(2, val);} - -#define enose_DecreaseVal0(_x) { enose_val[0] -= _x; } -#define enose_DecreaseVal1(_x) { enose_val[1] -= _x; } -#define enose_DecreaseVal2(_x) { enose_val[2] -= _x; } - - -#endif /* ENOSE_H */ diff --git a/sw/airborne/modules/sensors/pressure_board_navarro.c b/sw/airborne/modules/sensors/pressure_board_navarro.c deleted file mode 100644 index 26e8a8eaa9..0000000000 --- a/sw/airborne/modules/sensors/pressure_board_navarro.c +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright (C) 2010 ENAC - * - * This file is part of paparazzi. - * - * paparazzi is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * paparazzi is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with paparazzi; see the file COPYING. If not, write to - * the Free Software Foundation, 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - */ - -/** @file modules/sensors/pressure_board_navarro.c - * Pressure Board Navarro - */ - - -#include "pressure_board_navarro.h" -#include "subsystems/abi.h" - -#ifndef USE_AIRSPEED_PBN -#if USE_AIRSPEED -#define USE_AIRSPEED_PBN TRUE -PRINT_CONFIG_MSG("USE_AIRSPEED_PBN automatically set to TRUE") -#endif -#endif - -#if USE_AIRSPEED_PBN -#include "state.h" -#endif - -/** Default I2C device on tiny is i2c0 - */ -#ifndef PBN_I2C_DEV -#define PBN_I2C_DEV i2c0 -#endif - -/** Sensor I2C slave address */ -#define PBN_I2C_ADDR 0x28 - -/** Number of values to compute an offset at startup */ -#define OFFSET_NBSAMPLES_AVRG 100 - -/** Number of loops before starting to store data */ -#define PBN_START_DELAY 30 - -/** Weight for offset IIR filter */ -#define PBN_OFFSET_FILTER 7 - -/** Quadratic scale factor for airspeed */ -#ifndef PBN_AIRSPEED_SCALE -#define PBN_AIRSPEED_SCALE (1./0.54) -#endif - -/** Linear scale factor for altitude */ -#ifndef PBN_ALTITUDE_SCALE -#define PBN_ALTITUDE_SCALE 0.32 -#endif - -#ifndef PBN_PRESSURE_OFFSET -#define PBN_PRESSURE_OFFSET 101325.0 -#endif - - -// Global variables -struct PBNState pbn; -struct i2c_transaction pbn_trans; - -static uint16_t offset_cnt; -static uint16_t startup_delay; - -void pbn_init(void) -{ - startup_delay = PBN_START_DELAY; - pbn.altitude_offset = 0; - pbn.airspeed_offset = 0; - pbn.airspeed_adc = 0; - pbn.altitude_adc = 0; - pbn.data_valid = true; - offset_cnt = OFFSET_NBSAMPLES_AVRG; - pbn.airspeed = 0.; - pbn.altitude = 0.; - pbn.airspeed_filter = PBN_OFFSET_FILTER; -} - - -void pbn_periodic(void) -{ - - if (startup_delay > 0) { - --startup_delay; - return; - } - - // Initiate next read - pbn_trans.buf[0] = 0; - i2c_transceive(&PBN_I2C_DEV, &pbn_trans, PBN_I2C_ADDR, 1, 4); - -} - -void pbn_read_event(void) -{ - - pbn_trans.status = I2CTransDone; - - // Get raw values from buffer - pbn.airspeed_adc = ((uint16_t)(pbn_trans.buf[0]) << 8) | (uint16_t)(pbn_trans.buf[1]); - pbn.altitude_adc = ((uint16_t)(pbn_trans.buf[2]) << 8) | (uint16_t)(pbn_trans.buf[3]); - - // Consider 0 as a wrong value - if (pbn.airspeed_adc == 0 || pbn.altitude_adc == 0) { - pbn.data_valid = false; - } else { - pbn.data_valid = true; - - if (offset_cnt > 0) { - // IIR filter to compute an initial offset -#ifndef PBN_AIRSPEED_OFFSET - pbn.airspeed_offset = (PBN_OFFSET_FILTER * pbn.airspeed_offset + pbn.airspeed_adc) / - (PBN_OFFSET_FILTER + 1); -#else - pbn.airspeed_offset = PBN_AIRSPEED_OFFSET; -#endif -#ifndef PBN_ALTITUDE_OFFSET - pbn.altitude_offset = (PBN_OFFSET_FILTER * pbn.altitude_offset + pbn.altitude_adc) / - (PBN_OFFSET_FILTER + 1); -#else - pbn.altitude_offset = PBN_ALTITUDE_OFFSET; -#endif - - // decrease init counter - --offset_cnt; - } else { - // Compute pressure - float pressure = PBN_ALTITUDE_SCALE * (float) pbn.altitude_adc + PBN_PRESSURE_OFFSET; - AbiSendMsgBARO_ABS(BARO_PBN_SENDER_ID, pressure); - // Compute airspeed and altitude - //pbn_airspeed = (-4.45 + sqrtf(19.84-0.57*(float)(airspeed_offset-airspeed_adc)))/0.28; - uint16_t diff = Max(pbn.airspeed_adc - pbn.airspeed_offset, 0); - float tmp_airspeed = sqrtf((float)diff * PBN_AIRSPEED_SCALE); - pbn.airspeed = (pbn.airspeed_filter * pbn.airspeed + tmp_airspeed) / - (pbn.airspeed_filter + 1.); -#if USE_AIRSPEED_PBN - stateSetAirspeed_f(pbn.airspeed); -#endif - - pbn.altitude = PBN_ALTITUDE_SCALE * (float)(pbn.altitude_adc - pbn.altitude_offset); - } - - } -} diff --git a/sw/airborne/modules/sensors/pressure_board_navarro.h b/sw/airborne/modules/sensors/pressure_board_navarro.h deleted file mode 100644 index efa352dbfd..0000000000 --- a/sw/airborne/modules/sensors/pressure_board_navarro.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2010 ENAC - * - * This file is part of paparazzi. - * - * paparazzi is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * paparazzi is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with paparazzi; see the file COPYING. If not, write to - * the Free Software Foundation, 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - */ - -/** @file modules/sensors/pressure_board_navarro.h - * - * Pressure Board Navarro (2010) - * - * by Matthieu Navarro - * - * combine differential and absolute pressure sensor (ETS raw sensors) - * controlled by a dspic - * return scaled values over I2C - * - */ - -#ifndef PRESSURE_BOARD_NAVARRO_H -#define PRESSURE_BOARD_NAVARRO_H - -#include "std.h" -#include "mcu_periph/i2c.h" - -struct PBNState { - uint16_t altitude_adc; - uint16_t airspeed_adc; - uint16_t altitude_offset; - uint16_t airspeed_offset; - float altitude; - float airspeed; - float airspeed_filter; - bool data_valid; -}; - -extern struct PBNState pbn; - -extern struct i2c_transaction pbn_trans; - -extern void pbn_init(void); -extern void pbn_periodic(void); -extern void pbn_read_event(void); - -#define PbnEvent() { if (pbn_trans.status == I2CTransSuccess) pbn_read_event(); } - -#endif // PRESSURE_BOARD_NAVARRO_H diff --git a/sw/airborne/subsystems/abi_sender_ids.h b/sw/airborne/subsystems/abi_sender_ids.h index 64cbbb070f..b677490d4b 100644 --- a/sw/airborne/subsystems/abi_sender_ids.h +++ b/sw/airborne/subsystems/abi_sender_ids.h @@ -68,10 +68,6 @@ #define BARO_SCP_SENDER_ID 17 #endif -#ifndef BARO_PBN_SENDER_ID -#define BARO_PBN_SENDER_ID 18 -#endif - #ifndef BARO_SIM_SENDER_ID #define BARO_SIM_SENDER_ID 19 #endif