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
Is there a way to get the TLE data of a satellite by ID, not by name? #167
Comments
Solved, loading the TLE directly from URL Closing this issue, however this functionality would be useful. |
I didn't know that names changed! I think this is a good idea, and I've re-opened this issue so that I remember to add that feature (or so that someone else can). |
FWIW, another user finds it essential to be able to do satellites[cat Id #] instead of satellites[name]. I know you have a gazillion things to do, but do know this is not just a "gee, it'd be nice if..." need for some of us. |
If someone needs this quickly, I believe they can build their own dictionary with something like:
Then they could say |
Oh, duh! Good idea. This, for example, works:
Then one can access either way:
|
Very nice! You might find it slightly more efficient to:
instead of building and then disposing of an entire new dictionary — but, honestly, you'll never notice the difference since it's plenty fast either way for the number of satellites involved. :) |
For completeness, and in case someone else might find it useful at some point:
|
thanks a lot for this code.
line 66, in getsat UnboundLocalError: local variable 'tle1' referenced before assignment ??? |
There is a code, describing the retrieval of satellite data from the TLE:
However, the names sometimes are changed, but ID is constant. Is there a way to get the data by ID, something like
satellites[40053]
?For now, my solution is just looping through the lines.
The text was updated successfully, but these errors were encountered: