TLE.java error with addPadding and bstar value of 1.0E-4
There appears to be a bug in TLE.java with regard to the padding of
decimals
when building a TLE string. When a bstar value of 1.0E-4 is provided,
an error is thrown by the ‘addPadding’ method. This seems to be a
special case with ANY decimal number with only a single ‘1’ in it,
regardless of exponent value. A mantissa of 100000 is produced which is
too big for the 5 digits it's expecting.
Changing the bstar to 1.1E-4 does not throw the error. I’m using the
latest 9.1 release:
2018-03-06 18:09:20,380 ERROR (default task-2) [stderr.write()]
org.orekit.errors.OrekitException: invalid TLE parameter for object 52:
B* = 100000
2018-03-06 18:09:20,381 ERROR (default task-2) [stderr.write()] at
org.orekit.propagation.analytical.tle.TLE.addPadding(TLE.java:418)
2018-03-06 18:09:20,381 ERROR (default task-2) [stderr.write()] at
org.orekit.propagation.analytical.tle.TLE.addPadding(TLE.java:399)
2018-03-06 18:09:20,381 ERROR (default task-2) [stderr.write()] at
org.orekit.propagation.analytical.tle.TLE.formatExponentMarkerFree(TLE.java:343)
2018-03-06 18:09:20,382 ERROR (default task-2) [stderr.write()] at
org.orekit.propagation.analytical.tle.TLE.buildLine1(TLE.java:309)
Here is an element set from spacetrack that, when parsed and regenerated
back into a TLE produces the error:
1 00052U 60009D 76059.20960648 +.00000225 +00000-0 +10000-3 0 9997
2 00052 047.1450 002.7500 1406000 181.1400 000.0000 12.17682743007435
(from redmine: issue id 388, created on 2018-03-07, closed on 2018-06-04)