Commit d832f7a6 authored by Véronique Pommier-Maurussane's avatar Véronique Pommier-Maurussane
Browse files

Fixed bug in local orbital frame transformation

parent 2d0d7ad3
......@@ -87,10 +87,12 @@ public class LocalOrbitalFrame extends Frame {
final Transform translation = new Transform(p.negate(), v.negate());
// compute the rotation part of the transform
final Rotation r = new Rotation((type == LOFType.TNW) ? v : p, momentum,
Vector3D.PLUS_I, Vector3D.PLUS_K);
final Transform rotation =
new Transform(new Rotation((type == LOFType.TNW) ? v : p, momentum,
Vector3D.PLUS_I, Vector3D.PLUS_K),
new Vector3D(1.0 / p.getNormSq(), momentum));
new Transform(r,
new Vector3D(1.0 / p.getNormSq(),
// update the frame defining transform
setTransform(new Transform(translation, rotation));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment