Commit Graph

3 Commits

Author SHA1 Message Date
Don Cross
e827c257b4 C: Reverse chrono search for rise/set, hour angles.
The following C functions now support searching
in forward or reverse chronological order:

    Astronomy_SearchRiseSet
    Astronomy_SearchAltitude
    Astronomy_SearchHourAngleEx

The function Astronomy_SearchHourAngleEx replaces
Astronomy_SearchHourAngle, adding a new `direction` parameter.
A #define for Astronomy_SearchHourAngle preserves backward
compatibility for older code.

Implementation notes:

Astronomy_SearchRiseSet and Astronomy_SearchAltitude used
to call a private function InternalSearchAltitude.
That function has been split into two functions:
BackwardSearchAltitude and ForwardSearchAltitude,
for searching both directions in time.

Fixed a bug where it was possible to report a successful
altitude event that went outside the time limit specified
by `limitDays`.
2022-09-28 17:31:35 -04:00
Don Cross
d8e268e116 linux_riseset.c demo: Moon, Sun culmination.
Calculate the next Moon and Sun cumlination,
and include the altitude of the body above
the horizon at that moment.
2020-09-13 19:23:09 -04:00
Don Cross
b779a6aeca Added linux_riseset.c, a variation of riseset.c.
This new demo shows how to calculate rise and set times
of the Sun and Moon in local time, using Linux functions.
It also sorts the events in chronological order.
2020-09-08 21:40:05 -04:00