When observing a distant object, for example Jupiter as seen from Earth,
the amount of time it takes for light to travel from the object to the
observer can significantly affect the object's apparent position.
This function is a generic solver that figures out how long in the
past light must have left the observed object to reach the observer
at the specified observation time. It requires passing in func
to express an arbitrary position vector as a function of time.
CorrectLightTravel repeatedly calls func, passing a series of time
estimates in the past. Then func must return a relative position vector between
the observer and the target. CorrectLightTravel keeps calling
func with more and more refined estimates of the time light must have
left the target to arrive at the observer.
For common use cases, it is simpler to use BackdatePosition
for calculating the light travel time correction of one body observing another body.
For geocentric calculations, GeoVector also backdates the returned
position vector for light travel time, only it returns the observation time in
the returned vector's t field rather than the backdated time.
The position vector at the solved backdated time.
The t field holds the time that light left the observed
body to arrive at the observer at the observation time.
Solve for light travel time of a vector function.
When observing a distant object, for example Jupiter as seen from Earth, the amount of time it takes for light to travel from the object to the observer can significantly affect the object's apparent position. This function is a generic solver that figures out how long in the past light must have left the observed object to reach the observer at the specified observation time. It requires passing in
functo express an arbitrary position vector as a function of time.CorrectLightTravelrepeatedly callsfunc, passing a series of time estimates in the past. Thenfuncmust return a relative position vector between the observer and the target.CorrectLightTravelkeeps callingfuncwith more and more refined estimates of the time light must have left the target to arrive at the observer.For common use cases, it is simpler to use BackdatePosition for calculating the light travel time correction of one body observing another body.
For geocentric calculations, GeoVector also backdates the returned position vector for light travel time, only it returns the observation time in the returned vector's
tfield rather than the backdated time.