diff --git a/conf/flight_plans/EMAV2009.xml b/conf/flight_plans/EMAV2009.xml
index 00960a73aae..5cbeaab4c36 100644
--- a/conf/flight_plans/EMAV2009.xml
+++ b/conf/flight_plans/EMAV2009.xml
@@ -28,7 +28,7 @@
-
+
diff --git a/conf/flight_plans/basic.xml b/conf/flight_plans/basic.xml
index 43850512472..382e64ab26a 100644
--- a/conf/flight_plans/basic.xml
+++ b/conf/flight_plans/basic.xml
@@ -38,7 +38,7 @@
-
+
diff --git a/conf/flight_plans/corsica.xml b/conf/flight_plans/corsica.xml
index 36064950a26..02db9b1e709 100644
--- a/conf/flight_plans/corsica.xml
+++ b/conf/flight_plans/corsica.xml
@@ -35,7 +35,7 @@
-
+
diff --git a/conf/flight_plans/creidlitz.xml b/conf/flight_plans/creidlitz.xml
index 67f4f2487df..8b79b6ca848 100644
--- a/conf/flight_plans/creidlitz.xml
+++ b/conf/flight_plans/creidlitz.xml
@@ -36,7 +36,7 @@
-
+
diff --git a/conf/flight_plans/grosslobke_demo.xml b/conf/flight_plans/grosslobke_demo.xml
index 6961d146faa..7741ca2013c 100644
--- a/conf/flight_plans/grosslobke_demo.xml
+++ b/conf/flight_plans/grosslobke_demo.xml
@@ -24,7 +24,7 @@
-
+
diff --git a/conf/flight_plans/grosslobke_kreise.xml b/conf/flight_plans/grosslobke_kreise.xml
index 170f85b5240..a6732defbf5 100644
--- a/conf/flight_plans/grosslobke_kreise.xml
+++ b/conf/flight_plans/grosslobke_kreise.xml
@@ -12,7 +12,7 @@
-
+
diff --git a/conf/flight_plans/hsif.xml b/conf/flight_plans/hsif.xml
index 71ba46343a5..8cff5975095 100644
--- a/conf/flight_plans/hsif.xml
+++ b/conf/flight_plans/hsif.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/conf/flight_plans/huit.xml b/conf/flight_plans/huit.xml
index 623c0b0af99..0819bb0fe8d 100644
--- a/conf/flight_plans/huit.xml
+++ b/conf/flight_plans/huit.xml
@@ -13,7 +13,7 @@
-
+
diff --git a/conf/flight_plans/ingolfsskali.xml b/conf/flight_plans/ingolfsskali.xml
index bbc10eb850f..5b811161c16 100644
--- a/conf/flight_plans/ingolfsskali.xml
+++ b/conf/flight_plans/ingolfsskali.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/conf/flight_plans/joystick.xml b/conf/flight_plans/joystick.xml
index 971f2dd5442..b39d6694d51 100644
--- a/conf/flight_plans/joystick.xml
+++ b/conf/flight_plans/joystick.xml
@@ -36,7 +36,7 @@
-
+
diff --git a/conf/flight_plans/kalscott.xml b/conf/flight_plans/kalscott.xml
index 4fce807cded..49d59220b26 100644
--- a/conf/flight_plans/kalscott.xml
+++ b/conf/flight_plans/kalscott.xml
@@ -28,7 +28,7 @@
-
+
diff --git a/conf/flight_plans/kv_svalbard.xml b/conf/flight_plans/kv_svalbard.xml
index e8b7ca83252..499614ccdfb 100644
--- a/conf/flight_plans/kv_svalbard.xml
+++ b/conf/flight_plans/kv_svalbard.xml
@@ -38,7 +38,7 @@
-
+
diff --git a/conf/flight_plans/mav08.xml b/conf/flight_plans/mav08.xml
index 35b5c415e14..3424afc1a92 100644
--- a/conf/flight_plans/mav08.xml
+++ b/conf/flight_plans/mav08.xml
@@ -44,7 +44,7 @@
-
+
diff --git a/conf/flight_plans/muret_for.xml b/conf/flight_plans/muret_for.xml
index af469421792..961a2816c48 100644
--- a/conf/flight_plans/muret_for.xml
+++ b/conf/flight_plans/muret_for.xml
@@ -9,7 +9,7 @@
-
+
diff --git a/conf/flight_plans/nordlys.xml b/conf/flight_plans/nordlys.xml
index d82892b5f7d..7d06ace28bf 100644
--- a/conf/flight_plans/nordlys.xml
+++ b/conf/flight_plans/nordlys.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/conf/flight_plans/poles.xml b/conf/flight_plans/poles.xml
index 480a51b46eb..0d0e5393407 100644
--- a/conf/flight_plans/poles.xml
+++ b/conf/flight_plans/poles.xml
@@ -34,7 +34,7 @@
-
+
diff --git a/conf/flight_plans/sinsat.xml b/conf/flight_plans/sinsat.xml
index 8186ca27e64..306e5d616a5 100644
--- a/conf/flight_plans/sinsat.xml
+++ b/conf/flight_plans/sinsat.xml
@@ -6,7 +6,7 @@
-
+
diff --git a/conf/flight_plans/snav.xml b/conf/flight_plans/snav.xml
index 71c3faa9478..7dc6d806a07 100644
--- a/conf/flight_plans/snav.xml
+++ b/conf/flight_plans/snav.xml
@@ -36,7 +36,7 @@
-
+
diff --git a/conf/flight_plans/tcas.xml b/conf/flight_plans/tcas.xml
index c30f6295f78..ab79ecda5d6 100644
--- a/conf/flight_plans/tcas.xml
+++ b/conf/flight_plans/tcas.xml
@@ -36,7 +36,7 @@
-
+
diff --git a/conf/flight_plans/xsens_cachejunction.xml b/conf/flight_plans/xsens_cachejunction.xml
index 4a1859f9d19..0214c4f4678 100644
--- a/conf/flight_plans/xsens_cachejunction.xml
+++ b/conf/flight_plans/xsens_cachejunction.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/conf/settings/fixedwing_basic.xml b/conf/settings/fixedwing_basic.xml
index abdfe89a29d..84eb2165f55 100644
--- a/conf/settings/fixedwing_basic.xml
+++ b/conf/settings/fixedwing_basic.xml
@@ -8,7 +8,7 @@
-
+
diff --git a/sw/airborne/estimator.c b/sw/airborne/estimator.c
index 3e72d7fbb46..d0d96df8071 100644
--- a/sw/airborne/estimator.c
+++ b/sw/airborne/estimator.c
@@ -30,20 +30,10 @@
#include
#include "estimator.h"
-#include "state.h"
-#include "mcu_periph/uart.h"
-#include "ap_downlink.h"
-#include "subsystems/gps.h"
-#include "subsystems/nav.h"
-
-/* flight time in seconds */
-uint16_t estimator_flight_time;
float estimator_AOA;
void estimator_init( void ) {
- estimator_flight_time = 0;
-
}
diff --git a/sw/airborne/estimator.h b/sw/airborne/estimator.h
index 7a0a2be2c3c..486e90f5995 100644
--- a/sw/airborne/estimator.h
+++ b/sw/airborne/estimator.h
@@ -36,9 +36,6 @@
#include "state.h"
-/** flight time in seconds. */
-extern uint16_t estimator_flight_time;
-
extern float estimator_AOA; ///< angle of attack in rad
void estimator_init( void );
diff --git a/sw/airborne/firmwares/fixedwing/ap_downlink.h b/sw/airborne/firmwares/fixedwing/ap_downlink.h
index c4a6520e611..a8cdeb4cd38 100644
--- a/sw/airborne/firmwares/fixedwing/ap_downlink.h
+++ b/sw/airborne/firmwares/fixedwing/ap_downlink.h
@@ -63,7 +63,7 @@
&v_ctl_throttle_slewed, \
&vsupply, \
&s, \
- &estimator_flight_time, \
+ &autopilot_flight_time, \
&kill_throttle, \
&block_time, \
&stage_time, \
diff --git a/sw/airborne/firmwares/fixedwing/autopilot.h b/sw/airborne/firmwares/fixedwing/autopilot.h
index a7d7e16a1e2..9df70ea617c 100644
--- a/sw/airborne/firmwares/fixedwing/autopilot.h
+++ b/sw/airborne/firmwares/fixedwing/autopilot.h
@@ -55,6 +55,9 @@
extern uint8_t pprz_mode;
extern bool_t kill_throttle;
+/** flight time in seconds. */
+extern uint16_t autopilot_flight_time;
+
// FIXME, move to control
#define LATERAL_MODE_MANUAL 0
@@ -95,7 +98,7 @@ extern bool_t power_switch;
#endif // POWER_SWITCH_LED
#define autopilot_ResetFlightTimeAndLaunch(_) { \
- estimator_flight_time = 0; launch = FALSE; \
+ autopilot_flight_time = 0; launch = FALSE; \
}
/* CONTROL_RATE will be removed in the next release
diff --git a/sw/airborne/firmwares/fixedwing/main_ap.c b/sw/airborne/firmwares/fixedwing/main_ap.c
index d9c3f752249..3de67679c28 100644
--- a/sw/airborne/firmwares/fixedwing/main_ap.c
+++ b/sw/airborne/firmwares/fixedwing/main_ap.c
@@ -122,6 +122,9 @@ bool_t kill_throttle = FALSE;
bool_t launch = FALSE;
+/* flight time in seconds */
+uint16_t autopilot_flight_time = 0;
+
/** Supply voltage in deciVolt.
* This the ap copy of the measurement from fbw
@@ -382,7 +385,7 @@ static inline void telecommand_task( void ) {
current = fbw_state->current;
#ifdef RADIO_CONTROL
- if (!estimator_flight_time) {
+ if (!autopilot_flight_time) {
if (pprz_mode == PPRZ_MODE_AUTO2 && fbw_state->channels[RADIO_THROTTLE] > THROTTLE_THRESHOLD_TAKEOFF) {
launch = TRUE;
}
@@ -517,7 +520,7 @@ void attitude_loop( void ) {
h_ctl_pitch_setpoint = nav_pitch;
Bound(h_ctl_pitch_setpoint, H_CTL_PITCH_MIN_SETPOINT, H_CTL_PITCH_MAX_SETPOINT);
- if (kill_throttle || (!estimator_flight_time && !launch))
+ if (kill_throttle || (!autopilot_flight_time && !launch))
v_ctl_throttle_setpoint = 0;
}
@@ -577,8 +580,8 @@ void sensors_task( void ) {
/** monitor stuff run at 1Hz */
void monitor_task( void ) {
- if (estimator_flight_time)
- estimator_flight_time++;
+ if (autopilot_flight_time)
+ autopilot_flight_time++;
#if defined DATALINK || defined SITL
datalink_time++;
#endif
@@ -591,9 +594,9 @@ void monitor_task( void ) {
kill_throttle |= (t >= LOW_BATTERY_DELAY);
kill_throttle |= launch && (dist2_to_home > Square(KILL_MODE_DISTANCE));
- if (!estimator_flight_time &&
+ if (!autopilot_flight_time &&
*stateGetHorizontalSpeedNorm_f() > MIN_SPEED_FOR_TAKEOFF) {
- estimator_flight_time = 1;
+ autopilot_flight_time = 1;
launch = TRUE; /* Not set in non auto launch */
uint16_t time_sec = sys_time.nb_sec;
DOWNLINK_SEND_TAKEOFF(DefaultChannel, DefaultDevice, &time_sec);
diff --git a/sw/airborne/modules/com/generic_com.c b/sw/airborne/modules/com/generic_com.c
index 9f9dcc33f9e..8d31627e322 100644
--- a/sw/airborne/modules/com/generic_com.c
+++ b/sw/airborne/modules/com/generic_com.c
@@ -83,7 +83,7 @@ void generic_com_periodic( void ) {
com_trans.buf[19] = (uint8_t)(ap_state->commands[COMMAND_THROTTLE]*100/MAX_PPRZ);
com_trans.buf[20] = pprz_mode;
com_trans.buf[21] = nav_block;
- FillBufWith16bit(com_trans.buf, 22, estimator_flight_time);
+ FillBufWith16bit(com_trans.buf, 22, autopilot_flight_time);
I2CTransmit(GENERIC_COM_I2C_DEV, com_trans, GENERIC_COM_SLAVE_ADDR, NB_DATA);
}
diff --git a/sw/airborne/modules/gsm/gsm.c b/sw/airborne/modules/gsm/gsm.c
index 5f2c10212f9..c011c16d239 100644
--- a/sw/airborne/modules/gsm/gsm.c
+++ b/sw/airborne/modules/gsm/gsm.c
@@ -41,7 +41,7 @@
In: OK
Out: AT+CMGS=\"GCS_NUMBER\"
In: >
- Out: gps.utm_pos.east, gps.utm_pos.north, gps.course, gps.hmsl, gps.gspeed, -gps.ned_vel.z, vsupply, estimator_flight_time, rssi CTRLZ
+ Out: gps.utm_pos.east, gps.utm_pos.north, gps.course, gps.hmsl, gps.gspeed, -gps.ned_vel.z, vsupply, autopilot_flight_time, rssi CTRLZ
Receiving:
In: +CMTI: ...,
@@ -409,9 +409,9 @@ void gsm_send_report_continue(void)
uint8_t rssi = atoi(gsm_buf + strlen("+CSQ: "));
// Donnee GPS :ne sont pas envoyes gps_mode, gps.tow, gps.utm_pos.zone, gps_nb_ovrn
- // Donnees batterie (seuls vsupply et estimator_flight_time sont envoyes)
+ // Donnees batterie (seuls vsupply et autopilot_flight_time sont envoyes)
// concatenation de toutes les infos en un seul message à transmettre
- sprintf(data_to_send, "%ld %ld %d %ld %d %d %d %d %d", gps.utm_pos.east, gps.utm_pos.north, gps_course, gps.hmsl, gps.gspeed, -gps.ned_vel.z, vsupply, estimator_flight_time, rssi);
+ sprintf(data_to_send, "%ld %ld %d %ld %d %d %d %d %d", gps.utm_pos.east, gps.utm_pos.north, gps_course, gps.hmsl, gps.gspeed, -gps.ned_vel.z, vsupply, autopilot_flight_time, rssi);
// send the number and wait for the prompt
char buf[32];
diff --git a/sw/ground_segment/cockpit/live.ml b/sw/ground_segment/cockpit/live.ml
index 42dddbcfd4d..f089089b237 100644
--- a/sw/ground_segment/cockpit/live.ml
+++ b/sw/ground_segment/cockpit/live.ml
@@ -697,7 +697,7 @@ let create_ac = fun alert (geomap:G.widget) (acs_notebook:GPack.notebook) (ac_id
connect "kill_throttle" ac.strip#connect_kill;
connect "nav_shift" ac.strip#connect_shift_lateral;
connect "pprz_mode" ac.strip#connect_mode;
- connect "estimator_flight_time" ac.strip#connect_flight_time;
+ connect "autopilot_flight_time" ac.strip#connect_flight_time;
let get_ac_unix_time = fun () -> ac.last_unix_time in
connect ~warning:false "snav_desired_tow" (ac.strip#connect_apt get_ac_unix_time);
begin (* Periodically update the appointment *)
diff --git a/sw/ground_segment/tmtc/GSM/SMS_Ground_UDtest_final.c b/sw/ground_segment/tmtc/GSM/SMS_Ground_UDtest_final.c
index 7bb3f9dc551..af8faf27175 100644
--- a/sw/ground_segment/tmtc/GSM/SMS_Ground_UDtest_final.c
+++ b/sw/ground_segment/tmtc/GSM/SMS_Ground_UDtest_final.c
@@ -99,7 +99,7 @@ pile *MaPile = NULL;
typedef enum {INIT, AT, CMGF, SMSMODE, CNMI, CPMS, ERREUR} Etat_Liste;
// Informations extraites du SMS recu de l'avion
-char extr_gps_utm_east[15], extr_gps_utm_north[15], extr_gps_course[15], extr_gps_alt[15], extr_gps_gspeed[15], extr_gps_climb[15], extr_vsupply[15], extr_estimator_flight_time[15], extr_qualite_signal_GSM[10];
+char extr_gps_utm_east[15], extr_gps_utm_north[15], extr_gps_course[15], extr_gps_alt[15], extr_gps_gspeed[15], extr_gps_climb[15], extr_vsupply[15], extr_autopilot_flight_time[15], extr_qualite_signal_GSM[10];
char reponse_attendue[20];
int prompt_recu = 0;
@@ -472,10 +472,10 @@ void decoupage( char message_complet[])
Extraction(data_to_cut, ' ', 1, 1, ' ', 1, 0, extr_gps_gspeed);
Extraction(data_to_cut, ' ', 1, 1, ' ', 1, 0, extr_gps_climb);
Extraction(data_to_cut, ' ', 1, 1, ' ', 1, 0, extr_vsupply);
- Extraction(data_to_cut, ' ', 1, 1, ' ', 1, 0, extr_estimator_flight_time);
+ Extraction(data_to_cut, ' ', 1, 1, ' ', 1, 0, extr_autopilot_flight_time);
Extraction(data_to_cut, ' ', 1, 1, '\r', 1, 0, extr_qualite_signal_GSM);
- printf("Message :\n utm_east %s\n utm_north %s\n course %s\n alt %s\n speed %s\n climb %s\n bat %s\n flight_time %s\n signal %s\n", extr_gps_utm_east, extr_gps_utm_north, extr_gps_course, extr_gps_alt, extr_gps_gspeed, extr_gps_climb, extr_vsupply, extr_estimator_flight_time, extr_qualite_signal_GSM);
+ printf("Message :\n utm_east %s\n utm_north %s\n course %s\n alt %s\n speed %s\n climb %s\n bat %s\n flight_time %s\n signal %s\n", extr_gps_utm_east, extr_gps_utm_north, extr_gps_course, extr_gps_alt, extr_gps_gspeed, extr_gps_climb, extr_vsupply, extr_autopilot_flight_time, extr_qualite_signal_GSM);
fflush(stdout);
}
diff --git a/sw/in_progress/satcom/tcp2ivy.c b/sw/in_progress/satcom/tcp2ivy.c
index e6e65712c10..a5691303871 100644
--- a/sw/in_progress/satcom/tcp2ivy.c
+++ b/sw/in_progress/satcom/tcp2ivy.c
@@ -75,7 +75,7 @@ unsigned char electrical_vsupply;
unsigned char nav_block;
unsigned char energy;
unsigned char throttle;
-unsigned short estimator_flight_time;
+unsigned short autopilot_flight_time;
unsigned char nav_utm_zone0;
float latlong_utm_x, latlong_utm_y;
unsigned char pprz_mode;
@@ -196,8 +196,8 @@ static gboolean read_data(GIOChannel *chan, GIOCondition cond, gpointer data) {
pprz_mode = buf[19];
// com_trans.buf[20] = nav_block;
nav_block = buf[20];
-// FillBufWith16bit(com_trans.buf, 21, estimator_flight_time);
- estimator_flight_time = buf2ushort(&buf[21]);
+// FillBufWith16bit(com_trans.buf, 21, autopilot_flight_time);
+ autopilot_flight_time = buf2ushort(&buf[21]);
//gps_lat = 52.2648312 * 1e7;
//gps_lon = 9.9939456 * 1e7;
@@ -211,7 +211,7 @@ static gboolean read_data(GIOChannel *chan, GIOCondition cond, gpointer data) {
//throttle = 51;
//pprz_mode = 2;
//nav_block = 1;
-//estimator_flight_time = 123;
+//autopilot_flight_time = 123;
nav_utm_zone0 = (gps_lon/10000000+180) / 6 + 1;
latlong_utm_of(RadOfDeg(gps_lat/1e7), RadOfDeg(gps_lon/1e7), nav_utm_zone0);
@@ -230,7 +230,7 @@ printf("energy %d\n", energy);
printf("throttle %d\n", throttle);
printf("pprz_mode %d\n", pprz_mode);
printf("nav_block %d\n", nav_block);
-printf("estimator_flight_time %d\n", estimator_flight_time);
+printf("autopilot_flight_time %d\n", autopilot_flight_time);
printf("gps_utm_east %d\n", gps_utm_east);
printf("gps_utm_north %d\n", gps_utm_north);
@@ -316,7 +316,7 @@ printf("gps_utm_zone %d\n", gps_utm_zone);
throttle * MAX_PPRZ / 100,
electrical_vsupply,
0, // amps
- estimator_flight_time,
+ autopilot_flight_time,
0, // kill_auto_throttle
0, // block_time
0, // stage_time
diff --git a/sw/in_progress/satcom/tcp2ivy_generic.c b/sw/in_progress/satcom/tcp2ivy_generic.c
index e40ce3665f4..caa9f881389 100644
--- a/sw/in_progress/satcom/tcp2ivy_generic.c
+++ b/sw/in_progress/satcom/tcp2ivy_generic.c
@@ -78,7 +78,7 @@ unsigned char electrical_vsupply;
unsigned char nav_block;
unsigned short energy;
unsigned char throttle;
-unsigned short estimator_flight_time;
+unsigned short autopilot_flight_time;
unsigned char nav_utm_zone0;
float latlong_utm_x, latlong_utm_y;
unsigned char pprz_mode;
@@ -133,8 +133,8 @@ static gboolean read_data(GIOChannel *chan, GIOCondition cond, gpointer data) {
pprz_mode = buf[19];
// com_trans.buf[21] = nav_block;
nav_block = buf[20];
- // FillBufWith16bit(com_trans.buf, 22, estimator_flight_time);
- estimator_flight_time = buf2ushort(&buf[21]);
+ // FillBufWith16bit(com_trans.buf, 22, autopilot_flight_time);
+ autopilot_flight_time = buf2ushort(&buf[21]);
#if 0
gps_lat = 52.2648312 * 1e7;
@@ -148,7 +148,7 @@ static gboolean read_data(GIOChannel *chan, GIOCondition cond, gpointer data) {
throttle = 51;
pprz_mode = 2;
nav_block = 1;
- estimator_flight_time = 123;
+ autopilot_flight_time = 123;
#endif
printf("**** message received from iridium module ****\n");
@@ -163,7 +163,7 @@ static gboolean read_data(GIOChannel *chan, GIOCondition cond, gpointer data) {
printf("throttle %d\n", throttle);
printf("pprz_mode %d\n", pprz_mode);
printf("nav_block %d\n", nav_block);
- printf("estimator_flight_time %d\n", estimator_flight_time);
+ printf("autopilot_flight_time %d\n", autopilot_flight_time);
fflush(stdout);
IvySendMsg("%d GENERIC_COM %d %d %d %d %d %d %d %d %d %d %d %d",
@@ -179,7 +179,7 @@ static gboolean read_data(GIOChannel *chan, GIOCondition cond, gpointer data) {
throttle,
pprz_mode,
nav_block,
- estimator_flight_time);
+ autopilot_flight_time);
}
else {
diff --git a/sw/lib/ocaml/expr_syntax.ml b/sw/lib/ocaml/expr_syntax.ml
index e553008ba10..fd9d5ad2c0b 100644
--- a/sw/lib/ocaml/expr_syntax.ml
+++ b/sw/lib/ocaml/expr_syntax.ml
@@ -72,7 +72,7 @@ let functions = [
let variables = [
"launch";
"estimator_z";
- "estimator_flight_time";
+ "autopilot_flight_time";
"estimator_hspeed_mod";
"estimator_theta";
"circle_count";