diff --git a/EKF/common.h b/EKF/common.h index e9a36675993..8c4b2d7de90 100644 --- a/EKF/common.h +++ b/EKF/common.h @@ -67,7 +67,7 @@ struct gps_message { float epv; ///< GPS vertical position accuracy in m float sacc; ///< GPS speed accuracy in m/s float vel_m_s; ///< GPS ground speed (m/sec) - Vector3f vel_ned; ///< GPS ground speed NED - TODO: make Vector3f + Vector3f vel_ned; ///< GPS ground speed NED bool vel_ned_valid; ///< GPS ground speed is valid uint8_t nsats; ///< number of satellites used float pdop; ///< position dilution of precision diff --git a/EKF/estimator_interface.cpp b/EKF/estimator_interface.cpp index c3b203bb150..5d5e89c44ac 100644 --- a/EKF/estimator_interface.cpp +++ b/EKF/estimator_interface.cpp @@ -123,21 +123,8 @@ bool EstimatorInterface::checkIfVehicleAtRest(float dt) } } -void EstimatorInterface::setIMUData(uint64_t time_usec, uint64_t delta_ang_dt, uint64_t delta_vel_dt, - float (&delta_ang)[3], float (&delta_vel)[3]) -{ - imuSample imu_sample_new; - imu_sample_new.delta_ang = Vector3f(delta_ang); - imu_sample_new.delta_vel = Vector3f(delta_vel); void EstimatorInterface::setMagData(const magSample &mag_sample) - imu_sample_new.delta_ang_dt = delta_ang_dt / 1e6f; - imu_sample_new.delta_vel_dt = delta_vel_dt / 1e6f; - imu_sample_new.time_us = time_usec; - - setIMUData(imu_sample_new); -} - { if (!_initialised || _mag_buffer_fail) { return; diff --git a/EKF/estimator_interface.h b/EKF/estimator_interface.h index 06a03154b00..c520e2516bb 100644 --- a/EKF/estimator_interface.h +++ b/EKF/estimator_interface.h @@ -174,8 +174,6 @@ public: void setIMUData(const imuSample &imu_sample); - // legacy interface for compatibility (2018-09-14) - void setIMUData(uint64_t time_usec, uint64_t delta_ang_dt, uint64_t delta_vel_dt, float (&delta_ang)[3], float (&delta_vel)[3]); void setMagData(const magSample &mag_sample); diff --git a/test/sensor_simulator/mag.cpp b/test/sensor_simulator/mag.cpp index c5a9744d983..3665feffc95 100644 --- a/test/sensor_simulator/mag.cpp +++ b/test/sensor_simulator/mag.cpp @@ -15,9 +15,7 @@ Mag::~Mag() void Mag::send(uint64_t time) { - magSample mag_sample; - mag_sample.mag = _mag_data; - mag_sample.time_us = time; + const magSample mag_sample {_mag_data, time}; _ekf->setMagData(mag_sample); }