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

ENH: TLE generator #8

Closed
jklenzing opened this issue Oct 23, 2019 · 10 comments · Fixed by #60
Closed

ENH: TLE generator #8

jklenzing opened this issue Oct 23, 2019 · 10 comments · Fixed by #60
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@jklenzing
Copy link
Member

Is your feature request related to a problem? Please describe.
Often for mission planning, the TLE is needed. Need something that can generate TLEs from user-supplied keywords and vice-versa. Keywords should be physical quantities such as inclination, eccentricity, etc.

Describe the solution you'd like
Code should include an orbit dictionary with these keywords. Require functions to translate dictionary into TLEs, and read TLEs into user-friendly ouput.

@jklenzing jklenzing added this to the 0.2.0 release milestone Oct 23, 2019
@jklenzing jklenzing added the enhancement New feature or request label Oct 23, 2019
@jklenzing
Copy link
Member Author

Include examples of drag coefficients in documentation

@jklenzing
Copy link
Member Author

jklenzing commented Dec 27, 2019

This seems appropriate to the discussion:

https://space.stackexchange.com/questions/26117/how-to-generate-tle-file

Highlight:

Making Fake TLEs is dangerous!! You (or others) may end up confusing them with 
officially produced TLEs at some later time. It could "poison the deck." The deck 
could be yours, or somebody else's.

@jklenzing
Copy link
Member Author

Dang, the quotes in the above discussion section are great.

In short, you are asking "How to solve this problem the wrong way?"

@jklenzing
Copy link
Member Author

I think the long term solution is to pull the non-TLE propagator out of another code I have and use it here. Otherwise the mission planning only works for missions in existence.

@jklenzing
Copy link
Member Author

jklenzing commented Dec 27, 2019

As a side-note, discovered this post while trying to figure out why readtle wasn't working for custom built TLEs. Presumably it's because the checksum isn't consistent if I change the inclination. Only getting

ValueError: line does not conform to tle format

in response.

@rstoneback
Copy link
Collaborator

rstoneback commented Dec 27, 2019 via email

@jklenzing
Copy link
Member Author

I think working from existing TLEs is fine, but I'm thinking about creating orbits for missions that don't exist. Having the sgp4 propagate from existing TLEs is good, particularyl for ISS-deployed cubesats. I'm somewhat worried about legal implications for generating TLEs for imaginary spacecraft, particularly if the ID numbers are not sufficiently imaginary.

The other orbital simulator I've used is OrbitalPy: https://pypi.org/project/OrbitalPy/
We had used this for my bubble statistics project. I'll look into a modified version to see if it does what we need, but scanning over the code I think we can just drop it into the pyephem bits. It essentially works from the line 2 components, but as variables (inclination, eccentricity, mean anomaly, etc). This might be a cleaner way of getting what we need for this issue.

Long-term possibility:
An sgp4 instrument takes existing TLEs for operating missions and propagates through.
An oribtalpy instrument does a rough cut for idealized Keplerian elements.

@jklenzing
Copy link
Member Author

OK, I think I've found the way forward. It's probably fine to move forward with TLEs as the base, but swapping out the identifiers for zero-filled lines (ie, the zeroth satellite launched in the year zero). I've got a script that can generate fake TLEs, including checksum values.

Looking over the orbitalpy api again, it is likely more limited in terms of what it can generate. Maybe an option to add down the line.

@jklenzing
Copy link
Member Author

Update: sgp4 has added new methods since this issue was opened for direct access to the parameters we want. See https://pypi.org/project/sgp4/

sgp4.api.Satrec.sgp4init allows for the direct specification of a satellite via Keplerian orbit parameters.
sgp4.exporter.export_tle will export tle elements.

@jklenzing jklenzing mentioned this issue Jun 28, 2021
10 tasks
@jklenzing jklenzing linked a pull request Jun 28, 2021 that will close this issue
10 tasks
@jklenzing
Copy link
Member Author

Closing with merge of #60. sgp4 allows direct input of Keplerian elements (see #61), making this unnecessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants