AP_NavEKF2: Correct variable name

This commit is contained in:
Paul Riseborough 2015-10-21 10:15:25 +11:00 committed by Andrew Tridgell
parent 4640673cb1
commit e6312d91ce
3 changed files with 4 additions and 4 deletions

View File

@ -185,9 +185,9 @@ bool NavEKF2_core::getMagOffsets(Vector3f &magOffsets) const
// check for new magnetometer data and update store measurements if available // check for new magnetometer data and update store measurements if available
void NavEKF2_core::readMagData() void NavEKF2_core::readMagData()
{ {
if (use_compass() && _ahrs->get_compass()->last_update_usec() != lastMagUpdate_ms) { if (use_compass() && _ahrs->get_compass()->last_update_usec() != lastMagUpdate_us) {
// store time of last measurement update // store time of last measurement update
lastMagUpdate_ms = _ahrs->get_compass()->last_update_usec(); lastMagUpdate_us = _ahrs->get_compass()->last_update_usec();
// estimate of time magnetometer measurement was taken, allowing for delays // estimate of time magnetometer measurement was taken, allowing for delays
magDataNew.time_ms = imuSampleTime_ms - frontend.magDelay_ms; magDataNew.time_ms = imuSampleTime_ms - frontend.magDelay_ms;

View File

@ -70,7 +70,7 @@ void NavEKF2_core::InitialiseVariables()
lastHealthyMagTime_ms = imuSampleTime_ms; lastHealthyMagTime_ms = imuSampleTime_ms;
prevTasStep_ms = imuSampleTime_ms; prevTasStep_ms = imuSampleTime_ms;
prevBetaStep_ms = imuSampleTime_ms; prevBetaStep_ms = imuSampleTime_ms;
lastMagUpdate_ms = 0; lastMagUpdate_us = 0;
lastHgtReceived_ms = imuSampleTime_ms; lastHgtReceived_ms = imuSampleTime_ms;
lastVelPassTime_ms = imuSampleTime_ms; lastVelPassTime_ms = imuSampleTime_ms;
lastPosPassTime_ms = imuSampleTime_ms; lastPosPassTime_ms = imuSampleTime_ms;

View File

@ -674,7 +674,7 @@ private:
bool magFuseRequired; // boolean set to true when magnetometer fusion will be perfomred in the next time step bool magFuseRequired; // boolean set to true when magnetometer fusion will be perfomred in the next time step
uint32_t prevTasStep_ms; // time stamp of last TAS fusion step uint32_t prevTasStep_ms; // time stamp of last TAS fusion step
uint32_t prevBetaStep_ms; // time stamp of last synthetic sideslip fusion step uint32_t prevBetaStep_ms; // time stamp of last synthetic sideslip fusion step
uint32_t lastMagUpdate_ms; // last time compass was updated uint32_t lastMagUpdate_us; // last time compass was updated in usec
Vector3f velDotNED; // rate of change of velocity in NED frame Vector3f velDotNED; // rate of change of velocity in NED frame
Vector3f velDotNEDfilt; // low pass filtered velDotNED Vector3f velDotNEDfilt; // low pass filtered velDotNED
uint32_t imuSampleTime_ms; // time that the last IMU value was taken uint32_t imuSampleTime_ms; // time that the last IMU value was taken