Commit Graph

1670 Commits

Author SHA1 Message Date
Don Cross
4566547cb7 Keep generated planet models in Git repo.
Force regeneration of planet models in Travis CI,
just to ensure that everything is still working.
This also will detect if the planet models change
unexpectedly on my development machines.
2019-06-04 17:52:47 -04:00
Don Cross
bf3c7a45c4 Fixed bug in checking for planet model files. 2019-06-04 17:50:36 -04:00
Don Cross
c343998098 Automatically detect whether planet models need to be generated.
Skip the time-consuming generation of planet models unless one
or more of the required files is missing.
This will cause the planet models to always be exercised by
Travis CI, but most of the time in my own development, they will
be skipped.  This is a good compromise now that the code is very stable.
2019-06-04 17:30:18 -04:00
Don Cross
f057996cda Implemented "fast" option for skipping regeneration of planet models. 2019-06-04 17:19:56 -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
83ec1a6b1a Fixed #43 - Trim trailing whitespace from source code before processing it.
This resolves an issue that sometimes messed up generating
markdown from C source code via doxygen and custom script hydrogen.js.
2019-06-03 15:08:10 -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
4e3abd0d9c Fixed #40 - Generate markdown from doxygen for C source code.
Got makedoc.bat to generate compatible documentation with
Linux makedoc script. Started to document all the stuff
developers have to install to work on this project.
2019-05-28 21:00:29 -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
2a0bd80469 Got timeout in Travis CI retrying download. Decrease timeout to 9 seconds. 2019-05-27 20:03:32 -04:00
Don Cross
57fea25f3a hydrogen: Added prefix template. Added internal links to items. 2019-05-27 19:41:53 -04:00
Don Cross
b23a0316a8 To find structs, need to process other xml files. Merge all xml.
It turns out it simplifies things to merge all the doxygen xml
files into a single all.xml file, then process that. That way
I can find all the struct definitions too.
2019-05-27 19:01:25 -04:00
Don Cross
f8001db8d0 More work on custom translation of doxygen xml to markdown. 2019-05-27 09:25:58 -04:00
Don Cross
63474a29d0 Work in progress: hydrogen 2019-05-26 21:22:23 -04:00
Don Cross
1ddff8f0d6 Work in progress: hydrogen = doxygen to markdown converter. 2019-05-26 21:16:25 -04:00
Don Cross
118a224921 Removing moxygen. I'm going to create my own custom doxygen-to-markdown. 2019-05-26 20:32:57 -04:00
Don Cross
d44eb1eed6 Removed apparently unnecessary moxygen option -l.
It looks like the '-l c' option does nothing when there is
an explicit template directory.
2019-05-26 17:52:53 -04:00
Don Cross
cbdef29197 Starting to experiment with moxygen custom templates.
I don't know if this is going to do what I want, but I'm
hoping I can customize the Markdown output generated by moxygen
to be useful for a simple C library like this. It appears to be
customized for a class-oriented C++ program.
2019-05-26 17:43:23 -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
720f5b367f Ignore flag file to enable generating C documentation. 2019-05-26 12:22:33 -04:00
Don Cross
e8708fd634 Giving up on Travis CI generating C documentation.
The version of doxygen supported in Travis CI appears to be
too old to work with moxygen.  This is just not worth the hassle.
I will generate documentation locally, and I will document to
any prospective contributors how to do so also.
2019-05-26 12:19:12 -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
f4c3a867da Starting to generate C documentation in Markdown format. 2019-05-26 11:36:38 -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
1c67f64655 Added C lunar apsis test to Windows unit tests. 2019-05-24 19:38:11 -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
8438086c3d Fixed Linux build warning in ctest.c about possibly uninitialized variables. 2019-05-24 12:37:12 -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