|
|
|
@ -329,7 +329,7 @@ void NavEKF3_core::readMagData()
@@ -329,7 +329,7 @@ void NavEKF3_core::readMagData()
|
|
|
|
|
*/ |
|
|
|
|
void NavEKF3_core::readIMUData() |
|
|
|
|
{ |
|
|
|
|
const AP_InertialSensor &ins = _ahrs->get_ins(); |
|
|
|
|
const AP_InertialSensor &ins = AP::ins(); |
|
|
|
|
|
|
|
|
|
// calculate an averaged IMU update rate using a spike and lowpass filter combination
|
|
|
|
|
dtIMUavg = 0.02f * constrain_float(ins.get_loop_delta_t(),0.5f * dtIMUavg, 2.0f * dtIMUavg) + 0.98f * dtIMUavg; |
|
|
|
@ -437,7 +437,7 @@ void NavEKF3_core::readIMUData()
@@ -437,7 +437,7 @@ void NavEKF3_core::readIMUData()
|
|
|
|
|
// read the delta velocity and corresponding time interval from the IMU
|
|
|
|
|
// return false if data is not available
|
|
|
|
|
bool NavEKF3_core::readDeltaVelocity(uint8_t ins_index, Vector3f &dVel, float &dVel_dt) { |
|
|
|
|
const AP_InertialSensor &ins = _ahrs->get_ins(); |
|
|
|
|
const AP_InertialSensor &ins = AP::ins(); |
|
|
|
|
|
|
|
|
|
if (ins_index < ins.get_accel_count()) { |
|
|
|
|
ins.get_delta_velocity(ins_index,dVel); |
|
|
|
@ -583,7 +583,7 @@ void NavEKF3_core::readGpsData()
@@ -583,7 +583,7 @@ void NavEKF3_core::readGpsData()
|
|
|
|
|
// read the delta angle and corresponding time interval from the IMU
|
|
|
|
|
// return false if data is not available
|
|
|
|
|
bool NavEKF3_core::readDeltaAngle(uint8_t ins_index, Vector3f &dAng) { |
|
|
|
|
const AP_InertialSensor &ins = _ahrs->get_ins(); |
|
|
|
|
const AP_InertialSensor &ins = AP::ins(); |
|
|
|
|
|
|
|
|
|
if (ins_index < ins.get_gyro_count()) { |
|
|
|
|
ins.get_delta_angle(ins_index,dAng); |
|
|
|
|