implemented Kahan summation algorithm for adding process noise to delta

angle- and delta velocity bias variance

- the contribution of process noise per iteration for these states can be so
small that it gets lost if using standard floating point summation

Signed-off-by: Roman <bapstroman@gmail.com>
This commit is contained in:
Roman
2019-06-11 19:28:06 +10:00
committed by Paul Riseborough
parent 0f49eb34a0
commit cef2ba5ab9
4 changed files with 35 additions and 2 deletions
+8
View File
@@ -1722,3 +1722,11 @@ void Ekf::save_mag_cov_data()
}
}
}
float Ekf::kahanSummation(float sum_previous, float input, float &accumulator) const
{
float y = input - accumulator;
float t = sum_previous + y;
accumulator = (t - sum_previous) - y;
return t;
}