Commit Graph

7 Commits

Author SHA1 Message Date
Don Cross
4b64ceeb0d Implemented C function Astronomy_SearchAltitude. 2021-09-23 11:57:44 -04:00
Don Cross
24571444d9 JS SearchAltitude implemented.
Refactored SearchRiseSet to create a new function
InternalSearchAltitude. SearchRiseSet calls InternalSearchAltitude,
and the new function SearchAltitude also cals InternalSearchAltitude.
This causes the code to be only a tiny big larger.
2021-09-22 19:45:33 -04:00
Don Cross
0038bbbc39 Started JS Twilight unit test.
This is the beginning of adding support for calculating
civil, nautical, and astronomical twilight (dawn/dusk).
Just added the stubbed unit test without the call in place
for the new function that will be added: SearchAltitude.
2021-09-22 17:24:21 -04:00
Don Cross
690a71ecf2 Replaced rise/set test data to have less extreme latitudes.
Latitudes within the arctic/antarctic circles cause too much
hassle because of horizon-grazing that makes it hard for
two different programs to agree on when (or even whether)
a rise or set took place.
2019-04-20 23:23:17 -04:00
Don Cross
8c2118ed67 Fixed #23 - Crazy behavior in refraction formula
The refraction formula went nuts near altitude angle -5.11 degrees.
We were taking the tangent of a value that zoomed toward infinity
near that value, causing essentially random numbers without any
upper bound to their size. Just like JPL Horizons, truncate any
angle more than 1 degree below the horizon, only I have a linear
taper down to 0 refraction as the altitude angle approaches -90.
I did not want any chance of creating an altitude less than -90.

Removed unit tests for the Sun at latitude -80 degrees.
It is too easy for my code to behave differently from another
calculator, because tiny changes in atmospheric modeling can
cause disagreement about whether there even is a sunset/sunrise.
This is because for observers so close to the pole, the Sun
sometimes barely dips below the horizon and then comes back
up for less than an hour.
2019-04-20 23:00:02 -04:00
Don Cross
23e43ec9af Converted raw html rise/set data files to a format easier to process. 2019-04-18 16:07:43 -04:00
Don Cross
0be5745030 Adding test data for Sun and Moon rise/set times. Not used yet. 2019-04-18 08:51:44 -04:00