Commit 746abc78 authored by Bryan Cazabonne's avatar Bryan Cazabonne
Browse files

Merge branch 'afossa/orekit-issue-781' into develop

parents cd5c1771 662af832
Pipeline #1073 passed with stages
in 29 minutes and 56 seconds
......@@ -24,6 +24,9 @@
<action dev="luc" type="add">
Added support for reading and writing CCSDS NDM composite messages.
</action>
<action dev="afossa" type="fix" issue="781">
Fixed parsing in buildLine2() method of FieldTLE.
</action>
<action dev="luc" type="fix" issue="776">
Fixed associativity in units parsing.
</action>
......
......@@ -546,15 +546,15 @@ public class FieldTLE<T extends RealFieldElement<T>> implements FieldTimeStamped
buffer.append(ParseUtils.buildSatelliteNumber(satelliteNumber, "satelliteNumber-2"));
buffer.append(' ');
buffer.append(ParseUtils.addPadding(INCLINATION, f34.format(FastMath.toDegrees(inclination)), ' ', 8, true, satelliteNumber));
buffer.append(ParseUtils.addPadding(INCLINATION, f34.format(FastMath.toDegrees(inclination).getReal()), ' ', 8, true, satelliteNumber));
buffer.append(' ');
buffer.append(ParseUtils.addPadding("raan", f34.format(FastMath.toDegrees(raan)), ' ', 8, true, satelliteNumber));
buffer.append(ParseUtils.addPadding("raan", f34.format(FastMath.toDegrees(raan).getReal()), ' ', 8, true, satelliteNumber));
buffer.append(' ');
buffer.append(ParseUtils.addPadding(ECCENTRICITY, (int) FastMath.rint(eccentricity.getReal() * 1.0e7), '0', 7, true, satelliteNumber));
buffer.append(' ');
buffer.append(ParseUtils.addPadding("pa", f34.format(FastMath.toDegrees(pa)), ' ', 8, true, satelliteNumber));
buffer.append(ParseUtils.addPadding("pa", f34.format(FastMath.toDegrees(pa).getReal()), ' ', 8, true, satelliteNumber));
buffer.append(' ');
buffer.append(ParseUtils.addPadding("meanAnomaly", f34.format(FastMath.toDegrees(meanAnomaly)), ' ', 8, true, satelliteNumber));
buffer.append(ParseUtils.addPadding("meanAnomaly", f34.format(FastMath.toDegrees(meanAnomaly).getReal()), ' ', 8, true, satelliteNumber));
buffer.append(' ');
buffer.append(ParseUtils.addPadding(MEAN_MOTION, f211.format(meanMotion.getReal() * 43200.0 / FastMath.PI), ' ', 11, true, satelliteNumber));
......
......@@ -761,6 +761,21 @@ public class FieldTLETest {
Assert.assertEquals(tle.toString(), rebuilt.toString());
}
@Test
public void testIssue781() {
final DSFactory factory = new DSFactory(6, 3);
final String line1 = "1 05709U 71116A 21105.62692147 .00000088 00000-0 00000-0 0 9999";
final String line2 = "2 05709 10.8207 310.3659 0014139 71.9531 277.0561 0.99618926100056";
Assert.assertTrue(TLE.isFormatOK(line1, line2));
final FieldTLE<DerivativeStructure> fieldTLE = new FieldTLE<>(factory.getDerivativeField(), line1, line2);
final FieldTLEPropagator<DerivativeStructure> tlePropagator = FieldTLEPropagator.selectExtrapolator(fieldTLE, fieldTLE.getParameters(factory.getDerivativeField()));
final FieldTLE<DerivativeStructure> fieldTLE1 = FieldTLE.stateToTLE(tlePropagator.getInitialState(), fieldTLE);
Assert.assertEquals(line2, fieldTLE1.getLine2());
}
@Before
public void setUp() {
Utils.setDataRoot("regular-data");
......
Markdown is supported
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