Hi everyone,
I believe there is a discrepancy between the definition of the NTW frame in the Javadoc and the actual code. According to the former, TNW and NTW have their directions shuffled/inverted:
XTNW = YNTW
YTNW = -XNTW
ZTNW = ZNTW
However the implementation does not seem to match that:
TNW {
/** {@inheritDoc} */
public Rotation rotationFromInertial(final PVCoordinates pv) {
return new Rotation(pv.getVelocity(), pv.getMomentum(),
Vector3D.PLUS_I, Vector3D.PLUS_K);
}
NTW {
/** {@inheritDoc} */
public Rotation rotationFromInertial(final PVCoordinates pv) {
final Vector3D m = pv.getMomentum();
return new Rotation(new Vector3D(-m.getY(), m.getX(), 0), m,
Vector3D.PLUS_I, Vector3D.PLUS_J);
}
In particular, the second axis of NTW is not in the velocity’s direction. Or am I not understanding something?
Quick numerical checks via the Python wrapper seem to confirm the results are not consistent.
Cheers,
Romain.