mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-27 08:55:51 +08:00
[fixedwing] minor cleanup for ahrs_sim
This commit is contained in:
@@ -585,15 +585,8 @@ void sensors_task( void ) {
|
|||||||
|
|
||||||
//FIXME: this is just a kludge
|
//FIXME: this is just a kludge
|
||||||
#if USE_AHRS && defined SITL && !USE_NPS
|
#if USE_AHRS && defined SITL && !USE_NPS
|
||||||
// timestamp when last callback was received
|
// dt is not really used in ahrs_sim
|
||||||
static float last_ts = 0.f;
|
ahrs_propagate(1./PERIODIC_FREQUENCY);
|
||||||
// current timestamp
|
|
||||||
float now_ts = get_sys_time_float();
|
|
||||||
// dt between this and last callback
|
|
||||||
float dt = now_ts - last_ts;
|
|
||||||
last_ts = now_ts;
|
|
||||||
|
|
||||||
ahrs_propagate(dt);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if USE_BARO_BOARD
|
#if USE_BARO_BOARD
|
||||||
|
|||||||
Reference in New Issue
Block a user