Commit d01619f6 authored by Luc Maisonobe's avatar Luc Maisonobe
Browse files

Merge remote-tracking branch 'origin/issue-909' into develop

Conflicts:
	src/changes/changes.xml
parents ea6d262b b5e76344
......@@ -21,6 +21,9 @@
</properties>
<body>
<release version="11.2" date="TBD" description="TBD">
<action dev="maxime" type="fix" issue="909">
Fixed wrong implementation of NTW LOF frame.
</action>
<action dev="luc" type="fix" issue="917">
Fixed missing tags in XML generation by EphemerisWriter.
</action>
......
......@@ -285,19 +285,16 @@ public enum LOFType {
/** {@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);
return new Rotation(pv.getVelocity(), pv.getMomentum(),
Vector3D.PLUS_J, Vector3D.PLUS_K);
}
@Override
public <T extends CalculusFieldElement<T>> FieldRotation<T> rotationFromInertial(final Field<T> field,
final FieldPVCoordinates<T> pv) {
final FieldVector3D<T> m = pv.getMomentum();
return new FieldRotation<>(new FieldVector3D<>(m.getY().negate(), m.getX(), field.getZero()),
m,
new FieldVector3D<>(field, Vector3D.PLUS_I),
new FieldVector3D<>(field, Vector3D.PLUS_J));
return new FieldRotation<>(pv.getVelocity(), pv.getMomentum(),
new FieldVector3D<>(field, Vector3D.PLUS_J),
new FieldVector3D<>(field, Vector3D.PLUS_K));
}
};
......
......@@ -225,12 +225,10 @@ public class LofOffsetPointingTest {
final TimeStampedPVCoordinates pvD = provider.getTargetPV(orbit, date, frame);
final TimeStampedFieldPVCoordinates<T> pvF = provider.getTargetPV(orbitF, dateF, frame);
// These tolerances may be too tight given that the frames are built
// with simpleEop=true which introduces some errors at about this level
Assert.assertEquals(0.0, Vector3D.distance(pvD.getPosition(), pvF.getPosition().toVector3D()), 9.0e-9);
Assert.assertEquals(0.0, Vector3D.distance(pvD.getVelocity(), pvF.getVelocity().toVector3D()), 5.0e-9);
Assert.assertEquals(0.0, Vector3D.distance(pvD.getAcceleration(), pvF.getAcceleration().toVector3D()), 4.0e-5);
Assert.assertEquals(0.0, Vector3D.distance(pvD.getPosition(), pvF.getPosition().toVector3D()), 6.0e-9);
Assert.assertEquals(0.0, Vector3D.distance(pvD.getVelocity(), pvF.getVelocity().toVector3D()), 5.0e-13);
Assert.assertEquals(0.0, Vector3D.distance(pvD.getAcceleration(), pvF.getAcceleration().toVector3D()), 2.0e-6);
}
@Before
......@@ -248,7 +246,7 @@ public class LofOffsetPointingTest {
mu = 3.9860047e14;
// Reference frame = ITRF
frameItrf = FramesFactory.getITRF(IERSConventions.IERS_2010, true);
frameItrf = FramesFactory.getITRF(IERSConventions.IERS_2010, false);
// Elliptic earth shape
earthSpheric =
......
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