diff --git a/conf/firmwares/subsystems/fixedwing/navigation_bomb.makefile b/conf/firmwares/subsystems/fixedwing/navigation_bomb.makefile deleted file mode 100644 index 257e563c04..0000000000 --- a/conf/firmwares/subsystems/fixedwing/navigation_bomb.makefile +++ /dev/null @@ -1,9 +0,0 @@ -# Hey Emacs, this is a -*- makefile -*- - -# standard and extra fixed wing navigation - - -#add these to all targets - -$(TARGET).srcs += $(SRC_SUBSYSTEMS)/navigation/bomb.c - diff --git a/conf/modules/nav_bomb.xml b/conf/modules/nav_bomb.xml new file mode 100644 index 0000000000..c180ad9da8 --- /dev/null +++ b/conf/modules/nav_bomb.xml @@ -0,0 +1,17 @@ + + + + + + Compute the dropping point for a fixedwing aircraft. + Takes into account the flight speed vector and the wind to estimate the best dropping point. + Needs some waypoints to be defined in the flight plan: REALEASE, CLIMB, BASELEG + + +
+ +
+ + + +
diff --git a/sw/airborne/subsystems/navigation/bomb.c b/sw/airborne/modules/nav/bomb.c similarity index 97% rename from sw/airborne/subsystems/navigation/bomb.c rename to sw/airborne/modules/nav/bomb.c index c8cd2b31ab..46f9664e2c 100644 --- a/sw/airborne/subsystems/navigation/bomb.c +++ b/sw/airborne/modules/nav/bomb.c @@ -20,13 +20,12 @@ */ /** - * @file subsystems/navigation/bomb.c + * @file modules/nav/bomb.c * */ #include "state.h" -#include "subsystems/nav.h" -#include "subsystems/navigation/bomb.h" +#include "modules/nav/bomb.h" #include "generated/flight_plan.h" #include "generated/airframe.h" #include "inter_mcu.h" diff --git a/sw/airborne/subsystems/navigation/bomb.h b/sw/airborne/modules/nav/bomb.h similarity index 89% rename from sw/airborne/subsystems/navigation/bomb.h rename to sw/airborne/modules/nav/bomb.h index 91d22f8283..58ebe22f9a 100644 --- a/sw/airborne/subsystems/navigation/bomb.h +++ b/sw/airborne/modules/nav/bomb.h @@ -20,13 +20,16 @@ */ /** - * @file subsystems/navigation/bomb.h + * @file modules/nav/bomb.h * */ #ifndef BOMB_H #define BOMB_H +#include "std.h" +#include "subsystems/nav.h" + #define MY_BOMB_RADIUS DEFAULT_CIRCLE_RADIUS extern unit_t bomb_compute_approach( uint8_t wp_target, uint8_t wp_start, float radius ); @@ -43,10 +46,4 @@ extern bool_t compute_alignment(uint8_t w1, uint8_t w2, uint8_t start, uint8_t e #define BombCloseHatch() ({ ap_state->commands[COMMAND_HATCH] = MIN_PPRZ; }) #define BombAligned() Qdr(DegOfRad(bomb_qdr_aligned)) - -extern bool_t compute_tod( void ); -extern unit_t compute_baseleg( void ); -extern float baseleg_alt, downwind_altitude; -extern const float baseleg_alt_tolerance; - #endif // BOMB_H