Skip to content

Commit 7787089

Browse files
committed
update readme
1 parent c38adea commit 7787089

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ As the filter uses a quaternion to encode rotations, it's easy to perform coordi
2020
Moreover, since a 6-axis IMU (gyro-accelerometer) cannot measure an absolute heading, a function is included to rotate the orientation about the vertical (yaw) axis. One can use vector operations to correct the heading with an additional sensor like a magnetometer.
2121

2222
# Velocity estimate
23-
The library can integrate acceleration to obtain a short-term estimate of velocity. This is accomplished by using a set of kalman-like filters like the one shown above. First, the acceleration is checked against a rest condition of (0,0,0)g, and any deviations from this state that lie within specified uncertainty band are suppresed. This eliminates much of the bias due to gravity or miscalibration:
23+
The library can integrate acceleration to obtain an estimate of velocity. This is accomplished by using a set of Kalman-like filters like the one shown above. The acceleration is checked against a rest condition of (0,0,0)g and any deviations that lie within a specified uncertainty band are suppressed. This eliminates much of the bias due to gravity or miscalibration:
2424

2525
$\ K_{acc} = 1/(1 + \frac{ S_{acc}^2 }{ {\sigma}_{acc}^2 } ) $
2626

@@ -30,15 +30,15 @@ $\ a_{k} = a_{k} - \overline{a_{k}} $
3030

3131
$\ \overline{a_{k}} = \overline{a_{k-1}} + K_{acc}{a_{k}} $
3232

33-
Afterwords, the deviation of the velocity (relative to a known target velocity) along with the variance of the acceleration are used to determine the kalman gain of the velocity. This relationship causes small velocity deviations or small accelerations to reduce the gain, and the velocity estimate is forced to match the known target velocity:
33+
Afterward, the deviation of the velocity (relative to a known target velocity), along with the variance of the acceleration, is used to determine the Kalman gain of the velocity. This relationship causes small velocity changes or small accelerations to reduce the gain, and the velocity is forced to match the target velocity:
3434

3535
$\ \Delta{V} = V_{k-1} - V_{target} $
3636

3737
$\ S_{vel}^2 = | \overrightarrow{ {\Delta}V } |^2 + K_{vel}S_{vel}^2 $
3838

3939
$\ K_{vel} = 1/(1 + ( \frac{ S_{vel} S_{acc} }{ \sigma_{vel} \sigma_{acc} } )^2 ) $
4040

41-
The velocity is then updated using the trapezoidal rule to integrate the corrected acceleration:
41+
The velocity is then updated using the trapezoidal rule to integrate the filtered acceleration:
4242

4343
$\ V_{k} = V_{k-1} + K_{vel}{\Delta}{V} + \frac{dt}{2}( a_{k} + a_{k-1} ) $
4444

0 commit comments

Comments
 (0)