TLE generation from Lambert maveuver

hello

here is code assembled from examples

        TLE tle = new TLE(
                "1 99999U 00000A   19210.57803320 -.00000177  00000-0  70327-5 0  9990",
                "2 99999  53.0011 233.5927 0000924 178.3893 181.7098 15.05477817 10140"
        );
        final Propagator propagator = TLEPropagator.selectExtrapolator(tle);
        final Frame teme = FramesFactory.getTEME();

        final AbsoluteDate initialTime = new AbsoluteDate("2021-11-23T20:00:00.000", TimeScalesFactory.getUTC());
        final AbsoluteDate plus60Time = initialTime.shiftedBy(60);
        final AbsoluteDate plus3600Time = initialTime.shiftedBy(3600);
        
        SpacecraftState initialState = propagator.propagate(initialTime);
        final Vector3D initialPos = initialState.getPVCoordinates(teme).getPosition();        
        SpacecraftState plus60State = propagator.propagate(plus60Time);
        final Vector3D plus60Pos = plus60State.getPVCoordinates(teme).getPosition();

        IodLambert lambert = new IodLambert(Constants.WGS84_EARTH_MU);
        KeplerianOrbit orbit = lambert.estimate(teme, true, 0, initialPos, initialTime, plus60Pos, plus60Time);
        System.out.println(orbit);

        final FiniteDifferencePropagatorConverter converter =
                new FiniteDifferencePropagatorConverter(new TLEPropagatorBuilder(
                        new TLE(tle.getSatelliteNumber(),
                                tle.getClassification(),
                                tle.getLaunchYear(),
                                tle.getLaunchNumber(),
                                tle.getLaunchPiece(),
                                tle.getEphemerisType(),
                                tle.getElementNumber(),
                                orbit.getDate(),
                                orbit.getKeplerianMeanMotion(),
                                0.,
                                0.,
                                orbit.getE(),
                                orbit.getI(),
                                orbit.getPerigeeArgument(),
                                orbit.getRightAscensionOfAscendingNode(),
                                orbit.getMeanAnomaly(),
                                tle.getRevolutionNumberAtEpoch(),
                                0.),
                        PositionAngle.TRUE,
                        1.0),
                        1.e-3, 1000);

        final double timeSpan = 60.0;
        final int nbOrbit = 3;
        final int nbPoints = (int) (orbit.getKeplerianPeriod() * nbOrbit / timeSpan);

        double[][] tol = NumericalPropagator.tolerances(1e-3, orbit, OrbitType.KEPLERIAN);
        NumericalPropagator prop = new NumericalPropagator(
                new DormandPrince853Integrator(0.1, 500, tol[0], tol[1]));

        final NormalizedSphericalHarmonicsProvider provider = GravityFieldFactory.getNormalizedProvider(4, 4);
        final ForceModel gravity = new HolmesFeatherstoneAttractionModel(FramesFactory.getITRF(IERSConventions.IERS_2010, true), provider);
        final HarrisPriester atmosphere = new HarrisPriester(CelestialBodyFactory.getSun(), new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS, Constants.WGS84_EARTH_FLATTENING,  FramesFactory.getITRF(IERSConventions.IERS_2010, false)));
        final double cd = 1.0;
        final double area = 1.0;
        final IsotropicDrag spacecraft = new IsotropicDrag(area, cd);
        final DragForce drag = new DragForce(atmosphere, spacecraft);
        prop.addForceModel(gravity);
        prop.addForceModel(drag);
        prop.setInitialState(initialState);

        final TLEPropagator generatedPropagator = (TLEPropagator) converter.convert(prop, timeSpan,  nbPoints, B_STAR);
        final TLE tle2Built = generatedPropagator.getTLE();

        System.out.println(tle);
        System.out.println("DormandPrince853Integrator \n" + tle2Built.toString());
        System.out.println("--------------------------");
        System.out.println(initialTime + " distance = " + generatedPropagator.propagate(initialTime).getPVCoordinates().getPosition().distance(propagator.propagate(initialTime).getPVCoordinates().getPosition()));
        System.out.println(plus60Time + " distance = " + generatedPropagator.propagate(plus60Time).getPVCoordinates().getPosition().distance(propagator.propagate(plus60Time).getPVCoordinates().getPosition()));
        System.out.println(plus3600Time + " distance = " + generatedPropagator.propagate(plus3600Time).getPVCoordinates().getPosition().distance(propagator.propagate(plus3600Time).getPVCoordinates().getPosition()));

generated TLE looks like this:

1 99999U 00000A   21327.83333333  .00000000  00000-0 -12665-1 0  9991
2 99999  53.0011  24.7597 0000921 217.6040 193.6002 15.05652681 10149
--------------------------
2021-11-23T20:00:00.000Z distance = 0.08037312215937283
2021-11-23T20:01:00.000Z distance = 0.7084883122918835
2021-11-23T21:00:00.000Z distance = 117.87339815044737

so basically im trying to compute Lambert between propagated position at time X to propagated position at time X+60sec

  1. why generated orbit params is so different from original? is there a way to achive maximum similarity?
  2. actually i want to build TLE with same orbit plane, but flying to opposite direction…so idea was to compute lambert between propagated position at time X to propagated position at time X-60sec (but time for Lambert still X+60)…but result is ~same…
KeplerianOrbit orbit = lambert.estimate(teme, false, 0, initialPos, initialTime, minus60Pos, plus60Time);

HALP…is it possible at all? im doing something wrong?

nvm, works fine without *PropagatorConverters

Hi @sonicblow

Welcome to the Orekit forum!

We are very sorry for the late answer.

After accessing the KeplerianOrbit estimated by the Lambert method, did you try using the method TLE.stateToTLE(final SpacecraftState state, final TLE templateTLE)? To call this method, state is the SpacecraftState built from your orbit object and templateTLE is just a template only used to access the different ids and epoch contain in the TLE (i.e., the keplerian elements of the template TLE are not used, they are built from the input state by fixed point method).

Using TLE.stateToTle(...) will give you the exact TLE corresponding to the input state while the FiniteDifferencePropagatorConverter will give you a TLE that better fill the whole orbit of the converting interval. As a result, I think that the TLE.stateToTle(...) can be sufficient for your

Best regards,
Bryan