Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed MatrixMath LPS25HB_I2C LSM9DS1 Matrix2 PIDcontroller LoopTicker SBUS_without_mainfile UsaPack solaESKF_wind Vector3 CalibrateMagneto FastPWM
Diff: run.cpp
- Revision:
- 79:aa2631950f46
- Parent:
- 76:f6617891a867
- Child:
- 84:028bd650e8bc
--- a/run.cpp Wed Sep 29 03:20:39 2021 +0000
+++ b/run.cpp Wed Sep 29 06:32:46 2021 +0000
@@ -78,23 +78,14 @@
getIMUval();
ekf.updateNominal(gyro,acc,accref,att_dt);
ekf.updateErrState(gyro,acc, att_dt);
- if(obsCount == 50){
- if(ekf.determinDynStatus(acc,accref)){
- ekf.updateMeasures(gyro,acc,accref);
- }else{
- ekf.updateStaticMeasures(gyro,acc,accref);
- }
- obsCount = 0;
- }else{
- if(ekf.determinDynStatus(acc,accref)){
- ekf.updateAccMeasures(acc,accref);
- }else{
- ekf.updateStaticAccMeasures(acc,accref);
- }
- obsCount += 1;
+ if(ekf.determinDynStatus(acc,accref)){
+ ekf.updateAccMeasures(acc,accref);
+ }else{
+ ekf.updateStaticAccMeasures(acc,accref);
}
-
- ekf.updateGPSVelocity(0.0f,0.0f);
+ if(itowVEL_log == updateValues.gps_itowVEL){
+ ekf.updateGPSVelocity(updateValues.vgps[0],updateValues.vgps[1],updateValues.vgps[2],acc,accref);
+ }
ekf.updateGyroBiasConstraints(gyro);
ekf.fuseErr2Nominal();