mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-31 20:38:27 +08:00
[ins] EKF2 fix localization of global waypoints (#2704)
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
*/
|
||||
|
||||
#include "subsystems/ins/ins_ekf2.h"
|
||||
#include "subsystems/navigation/waypoints.h"
|
||||
#include "subsystems/abi.h"
|
||||
#include "stabilization/stabilization_attitude.h"
|
||||
#include "generated/airframe.h"
|
||||
@@ -347,6 +348,9 @@ void ins_ekf2_update(void)
|
||||
ltp_def_from_lla_i(&ekf2.ltp_def, &lla_ref);
|
||||
stateSetLocalOrigin_i(&ekf2.ltp_def);
|
||||
|
||||
/* update local ENU coordinates of global waypoints */
|
||||
waypoints_localize_all();
|
||||
|
||||
ekf2.ltp_stamp = origin_time;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,10 @@
|
||||
#ifndef WAYPOINTS_H
|
||||
#define WAYPOINTS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "std.h"
|
||||
#include "math/pprz_geodetic_int.h"
|
||||
#include "math/pprz_geodetic_float.h"
|
||||
@@ -128,4 +132,8 @@ extern void waypoint_localize(uint8_t wp_id);
|
||||
/** update local ENU coordinates of all global waypoints */
|
||||
extern void waypoints_localize_all(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* WAYPOINTS_H */
|
||||
|
||||
Reference in New Issue
Block a user