Skip to content

Commit

Permalink
Merge pull request #716 from JuliaRobotics/23Q4/enh/imu_g
Browse files Browse the repository at this point in the history
Add gravitational acceleration to imuKinematic
  • Loading branch information
dehann authored Nov 13, 2023
2 parents bc5cbc5 + 3d20dfd commit 110ab28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/factors/InertialDynamic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ getManifold(::InertialDynamic) = getManifold(RotVelPos)


## TODO consolidate inside module as RoME.imuKinematic
function imuKinematic!(du, u, p, t)
function imuKinematic!(du, u, p, t; g=SA[0; 0; 9.81])
# p is IMU input (assumed [.gyro; .accel])
M = SpecialOrthogonal(3)

Expand All @@ -23,7 +23,7 @@ function imuKinematic!(du, u, p, t)
= R * Ω # d/dt R = d/dt exp(Ω*Δt) => Ṙ = exp(ΩΔt)*d(ΩΔt)/dt = exp(ΩΔt)*Ω

A_m = p[].accel(t)
= R * (A_m) # + A_b)
= R * A_m - g # R * (A_m + A_b) - g
= V

du.x[1] .=
Expand Down

0 comments on commit 110ab28

Please sign in to comment.