Commit Graph

520 Commits

Author SHA1 Message Date
Don Cross
c92ac89986 C#: Added Horizon function. Fixed a couple of things in the C code. 2019-10-28 10:25:40 -04:00
Don Cross
9955fbd3f9 Implemented most of Equator(), GeoVector() functions.
Still need to implement moon calculations and associated code.
Reworked AstroVector as a struct instead of a class, to reduce
memory allocation overhead.
2019-10-27 21:02:00 -04:00
Don Cross
4eed90fd42 Fixed broken links. 2019-08-16 17:54:55 -04:00
Don Cross
c64880a789 Python: added documentation for function SearchRiseSet. 2019-07-19 21:23:52 -04:00
Don Cross
91e4c7c8d2 Python: added documentation for function SearchHourAngle. 2019-07-19 21:11:54 -04:00
Don Cross
453e06e943 More documentation work.
In C code, replaced HTML italics with Markdown emphasis markers.
Added warnings for Python symbols with missing documentation.
Documented Python class Apsis.
2019-07-17 19:46:33 -04:00
Don Cross
0d94f03f64 Added lots more Python documentation.
Changed visibility from a string 'morning'/'evening' to enum type.
Was not testing visibility was correct; now test.py does that.
Corrected a couple of minor things in C documentation.
2019-07-13 16:46:24 -04:00
Don Cross
bbd79d7e33 Following "NumPy style" Python docstrings.
I will probably need to create my own tool for generating
Markdown from these comments. None of the tools I see online
do quite what I want.
2019-07-07 20:59:20 -04:00
Don Cross
aa0561a534 Trim trailing whitespace from all generated source. 2019-07-07 14:05:49 -04:00
Don Cross
6992d4fae9 Use NAN to indicate uninitialized fields in astro_time_t. 2019-07-07 14:01:13 -04:00
Don Cross
78d43589ff Generate C iau2000b data from file. 2019-07-06 20:49:11 -04:00
Don Cross
f390fc9201 Generate C CalcMoon AddSol statements from data file.
Use the same data file that I generate AddSol for Python
to also generate them in the C source code.
2019-07-06 18:08:07 -04:00
Don Cross
010ea33b32 Adding code to debug a slight calculation difference between Python and C. 2019-07-02 17:47:23 -04:00
Don Cross
d5bdb420b1 Simplified NextLunarApsis functions in C and Python. 2019-07-02 13:05:54 -04:00
Don Cross
86674e3c73 Python: implemented rise/set tests and fixed associated bugs. 2019-06-30 18:58:04 -04:00
Don Cross
a80e63b85f Python work in progress: SearchRiseSet 2019-06-29 19:43:25 -04:00
Don Cross
c864dab19d Python work in progress: SearchPeakMagnitude. 2019-06-29 16:05:59 -04:00
Don Cross
52d77e34ed Python: more work in progress, translating functions.
Also fixed incorrect comment in C code.
2019-06-29 14:31:37 -04:00
Don Cross
0c824bcf1b Major performance improvement for C library: re-use Earth tilt calculations.
Just like I did in the Python version, avoid repeated calculations
of the Earth's tilt angles for a given time. Do this by caching
the angles in the astro_time_t structure. This requires passing in
the time values by address instead of by value. I may go back and
change all the time parameters to pointers for consistency.
2019-06-27 21:47:30 -04:00
Don Cross
f2478fa29d Improved performance in C and JS code by getting rid of ter2cel() function.
I already did this in the Python code to significantly reduce the number
of calls to e_tilt(). Did the same thing here: call sidereal_time() once,
then use the value 3 times.
2019-06-27 14:35:46 -04:00
Don Cross
221ea1130a Implemented Python Search function. Slight tweaks to C and JS versions. 2019-06-26 17:36:29 -04:00
Don Cross
79df146194 More Python CalcMoon work in progress.
Also made minor optimizations to spin() function in both JS and C.
Fixed a mistake in JS and C that does not appear to have any
algorithmic consequences, but it was definitely confusing once I saw it.
2019-06-24 14:08:38 -04:00
Don Cross
00dad8be32 Starting to add Python support in source translator. 2019-06-22 21:12:14 -04:00
Don Cross
e9a6c036ab Added comments to a couple of static functions. 2019-06-15 20:38:49 -04:00
Don Cross
18251d16a4 Added another C example program: positions.c.
This example demonstrates how to calculate equatorial coordinates
and horizontal coordinates of solar system bodies.

Added explanatory comments to moonphase.c.

Added #defines for MIN_YEAR, MAX_YEAR in astronomy.h.

Removed unnecessary code from positions.html; no longer need
to calculate geocentric vector before calculating equatorial coordinates.
2019-06-11 20:31:22 -04:00
Don Cross
10f4490047 Make type names larger in their respective section headers. 2019-06-09 13:21:23 -04:00
Don Cross
0dc47d17a7 A couple of minor fixes to C documentation. 2019-06-09 13:15:47 -04:00
Don Cross
067a4e3059 Replace doxygen links in raw Markdown with Markdown links. 2019-06-09 13:05:06 -04:00
Don Cross
50d18825d7 Fixed link syntax in C topic index. 2019-06-09 12:59:53 -04:00
Don Cross
38499434f3 More work on the C documentation topic index.
Added more functions to the topic index.
Use consistent verb tense: "finds", "calculates", etc.
2019-06-09 12:51:27 -04:00
Don Cross
628eb80080 Added "Celestial Bodies" section to C documentation topic index. 2019-06-09 12:28:06 -04:00
Don Cross
663f8cdb49 Added date/time section to C documentation topic index. 2019-06-09 12:22:14 -04:00
Don Cross
92241cb1e7 Documented C functions Astronomy_SearchLunarApsis and Astronomy_NextLunarApsis. 2019-06-09 11:58:47 -04:00
Don Cross
dd2f6fb7b1 Added documentation for C function Astronomy_SearchPeakMagnitude. 2019-06-08 21:48:53 -04:00
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
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
23dfc35177 This should be last attempt to keep Pluto model identical between Linux and Windows. 2019-06-04 20:04:09 -04:00
Don Cross
436d598b76 One more attempt to avoid diff noise in Chebyshev models between Linux and Windows. 2019-06-04 18:29:29 -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