mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-07 00:53:41 +08:00
[ins] fix ins_baro_alt, ned frame, z-down!
This commit is contained in:
@@ -191,7 +191,7 @@ static void baro_cb(uint8_t __attribute__((unused)) sender_id, const float *pres
|
||||
ins_ltp_pos.z = POS_BFP_OF_REAL(vff_z);
|
||||
}
|
||||
else {
|
||||
ins_baro_alt = pprz_isa_height_of_pressure(*pressure, ins_qfe);
|
||||
ins_baro_alt = -pprz_isa_height_of_pressure(*pressure, ins_qfe);
|
||||
vff_update(ins_baro_alt);
|
||||
}
|
||||
INS_NED_TO_STATE();
|
||||
|
||||
@@ -50,7 +50,7 @@ extern struct NedCoor_i ins_gps_speed_cm_s_ned;
|
||||
|
||||
/* barometer */
|
||||
#if USE_VFF
|
||||
extern float ins_baro_alt; ///< altitude calculated from baro in meters
|
||||
extern float ins_baro_alt; ///< altitude calculated from baro in meters (z-down)
|
||||
extern float ins_qfe;
|
||||
extern bool_t ins_baro_initialised;
|
||||
#endif
|
||||
|
||||
@@ -214,7 +214,7 @@ static void baro_cb(uint8_t __attribute__((unused)) sender_id, const float *pres
|
||||
ins_ltp_pos.z = POS_BFP_OF_REAL(vff_z);
|
||||
}
|
||||
else {
|
||||
ins_baro_alt = pprz_isa_height_of_pressure(*pressure, ins_qfe);
|
||||
ins_baro_alt = -pprz_isa_height_of_pressure(*pressure, ins_qfe);
|
||||
vff_update_baro(ins_baro_alt);
|
||||
}
|
||||
INS_NED_TO_STATE();
|
||||
|
||||
Reference in New Issue
Block a user