diff --git a/conf/flight_plans/competitions/IMAV2023_carto.xml b/conf/flight_plans/competitions/IMAV2023_carto.xml new file mode 100644 index 0000000000..020305fff1 --- /dev/null +++ b/conf/flight_plans/competitions/IMAV2023_carto.xml @@ -0,0 +1,201 @@ + + + + +
+ #define FP_NONE 0 + #define FP_MAPPING 2 + + #if DIGITAL_CAM + #define LINE_START_FUNCTION dc_Survey(mapping_shot_distance); + #define LINE_STOP_FUNCTION dc_autoshoot = DC_AUTOSHOOT_STOP; + #endif + + #ifdef NAV_C + #ifndef TAG_TRACKING_COORD_TO_M + #define TAG_TRACKING_COORD_TO_M (1.f / 1000.f) + #ifdef SITL + #define jevois_stream(_x) {} + #endif + #endif + + static void fp_tag_cb(uint8_t sender_id UNUSED, + uint8_t type, char * id UNUSED, + uint8_t nb UNUSED, int16_t * coord, uint16_t * dim UNUSED, + struct FloatQuat quat UNUSED, char * extra UNUSED) + { + if (type == JEVOIS_MSG_D3) { + tag_distance = coord[2] * TAG_TRACKING_COORD_TO_M; + tag_valid = true; + } + } + + static inline bool delay_test_rc(bool test, int delay) { + static int nb = 0; + if (test) { + nb++; + if (nb == delay) { + nb = 0; + return true; + } + return false; + } else { + nb = 0; + return false; + } + } + + static inline float avoid_height(float normal_height, float avoid_height, float avoid_dist, uint8_t wp_id) { + if (LessThan(get_dist2_to_waypoint(wp_id), avoid_dist*avoid_dist)) { + return avoid_height; + } else { + return normal_height; + } + } + + #endif +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/conf/flight_plans/competitions/IMAV2023_data.xml b/conf/flight_plans/competitions/IMAV2023_data.xml new file mode 100644 index 0000000000..bcaabb3441 --- /dev/null +++ b/conf/flight_plans/competitions/IMAV2023_data.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/conf/flight_plans/competitions/IMAV2023_dynamic.xml b/conf/flight_plans/competitions/IMAV2023_dynamic.xml new file mode 100644 index 0000000000..8378d4cd66 --- /dev/null +++ b/conf/flight_plans/competitions/IMAV2023_dynamic.xml @@ -0,0 +1,184 @@ + + + + +
+ #define FP_NONE 0 + #define FP_DYNAMIC 3 + + #ifdef NAV_C + #ifndef TAG_TRACKING_COORD_TO_M + #define TAG_TRACKING_COORD_TO_M (1.f / 1000.f) + #ifdef SITL + #define jevois_stream(_x) {} + #endif + #endif + + static void fp_tag_cb(uint8_t sender_id UNUSED, + uint8_t type, char * id UNUSED, + uint8_t nb UNUSED, int16_t * coord, uint16_t * dim UNUSED, + struct FloatQuat quat UNUSED, char * extra UNUSED) + { + if (type == JEVOIS_MSG_D3) { + tag_distance = coord[2] * TAG_TRACKING_COORD_TO_M; + tag_valid = true; + } + } + + static inline bool delay_test_rc(bool test, int delay) { + static int nb = 0; + if (test) { + nb++; + if (nb == delay) { + nb = 0; + return true; + } + return false; + } else { + nb = 0; + return false; + } + } + + static inline float avoid_height(float normal_height, float avoid_height, float avoid_dist, uint8_t wp_id) { + if (LessThan(get_dist2_to_waypoint(wp_id), avoid_dist*avoid_dist)) { + return avoid_height; + } else { + return normal_height; + } + } + + #endif +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/conf/flight_plans/competitions/IMAV2023_endurance.xml b/conf/flight_plans/competitions/IMAV2023_endurance.xml new file mode 100644 index 0000000000..56ade72cad --- /dev/null +++ b/conf/flight_plans/competitions/IMAV2023_endurance.xml @@ -0,0 +1,178 @@ + + + + +
+ #define FP_NONE 0 + #define FP_ENDURANCE_CIRCLE 1 + #define FP_ENDURANCE_SQUARE 2 + + #ifdef NAV_C + #ifndef TAG_TRACKING_COORD_TO_M + #define TAG_TRACKING_COORD_TO_M (1.f / 1000.f) + #ifdef SITL + #define jevois_stream(_x) {} + #endif + #endif + + static void fp_tag_cb(uint8_t sender_id UNUSED, + uint8_t type, char * id UNUSED, + uint8_t nb UNUSED, int16_t * coord, uint16_t * dim UNUSED, + struct FloatQuat quat UNUSED, char * extra UNUSED) + { + if (type == JEVOIS_MSG_D3) { + tag_distance = coord[2] * TAG_TRACKING_COORD_TO_M; + tag_valid = true; + } + } + + static inline bool delay_test_rc(bool test, int delay) { + static int nb = 0; + if (test) { + nb++; + if (nb == delay) { + nb = 0; + return true; + } + return false; + } else { + nb = 0; + return false; + } + } + + static inline float avoid_height(float normal_height, float avoid_height, float avoid_dist, uint8_t wp_id) { + if (LessThan(get_dist2_to_waypoint(wp_id), avoid_dist*avoid_dist)) { + return avoid_height; + } else { + return normal_height; + } + } + + #endif +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/conf/flight_plans/competitions/IMAV2023_hickers.xml b/conf/flight_plans/competitions/IMAV2023_hickers.xml new file mode 100644 index 0000000000..6e71a25ab9 --- /dev/null +++ b/conf/flight_plans/competitions/IMAV2023_hickers.xml @@ -0,0 +1,179 @@ + + + + +
+ #define FP_NONE 0 + #define FP_HICKERS 4 + + #ifdef NAV_C + #ifndef TAG_TRACKING_COORD_TO_M + #define TAG_TRACKING_COORD_TO_M (1.f / 1000.f) + #ifdef SITL + #define jevois_stream(_x) {} + #endif + #endif + + static void fp_tag_cb(uint8_t sender_id UNUSED, + uint8_t type, char * id UNUSED, + uint8_t nb UNUSED, int16_t * coord, uint16_t * dim UNUSED, + struct FloatQuat quat UNUSED, char * extra UNUSED) + { + if (type == JEVOIS_MSG_D3) { + tag_distance = coord[2] * TAG_TRACKING_COORD_TO_M; + tag_valid = true; + } + } + + static inline bool delay_test_rc(bool test, int delay) { + static int nb = 0; + if (test) { + nb++; + if (nb == delay) { + nb = 0; + return true; + } + return false; + } else { + nb = 0; + return false; + } + } + + static inline float avoid_height(float normal_height, float avoid_height, float avoid_dist, uint8_t wp_id) { + if (LessThan(get_dist2_to_waypoint(wp_id), avoid_dist*avoid_dist)) { + return avoid_height; + } else { + return normal_height; + } + } + + #endif +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +