Light Convergence Failure
See original GitHub issueHeyo @brandon-rhodes thanks for skyfield!
We do a lot of satellite math using your package, and I bumped into this gem while working with it. Here is a reproduction case:
def test_convergence_demo():
tle_0 = """STARLINK-1885"""
tle_1 = """1 47168U 20088AY 22221.92842503 .01483002 11676-2 34717-2 0 9991"""
tle_2 = """2 47168 53.0385 305.4734 0002390 239.0067 121.2198 15.96617970 96526"""
load
satellite = EarthSatellite(tle_1, tle_2, tle_0)
capp = wgs84.latlon(37.76115,-122.418056,12)
ts = load.timescale()
time = ts.tt_jd(2459831.9170483043)
_planets = load('de421.bsp')
# ssb = Solar System Barycentric
location_ssb = _planets["earth"] + capp
target_ssb = _planets["earth"] + satellite
# NOTE(meawoppl) - altaz accepts temp/humidity correction...
location_ssb.at(time).observe(target_ssb).apparent().altaz()
This code takes a road less traveled and reports the following:
observer = <Barycentric BCRS position and velocity at date t center=0 target=WGS84 latitude +37.7612 N longitude -122.4181 E elevation 12.0 m>
target = <VectorSum of 3 vectors:
'de421.bsp' segment 0 SOLAR SYSTEM BARYCENTER -> 3 EARTH BARYCENTER
'de421.bsp' segment 3 EARTH BARYCENTER -> 399 EARTH
EarthSatellite 399 EARTH -> STARLINK-1885 catalog #47168 epoch 2022-08-09 22:16:56 UTC>
def _correct_for_light_travel_time(observer, target):
"""Return a light-time corrected astrometric position and velocity.
Given an `observer` that is a `Barycentric` position somewhere in
the solar system, compute where in the sky they will see the body
`target`, by computing the light-time between them and figuring out
where `target` was back when the light was leaving it that is now
reaching the eyes or instruments of the `observer`.
"""
t = observer.t
ts = t.ts
whole = t.whole
tdb_fraction = t.tdb_fraction
cposition = observer.position.au
cvelocity = observer.velocity.au_per_d
tposition, tvelocity, gcrs_position, message = target._at(t)
distance = length_of(tposition - cposition)
light_time0 = 0.0
for i in range(10):
light_time = distance / C_AUDAY
delta = light_time - light_time0
if max(abs(delta)) < 1e-12:
break
# We assume a light travel time of at most a couple of days. A
# longer light travel time would best be split into a whole and
# fraction, for adding to the whole and fraction of TDB.
t2 = ts.tdb_jd(whole, tdb_fraction - light_time)
tposition, tvelocity, gcrs_position, message = target._at(t2)
distance = length_of(tposition - cposition)
light_time0 = light_time
else:
> raise ValueError('light-travel time failed to converge')
E ValueError: light-travel time failed to converge
This case was hard to find… I suspect we have called an equivalent of this subroutine maybe… a few million times without experiencing it…
Happy to dig in more if there isn’t something obvious that springs to mind.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
What is Convergence Insufficiency? Symptoms, Treatments ...
Convergence insufficiency (CI) is an eye disorder where your eyes don't move at the same time. If you have this condition, one or...
Read more >Convergence Insufficiency | Cedars-Sinai
Convergence insufficiency (CI) is when the eyes have trouble working together while focusing on an object at that is close by.
Read more >Can I reduce fixed factors when there is convergence failure in ...
In my glmer model, there are four variables treated as fixed effects: A (categorical, 2 levels), B (categorical, 3 level), C (categorical, 2 ......
Read more >Convergence failure, IV curve not comming, absorption file ...
SCAPS Training: Lecture Series. Convergence failure, IV curve not comming, absorption file, Recombination, Auger, SRH, SRV in SCAPS.
Read more >Convergence Excess: Causes, Symptoms, Treatment
Convergence insufficiency and convergence excess affect 15% of children. ... Syntonics is a form of light therapy used for vision problems.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So the problem appears to be that the program is trying to observe a satellite on 2022-09-09 which decayed in 2022-08-14 and was for that end-of-life starting an extreme (non-physical) elliptic orbit approximately 2 days earlier while actually crashing into the atmosphere: https://isstracker.pl/en/satelity/47168 . The extreme LTE parameter set to 0.0148 (on 2022-08-10) for the change in the n-parameter is in some way indicating that sort of problem.
Also, if you ever find yourself at or near that lat/long, I owe you at least a couple drinks 🍻