Commit Graph

987 Commits

Author SHA1 Message Date
Don Cross
a9f29f1c52 Added documentation for C function Astronomy_SearchRiseSet.
Added more parameter checking for C and JS versions of that function.
2019-06-08 21:11:39 -04:00
Don Cross
435c1e1533 Added documentation for C function Astronomy_SearchHourAngle.
Also added extra parameter checking in C and JS versions of this function.
2019-06-08 19:57:31 -04:00
Don Cross
f02c523f1b Added documentation for Astronomy_SearchRelativeLongitude.
Also consistently use startTime as the parameter name for the
astro_time_t at which a search is to be started.
2019-06-08 17:35:29 -04:00
Don Cross
1fd7305b92 Documented C functions SearchMoonPhase, SearchMoonQuarter, NextMoonQuarter.
Added parameter checking in NextMoonQuarter.
Fixed typo.
2019-06-06 21:41:02 -04:00
Don Cross
642b1c1748 Documented C function Astronomy_SearchSunLongitude. 2019-06-06 21:04:56 -04:00
Don Cross
fcb04cd40f Fixed #15 - Using Google Closure Compiler to minify astronomy.js. 2019-06-05 20:52:05 -04:00
Don Cross
e0a119426a Correct for aberration when calculating angles seen from Earth.
Resolved FIXFIXFIX comments regarding whether or not to
correct for aberration. In all cases, the observations are
made from the Earth, in which case it makes the most sense
to correct for aberration.
2019-06-05 19:56:41 -04:00
Don Cross
3f60d2fac1 Added documentation for Astronomy_LongitudeFromSun and Astronomy_MoonPhase. 2019-06-05 19:23:25 -04:00
Don Cross
5a1cb85318 Fixed #44 - Renamed relative_longitude to ecliptic_separation.
I was using "relative longitude" to mean two different things.
Resolved the ambiguity by using relative longitude only for
differences in eclitpic longitude as seen from the Sun.

Use "ecliptic separation" for differences in ecliptic longitude
as measured from the Earth.

Fixed completely wrong documentation in the JavaScript code;
it had the meanings backwards inside the ElongationEvent class.
2019-06-05 17:32:23 -04:00
Don Cross
bb6edf67ed Added documentation for Astronomy_SearchMaxElongation.
Also renamed startDate parameters to startTime.
2019-06-05 12:44:36 -04:00
Don Cross
c1779c01ae Fixed bug in trimspace.js -- was not working on Linux. 2019-06-04 17:08:23 -04:00
Don Cross
7eb88d30b3 Added documentation for Astronomy_Elongation. Added support for bullet lists. 2019-06-04 11:38:53 -04:00
Don Cross
35dcf2c403 Documented C function Astronomy_AngleFromSun. 2019-06-03 21:47:29 -04:00
Don Cross
79c3c5a956 Discovered that trailing whitespace causes problems in doxygen on Windows.
I'm not sure exactly whether it is Windows versus Linux,
or just different versions of doxygen, but on my Windows laptop
I was getting messed up doxygen output. It turns out that everything
is back on track once I cleaned up all the trailing whitespace in
template/astronomy.c.  I will need to automate this in the future.
2019-06-03 14:45:40 -04:00
Don Cross
318ea259dc Fixed a typo in the documentation for Astronomy_Seasons. 2019-06-03 14:19:16 -04:00
Don Cross
60e2644f8f Added documentation for C function Astronomy_Seasons.
Also modified hydrogen.js to enclose function parameter names
inside a code block.
2019-06-03 14:13:24 -04:00
Don Cross
bf4ec1b057 Added documentation for C function Astronomy_Search. 2019-06-02 21:07:42 -04:00
Don Cross
a80d4899f3 Added documentation for C function Astronomy_EclipticLongitude. 2019-06-02 16:11:17 -04:00
Don Cross
abda37086d Added documentation for C function Astronomy_Ecliptic. 2019-06-02 16:01:48 -04:00
Don Cross
c03d12952e Eliminate potential thread-safety problem in Astronomy_Ecliptic.
Hardcode the mean obliquity of the ecliptic at J2000 instead of lazy-evaluating it.
This change eliminates a potential thread-safety issue.
2019-06-02 15:44:32 -04:00
Don Cross
1744b7c72e Added documentation for C function Astronomy_SunPosition. 2019-06-02 15:33:12 -04:00
Don Cross
5a9550b8db Added documentation for C function Astronomy_Horizon. 2019-06-02 14:34:53 -04:00
Don Cross
4bb1c73c10 C: replace magic numbers with enumerated types. Added documentation.
The following functions had parameters that accepted cryptic numeric values:

    Astronomy_GeoVector
    Astronomy_Equator
    Astronomy_SearchRiseSet

Replaced such parameters with enumerations. Added the following enumerated types:

    astro_aberration_t
    astro_direction_t
    astro_equator_date_t

Added more C documentation.
2019-06-02 13:34:30 -04:00
Don Cross
2e638da314 More work on C documentation. Tweaks to JS documentation. 2019-06-02 11:45:45 -04:00
Don Cross
1054042330 Added more documentation of C functions. 2019-06-01 22:10:28 -04:00
Don Cross
5cda9bd68e Added lots more C documentation in doxygen-formatted comments. 2019-05-28 15:56:06 -04:00
Don Cross
5f9ebb2c8b Removed iteration counts from search results. Renamed SearchError function.
I don't want to mix performance information with results.
If I need performance information later, I can do it through
a side channel.  Renamed SearchErr to SearchError, to be consistent
with the other functions that generate error structs.
2019-05-28 08:08:30 -04:00
Don Cross
83b1504552 Fixed C build error in doxygen refactoring. 2019-05-26 15:56:28 -04:00
Don Cross
5a19727dfe Hiding C code internals from Doxygen.
Certain macros and typedefs were ending up in Doxygen output
that have no reason to be documented for outside users.
Mostly I used Doxygen conditionals to hide them.
In a couple of cases I had some internal functions that needed
to be declared static so Doxygen hides them.

Added DoxygenLayout.xml, but not using it yet.
Still trying to figure out how to make Markdown output
that doesn't look terrible. Not sure I can get Moxygen
to do what I want. I may have to create my own simple(?) tool.
2019-05-26 15:49:37 -04:00
Don Cross
7591cd26ef Starting to add more C documentation. Still working on doxygen/moxygen. 2019-05-26 12:05:55 -04:00
Don Cross
c5ee9b6830 Starting to get doxygen to work. 2019-05-26 10:09:09 -04:00
Don Cross
9ed995e462 Added C function Astronomy_CurrentTime(). Added C moon phase demo. 2019-05-25 21:18:24 -04:00
Don Cross
96b3b8a9f0 Added C functions UtcFromTime, TimeFromUtc.
These functions allow generating a Gregorian calendar date and time
in UTC from an astro_time_t, and vice versa.
This filled in a gap where we needed a way to transform an astronomy
time value into something a user would recognize.

I may have to revisit this later for compatibility with the <time.h>
standard library, etc.
2019-05-25 15:31:45 -04:00
Don Cross
821e89e10b Validated C functions SearchLunarApsis, NextLunarApsis. 2019-05-24 19:29:31 -04:00
Don Cross
ba7814df4d Added protection from infinite loops in JS, C versions of SearchLunarApsis.
I made sure it is not possible to get stuck in an infinite
loop inside SearchLunarApsis, both the C and JavaScript versions.
If we loop over more time than 2 synodic months (more than enough time),
bail out with an exception (JS) or an internal error (C).
2019-05-24 17:21:04 -04:00
Don Cross
74dd133391 Implemented C function SearchLunarApsis, but not yet tested. 2019-05-24 16:58:03 -04:00
Don Cross
8cca72c959 Validated C function SearchPeakMagnitude. 2019-05-24 15:41:51 -04:00
Don Cross
6d6e161b53 Implemented C test for Saturn magnitude. Fixed bug in Astronomy_Ecliptic.
Astronomy_Ecliptic was using midnight on 2000-01-01 as the epoch,
but it should have been using noon. Fixed it. Discovered because
there was a tiny but larger than expected error in calculating
the tilt of Saturn's rings.
2019-05-23 21:47:15 -04:00
Don Cross
3c5c47d704 Implemented C function SearchMaxMagnitude, but not yet tested. 2019-05-23 19:44:32 -04:00
Don Cross
ab74212146 Validated C function Illumination. 2019-05-23 18:15:00 -04:00
Don Cross
9ed27be0f8 Work in progress: Adding C magnitude tests. 2019-05-23 12:05:18 -04:00
Don Cross
84d428d583 Implemented C function Illumination, but not tested yet. 2019-05-23 11:42:19 -04:00
Don Cross
4982da4307 Added unit tests for C functions SearchRiseSet, SearchHourAngle. 2019-05-22 13:44:46 -04:00
Don Cross
83d909751e Implemented C function SearchRiseSet, but not yet implemented. 2019-05-21 21:09:59 -04:00
Don Cross
9dfc3dee69 Implemented C function SearchHourAngle, but not yet tested. 2019-05-21 20:17:59 -04:00
Don Cross
dbd8c60e15 Added more unit tests for C function SearchRelativeLongitude. 2019-05-21 17:16:44 -04:00
Don Cross
86dad96ef0 Validated C functions: EclipticLongitude, SearchMaxElongation, SearchRelativeLongitude, Elongation, AngleFromSun.
Also realized I was only verifying JS max elongation angles to be within 1 degree.
Tightened that to 4 arcmin.
2019-05-21 16:22:51 -04:00
Don Cross
daf2dddcce Validated C function SearchRelativeLongitude. 2019-05-21 15:20:18 -04:00
Don Cross
3557d3b8af Implemented C functions EclipticLongitude, SearchMaxElongation, SearchRelativeLongitude.
Work in progress. Not yet tested.
2019-05-21 14:21:44 -04:00
Don Cross
76527b5453 Implemented C function Elongation, but not yet tested. 2019-05-21 12:37:20 -04:00