Remove legacy imu interface

This commit is contained in:
kamilritz
2020-01-21 14:50:39 +01:00
committed by Paul Riseborough
parent 7c3a2f839b
commit 37201fb071
4 changed files with 2 additions and 19 deletions
+1 -1
View File
@@ -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
-13
View File
@@ -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;
-2
View File
@@ -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);
+1 -3
View File
@@ -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);
}