ODUtils or odutils stands for Orbit Determination Utilities. I have written a few simple routines to convert between Cartesian state vectors and two line element sets (TLEs). TLEs are used with SGP4 and the new SGP4-XP propagators. My utilities can convert position and velocity vectors into TLEs and do the reverse. If you have a license for the SGP4-XP binaries published on Space-Track.org, you can also work with SGP4-XP TLEs. I have also taken the time to implement a set of simple web services.
As of September 2021, the USSF only provides SGP4-XP in compiled binary form. They do provide a set of wrappers in a few different software languages to call their libraries. I prefer to work in Java and have developed some example web services to call these binaries. Providing web services to access utility routines helps in two important ways. The first is to grant flexibility with language implementation. If your prefered language can make HTTP calls and parse JSON, you can integrate with web services written in any other language. Even though it adds a web server to the architecture, this can often simplify the implementation process because there is no need to wrap the core binaries in your prefered language. Also, because the SGP4-XP routines are currently available in binary only, it may require special security considerations. Third-party binaries with no available source code may present a concern for operators wishing to include the functionality on their operational systems. By having the code be accessed through web services, the binaries can be isolated on a single node on the network or wrapped in a VM or other container. The outbound permissions on that node or container can be revoked giving some assurance that these binaries are only able to function through the web services interface.
This service will convert a Cartesian position and velocity vector into a TLE. The vector is specified as x, y, and z position in km and x, y, and z velocity in km/s along with an epoch date. The service will return 3 TLEs. Each TLE is computed using the iteration method to gradually adjust a set of TLE components until the output vector at epoch matches the input. The first TLE is computed using the open source version of SGP4 that I ported to java. The second TLE is computed using the official USSF implementation of SGP4. The third TLE is computed using the USSF implementation of the new SGP4-XP. No drag or SRP coefficients are fit as part of this conversion.
This service will output a set of Cartesian position and velocity vectors for a set of times. The input inludes a TLE, start date, end date, and time step in seconds. The service will compute the output vector at each step between the start and end dates inclusively.
The caller specifies a set of Cartesian position and velocity vectors, along with a desired output epoch. The service will perform an orbit determination to fit an SGP4 TLE to the provided vectors. Because the differential correction service can take some time to complete, this service runs asynchronously. Callers submit the OD job to sgp4od and receive a job id in return. To check on results and receive the output TLE, callers use the job id as a parameter to call sgp4odres.
This service works like sgp4od, except the target output is a TLE for use with SGP4-XP. Call sgp4xpodres to get the results.
Coming soon, this service will fit a set of Cartesian vectors or a set of TLEs using OREKITs high-precision force model.
The code is split into two repositories. The main algorithms are in the odutils repo on github. This allows other users to interact with the algorithms without any web dependencies. The other repo is called odutils-web and includes an embedded HTTP server, the Java Lightweight HTTP Server available from here.
The Orekit project is used to provide coordinate transformations between TEME, ECEF, and J2000 and for the high-precision orbit determinations. Use of this project requires downloading a separate data repository from them.
Finally, if you wish to have the USSF version of SGP4 or SGP4-XP, you must download the binaries from space-track.org and place them in the appropriate directory.
More detailed instructions are provided in the github repository.