In TestCase.propagate
, at lines 61 to 66, replace
org.orekit.propagation.Propagator propagator = TLEPropagator.selectExtrapolator(
new TLE(input.getTle1(), input.getTle2()),
attitudeProvider,
input.getMass(),
satelliteFrame
);
by
org.orekit.propagation.Propagator propagator = TLEPropagator.selectExtrapolator(
new TLE(input.getTle1(), input.getTle2()),
attitudeProvider,
input.getMass(),
FramesFactory.getTEME());
Then in EphemerisHandler.getCartesianParameter
, replace
Vector3D orekitPosition = state.getPVCoordinates().getPosition();
Coordinate position = new Coordinate(orekitPosition.getX(), orekitPosition.getY(), orekitPosition.getZ());
Vector3D orekitVelocity = state.getPVCoordinates().getVelocity();
Coordinate velocity = new Coordinate(orekitVelocity.getX(), orekitVelocity.getY(), orekitVelocity.getZ());
Vector3D orekitAcceleration = state.getPVCoordinates().getAcceleration();
Coordinate acceleration = new Coordinate(orekitAcceleration.getX(), orekitAcceleration.getY(), orekitAcceleration.getZ());
return new CartesianParameter(position, velocity, acceleration);
by
PVCoordinates pva = state.getPVCoordinates(satelliteFrame);
return new CartesianParameter(pva.getPosition(),
pva.getVelocity(),
pva.getAcceleration());
This is because the TLE propagator must be in TEME frame, and then you should convert its output into another frame as desired.
There are also other uses of Cartesian coordinates in you code, at least in EphemerisHandler.getOther
and EphemerisHandler.getSubSatellitePoint
where you should also perform the frame transform as the state will be in TEME but you want it in satelliteFrame
.