[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: [Orekit Users] Generate TLE



Hi Pascal,

Thanks for the help. I'm still having a bit of trouble following your instructions, I'm not sure if what I am doing is how it should be done:

            OEMParser parser = new OEMParser();
            parser = parser.withInternationalDesignator(2018,12,"UUU"); // I'm not sure if this is required, it's fake info anyway
            OEMFile file = parser.parse("file.oem");

            // This is how I am creating the list of SpacecraftState

            List<OEMFile.EphemeridesBlock> ephemeridesBlockList = file.getEphemeridesBlocks();
            OEMFile.EphemeridesBlock block = ephemeridesBlockList.get(0);
            BoundedPropagator boundedPropagator = block.getPropagator();
            List<SpacecraftState> spacecraftStateList = new ArrayList<>();

            for (AbsoluteDate date = block.getStart(); date.compareTo(block.getStop()) <= 0; date = date.shiftedBy(60)) {
                spacecraftStateList.add(boundedPropagator.propagate(date));
            }

            // Up to everything works without throwing any exceptions

            // This throws an exception (Jacobi Matrix of type CARTESIAN is singular for the current orbit) <-- (Jacobi Matrix des Typs CARTESIAN ist singulär für die aktuelle Umlaufbahn)
            FiniteDifferencePropagatorConverter converter =
                    new FiniteDifferencePropagatorConverter(new TLEPropagatorBuilder(
                            new TLE(1,'U',2018,12,"UUU",
                                    1,1,block.getStart(),0.0,
                                    0.0,0.0,0.0,98.17,0,
                                    Math.toRadians(10.0),0.0,0,0.0),
                            PositionAngle.TRUE,1.0),0.01,60);
            // Should I get a TLE template some other way? Or how should I use the FiniteDifferencePropagatorConverter class?

            // Is this the proper way to build the TLEPropagator from the list?
            TLEPropagator tlePropagator = (TLEPropagator) converter.convert(spacecraftStateList,false,"");

            System.out.println(tlePropagator.getTLE());

Best regards,
Javier

-----Ursprüngliche Nachricht-----
Von: orekit-users-request@orekit.org [mailto:orekit-users-request@orekit.org] Im Auftrag von Pascal Parraud
Gesendet: Freitag, 6. Juli 2018 11:07
An: orekit-users@orekit.org
Betreff: Re: [Orekit Users] Generate TLE

Hi Javier,

To convert ephemeris data to a TLE, you have to use the FiniteDifferencePropagatorConverter which allows to convert a list of SpacecraftState, to be build from the ephemeris data, into a TLEPropagator, from which you can get a TLE.

The OMMFile is only supposed to be recovered from a CCSDS OMM file parsed thanks to the OMMParser, so it isn't the right way to do the expected job.

Best regards,

Pascal


Le 06/07/2018 à 10:27, javier.montemayor.mancias@emi.fraunhofer.de a écrit :
> Hi guys,
>
> I'm trying to generate a TLE from ephemeris data but can't find a way 
> to do so. Does anybody know how to do it? I've found that the OMMFile 
> class has a
> generateTLE() method but I don't see any way to link the file to that method.
>
> Best regards,
> Javier