mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-29 14:52:12 +01:00
Make the simulation provide GPSVelocity object since this is critical for EKF
now
This commit is contained in:
parent
ce6def870b
commit
b7c3b1fdd1
@ -59,6 +59,7 @@
|
||||
#include "gyrosbias.h"
|
||||
#include "flightstatus.h"
|
||||
#include "gpsposition.h"
|
||||
#include "gpsvelocity.h"
|
||||
#include "homelocation.h"
|
||||
#include "magnetometer.h"
|
||||
#include "ratedesired.h"
|
||||
@ -100,6 +101,7 @@ int32_t SensorsInitialize(void)
|
||||
GyrosInitialize();
|
||||
GyrosBiasInitialize();
|
||||
GPSPositionInitialize();
|
||||
GPSVelocityInitialize();
|
||||
MagnetometerInitialize();
|
||||
RevoCalibrationInitialize();
|
||||
|
||||
@ -467,6 +469,13 @@ static void simulateModelQuadcopter()
|
||||
gpsPosition.PDOP = 1;
|
||||
GPSPositionSet(&gpsPosition);
|
||||
last_gps_time = PIOS_DELAY_GetRaw();
|
||||
|
||||
GPSVelocityData gpsVelocity;
|
||||
GPSVelocityGet(&gpsVelocity);
|
||||
gpsVelocity.North = vel[0] + gps_vel_drift[0];
|
||||
gpsVelocity.East = vel[1] + gps_vel_drift[1];
|
||||
gpsVelocity.Down = vel[2] + gps_vel_drift[2];
|
||||
GPSVelocitySet(&gpsVelocity);
|
||||
}
|
||||
|
||||
// Update mag periodically
|
||||
|
Loading…
x
Reference in New Issue
Block a user