mirror of https://github.com/XEphem/XEphem.git
Make refraction more robust if altitude is `nan`
From https://www.clearskyinstitute.com/xephem/contrib/contrib.html where the patch is dated 2020 September.
This commit is contained in:
parent
16c59109d9
commit
099dc04e6c
|
|
@ -62,6 +62,11 @@ refract (double pr, double tr, double ta, double *aa)
|
|||
|
||||
double d, t, t0, a;
|
||||
|
||||
if (isnan (ta)) {
|
||||
*aa = ta;
|
||||
return;
|
||||
}
|
||||
|
||||
/* first guess of error is to go backwards.
|
||||
* make use that we know delta-apparent is always < delta-true.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue