question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Test with JWST TLE data

See original GitHub issue

@brandon-rhodes,

we already had the situation with an downcoding starling satellite which resulted in runtime warnings in skyfield. Right now I tried to test the JWST telescope TLE data with skyfield and got the same issue. Where am I wrong in doing so?

If I try heavens above (, the display the path based??? on the give TLE parameters.

Attached a short script for testing:

from skyfield.api import load, wgs84, EarthSatellite


def findSatUp(sat, loc, tStart, tEnd, alt):
    t, events = sat.find_events(loc, tStart, tEnd, altitude_degrees=alt)
    return t, events


def main():
    ts = load.timescale()
    tStart = ts.now()
    tEnd = ts.tt_jd(tStart.tt + 12 / 86400)
    loc = wgs84.latlon(latitude_degrees=49, longitude_degrees=-11)
    tle = ["JWST",
           "1 50463U 21130A   21362.00000000  .00000000  00000-0  00000-0 0  9999",
           "2 50463   4.6198  89.0659 9884983 192.3200  17.4027  0.01958082    27"]
    sat = EarthSatellite(tle[1], tle[2],  name=tle[0])
    t, events = findSatUp(sat, loc, tStart, tEnd, 10)
    print(t, events)


if __name__ == "__main__":
    main()

Many thanks in advance for looking at it.

Michel

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
brandon-rhodescommented, Feb 17, 2022

Please feel free to continue discussion here around interesting topics like L2 orbits, I am enjoying following all the links! But I am going to go ahead and mark this issue as closed, as I think the circumstances of the original question are clear: the SGP4 module returns NaN values when an error is raised, and older versions of NumPy print various warnings to the screen when Skyfield’s position logic tries doing math with these NaN values.

I wish NumPy would just be quiet, and let NaN inputs produce NaN outputs as Nature intended. Indeed, the most recent NumPy versions seem far quieter, so the next time this is asked I might simply ask folks to try updating NumPy to the latest version.

Also, I’ll be quicker next time to point users to a check of the error messages being produced by the position.

It feels like the NumPy warning/error settings isn’t something Skyfield should be reaching in and adjusting on the user’s behalf, but I’m certainly open to updating the documentation, if someone has figured out how a script can ask NumPy to quiet down before they attempt a computation that might involves some dates on which positions come out as NaN.

Again, feel free to comment further even as this is marked Closed, especially if you think there’s action here for Skyfield to take, that I’ve missed. Thanks!

2reactions
davidmikolascommented, Feb 15, 2022

@cruisen you’ve got it right, TLEs are not for things that aren’t bound to Earth and orbit it. However sometimes Project Pluto generates TLEs for extreme/unusual situations as simply a way to get an idea roughly where something is, and the n2yo site gathers TLEs from several places besides official sources.

See answers to https://space.stackexchange.com/questions/24314/has-a-tle-ever-been-issued-for-a-spacecraft-trajectory-not-bound-to-earth-orbit

Also https://space.stackexchange.com/questions/57771/does-the-james-webb-telescope-have-a-two-line-element-set

It turns out that space-track.org has two official TLEs for 2021-130A issued at epochs 21359.67 and 21362.00 so as far as I can tell, these appears to be good candidates for TLEs of objects not strictly bound to Earth. During this period JWST was traveling along a trajectory close to the 3-body stable manifold associated with Sun-Earth L2. This is not a situation where a TLE would be reliable, but it seems the TLEs were issues as “helpful hints” to give folks at least some handle on where it was during this time period, since Horizons doesn’t update their ephemeris in real time.

The folks at JPL do act fairly quickly, and once sufficiently reliable tracking data is available through the Deep Space Network they will do some numerical orbit propagation that is fitted to DSN tracking data points, then update their ephemeris accordingly. It will take a while but you can see how the comments and answers to https://space.stackexchange.com/questions/57822/is-jwst-halo-orbit-prograde-or-retrograde-and-why evolved over time as JPL expanded their coverage of their JWST ephemeris.

This is a really, really, really interesting situation! I will update here if I find out more about the issuing of those two TLEs for a spacecraft not bound to Earth.

update: https://space.stackexchange.com/questions/58319/did-18-spcs-issue-two-tles-for-jwst-when-it-was-not-bound-to-earth-nor-orbiting

Read more comments on GitHub >

github_iconTop Results From Across the Web

Active Satellite TLE Data and Information
orbit.ing-now.com presents useful information from TLE data on active Earth orbiting satellites.
Read more >
Where Is Webb? NASA/Webb - James Webb Space Telescope
The James Webb Space Telescope is the world's premier space science observatory. Webb will solve mysteries in our solar system, look beyond to...
Read more >
Moving Target Ephemerides - JWST User Documentation
Details of how JWST and APT obtain and use moving target ephemerides, how a proposer can obtain ephemerides ... Check that Observer Location...
Read more >
NORAD GP Element Sets Current Data - CelesTrak
A set of graphs and tables that show everything from the age distribution of the latest GP data, recently decayed objects, lost objects,...
Read more >
How JWST will test models of cold dark matter
And both Nierenberg and Walker are using gravitational lensing and wide binary-star methods on data from the Hubble Space Telescope while they ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found