Skip to content

Conversation

scottiyio
Copy link
Contributor

Change cross(cross(a, b)) to doubleCross(a, b) and add documentation

Add a no rotation coriolis test to NavState

Change cross(cross(a, b)) to doubleCross(a, b)
Vector9 n_xi, xi;
Matrix3 D_dR_R, D_dP_R, D_dV_R, D_body_nav;
dR(n_xi) << ((-dt) * omega);
dP(n_xi) << ((-dt2) * omega_cross_vel); // NOTE(luca): we got rid of the 2 wrt INS paper
dV(n_xi) << ((-2.0 * dt) * omega_cross_vel);
if (secondOrder) {
const Vector3 omega_cross2_t = omega.cross(omega.cross(n_t));
const Vector3 omega_cross2_t = doubleCross(omega, n_t);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think switching to doubleCross is most beneficial if we also grab its Jacobians and use them below to replace some complexity in the Jacobian chaining...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. I did a bit of tests and had one term not matching (probably because I didn't check myself and just trusted copilot) so I will look again tonight

There's also some doublecrosses elsewhere I believe

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of this code was rearranged. I wanted to only create doubleCross() once which might be the wrong approach. So H2_wrt_t is created even if we don't use it. Not sure.

Change cross(cross(a, b)) to doubleCross(a, b)
- Remove excess white space
@scottiyio scottiyio changed the title Add notes to NavState::coriolis Use doublecross instead of cross(Cross(a, b)) in NavState Oct 22, 2025
@scottiyio scottiyio requested a review from dellaert October 22, 2025 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants