Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SGP4 propagator #103

Closed
mhaneveer opened this issue Dec 5, 2016 · 9 comments
Closed

SGP4 propagator #103

mhaneveer opened this issue Dec 5, 2016 · 9 comments
Assignees

Comments

@mhaneveer
Copy link
Member

Has the SGP4 been added to the list of propagators? I thought to have heard about the addition during last meeting, but I can't seem to find it.

This issue might be possible to be merged with issue #52, regarding the TLE to Kepler Elements conversion and its verification with the SGP4 initial state output.

@DominicDirkx
Copy link
Member

SGP4 propagation is not currently supported by Tudat, the issue you are referring to is only on the reading of TLE files, which is included. However, the issue you mention may indicate that there is an issue with it.

There is C/C++ code available for SGP4 propagation, and linking it to Tudat would be a great feature. Jacco has had extensive experience with SGP4, I think he is the best person to approach about using the propagation with/in Tudat.

@magnific0
Copy link
Member

magnific0 commented Dec 7, 2016

I'm on it. Glad to hear other people want to delve into SGP too!

Recap from private meeting: there are two options (1) I have a personal adaptation of C++ SGP4 code by Vallado Tudat ready. (2) @mhaneveer pointed my to Daniel Warner's (danrw.com) C++ SGP4 code which is GCC and CMake compatible. I have just sent him an e-mail about hosting his project on GitHub.

There are some benefits / downsides to either option. Both codes are functionally slightly different (1) has a differential correction routine for estimating TLEs from observations (range, camera, inertial, TLEs) while (2) has some pass / tracking programs. (1) is more renowned and the source for all SGP4 codes (2) just seems better written.

We should probably make a decision soon on which direction to take, because either code would be very useful to have.

@mhaneveer
Copy link
Member Author

@magnific0 I've compared DanRW's C++ SGP4 code with the Matlab SGP4 code from Valledo, see below for the results.

Dan's code has WGS72 hard-coded in it, while Valledo's Matlab code can also be used with the newer WGS84. Do you if WGS84 is also used in Valledo's C++ code?

difference_danrw_matlab wgs72 _sgp4

Just out of curiosity I compared Dan's C++ (WGS72) with Valledo's Matlab (WGS84), which resulted in the plot below. As expected, the difference is definitely notable, and with a magnitude varying between meters to tens of meters as opposed to the sub-meter variation with the WGS72-WGS72 comparison.

difference_danrw_matlab wgs84 _sgp4

@DominicDirkx
Copy link
Member

Although there is a definite difference between the WGS72/WGS84 results, the internal consistency is still much better than the actual orbital accuracy of TLEs. However, for comparison studies I understand that being able to compare results well below their physical accuracy would be advantageous.

Since Vallado's code is essentially the standard for SGP4 propagation, my preference would go towards the inclusion of this package as a library, especially since @magnific0 already has a Tudat-compatible version available.

That being said, if the the danrw.com is really much more clearly written, this may be a good argument for it from a transparency point of view. Do you foresee that people will have to modify this code themselves in the future?

@magnific0
Copy link
Member

@mhaneveer thanks a lot for making the comparison. It is really interesting. WGS84 (like for Matlab) is optional in the C++ code. It is indeed negligible compared to TLE accuracy, but I am curious how the C++ and Matlab code from Vallado compare, to determine whether these differences are due to implementation or language.

@DominicDirkx I agree, I don't foresee a need for students or anyone touching the code. I think we should strive to keep SGP4 as unmodified as possible. For my adaptation I have only limited myself to fixing compilation issues, resisting urges to fix coding and style issues.

I have reapplied all my fixes to the code from the website from Vallado and committed them separately, such that it is really clear how "our" SGP4 differs from the original. You can find the repository at:
https://github.com/magnific0/SGP4

Any comments are welcome. Next I'll create a branch of the tudatBundle with the FindSGP4.cmake.

Left todo:

  • Think of and implement useful wrapper functions: propagators (like Kepler, TLE file readers/writers, etc).
  • Construct a SGP4 example (I have a TLE estimation program that I could modify as an example, but will take time and is not representative of common SGP4 use case).

@magnific0
Copy link
Member

#52 which spiked interest in adding a proper SGP4 propagator to Tudat was just closed. After a proper solution, as discussed in this issue, is implemented the TLE file reader of Tudat should be deprecated.

@DominicDirkx
Copy link
Member

Just curious if there is any activity on this issue. If not, let's limit it to doing something about the (wrong?) TLE reader in Tudat.

@wjhuisman
Copy link

Hi,

I am interested in using the TLE reader and the SGP4 propagator for my thesis (propagation of LEO objects), and I was wondering what the status of this is at the moment, seeing that this discussion took place almost two years ago. I can find the corresponding TLE to text header files in the bundle, but I am having trouble trying to figure out how the different functionalities are connected with each other. Is there an example somewhere that shows the use of the TLE reader and SGP4 in tudat?

@DominicDirkx
Copy link
Member

Tracked in #437

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants