Commit Graph

166 Commits

Author SHA1 Message Date
Don Cross
304d10fc97 Pluto integrator: ported to C#.
Ported Pluto integrator to C#.

Along the way, I noticed that I had VSOP87 latitude and longitude
swapped in such a way that they worked, but were labeled wrong.
This confused me quite a bit as I tried to implement functions
to calculate the derivatives of the VSOP87 spherical coordinates.
Fixed this in the code generator and the C and C# template files.
2020-08-23 20:49:10 -04:00
Don Cross
fa13f980b2 JS: Stricter type checking for function parameters. Other fixes.
In the JavaScript version, check throughout for valid
finite numeric/boolean values as needed.
This should make debugging a lot easier for everybody.

In the unit tests for all languages, also check for infinite
results, not just NaN.

I discovered that JS Astronomy.NextLocalSolarEclipse() was broken:
It was trying to call a nonexistent function.
Fixed it, and added unit test that would have caught the breakage.

Fixed mistakes in JS documentation for the field names of the
Observer class.
2020-07-23 20:12:36 -04:00
Don Cross
69a0548eb7 Upgrading from dotnet core 2.2 to 3.1.
Dotnet core 2.2 is no longer officially supported by Microsoft.
The current LTS is 3.1, so I'm upgrading to it.
2020-07-22 00:30:35 +00:00
Don Cross
9c940d7432 Fixed #69 - Support calculating Pluto without any year range limit.
Fixed lingering documentation and code that refers to a limited
year range for calculating Pluto's position.
2020-07-08 19:20:47 -04:00
Don Cross
e9b72ac12a Eliminated obsolete time limit checking for Pluto in C# unit test.
Now that I have switched to TOP2013 for calculating Pluto's
position in the C# code, there is no need for the unit test
to handle errors for out-of-bound time coordinate.
2020-07-08 11:40:22 -04:00
Don Cross
765902c542 TOP2013: Ported new Pluto model to C# code.
Also corrected code generator to output term coefficients
in scientific notation. In the C code, it was dropping signficant
digits by outputting in fixed point notation.
2020-07-08 11:10:02 -04:00
Don Cross
b3573c12d7 Implemented JS Transit.
Implemented JavaScript versions of the transit functions.
2020-06-14 13:38:30 -04:00
Don Cross
7fcf730839 Implemented C# Transit functions and unit test. 2020-06-13 21:10:48 -04:00
Don Cross
944dba94b7 Reworked C# unit tests to be table-driven.
All the other languages have a lookup table that allows
any specific test to be run by name, or all tests to be run
using "all" as the name.  Now the C# unit test does the same.
2020-06-13 17:22:03 -04:00
Don Cross
40db8ec49b Added numeric checking in C# unit tests. 2020-06-06 21:15:11 -04:00
Don Cross
d8591c3cd7 Implemented JS LocalSolarEclipse. 2020-06-05 21:40:13 -04:00
Don Cross
1e6afbe886 Fixed some oopsies in the C unit tests.
unit_test_c was not testing local solar eclipses.
C ParseDate() was not scanning seconds. This caused
discrepancies between C and C# results.
It was also failing to verify the Z on the end.
2020-05-27 14:49:00 -04:00
Don Cross
366a00467f C# LocalSolarEclipse: finished second unit test. Fixed mistakes in input data. 2020-05-27 08:20:13 -04:00
Don Cross
4e9b9d0a91 C# LocalSolarEclipse: ported first unit test. 2020-05-26 21:44:46 -04:00
Don Cross
75e26ccac2 Changed verbosity option from -d to more standard -v. 2020-05-26 11:58:02 -04:00
Don Cross
382b9ba58f Added -d option to ctest for verbose output. 2020-05-26 10:49:44 -04:00
Don Cross
86c5f4c66f C# unit test is much less verbose.
By default, print a lot less C# unit test output.
Added '-d' debug mode option to ./unit_test_csharp that
prints the more verbose output.
2020-05-26 09:44:45 -04:00
Don Cross
2f22520e0f C# GlobalSolarEclipse: passes unit test. 2020-05-26 09:13:28 -04:00
Don Cross
a8b29b4509 Renamed lunar eclipse info member from 'center' to 'peak'.
This makes the name consistent with the solar eclipse fields.
2020-05-25 21:07:36 -04:00
Don Cross
d6b9967bd1 Updated error thresholds to make Windows unit tests pass. 2020-05-17 14:59:28 -04:00
Don Cross
a753fb54b7 C# LunarEclipse: Applied optmizations from the C version of LunarEclipse. 2020-05-16 13:58:49 -04:00
Don Cross
a3ee6d3035 C# lunar eclipse code is now passing unit test. 2020-05-15 22:30:43 -04:00
Don Cross
f5b7c6c758 C#: Coded SearchLunarEclipse, NextLunarEclipse. Not yet tested. 2020-05-15 21:33:52 -04:00
Don Cross
7eb3322fd1 C#: Use Espenak/Meeus DeltaT function. 2020-05-15 17:20:51 -04:00
Don Cross
b7c59f6628 Include extrapolated DeltaT values for the years 2030..2200.
I had to increase certain error tolerances in the unit tests.
Reworked the unit tests to make more sense by waiting until
each language step is done to check against each other.
That way I can run a single language step independently.
2020-05-14 20:24:34 -04:00
Don Cross
b79b151934 Fixed incorrect string format in C# unit test. 2020-05-14 11:52:56 -04:00
Don Cross
a20c2d0391 Fixed #65 - unit test output indicates programming language. 2020-05-11 20:31:01 -04:00
Don Cross
d05f213584 Added constellation finder algorithm to C#. 2020-05-03 15:06:02 -04:00
Don Cross
f754a6de82 Fixed #58 - Solar System Barycenter, Earth/Moon Barycenter.
Can now calculate the heliocentric Solar System Barycenter (SSB)
and Earth/Moon Barycenter (EMB).

Changes made in C, C#, JavaScript and Python:
Added new body codes SSB, EMB.
Added support for calculating both in HelioVector functions.
Verified that all calculations match NOVAS.
Verified that all calculations match each other across languages.
2020-04-29 21:53:57 -04:00
Don Cross
2a1a25cd29 Fixed problems with building/testing on Windows. 2020-01-07 16:00:17 -05:00
Don Cross
977ab2d5b3 C# planet apsis: Implemented unit tests. 2020-01-06 16:04:57 -05:00
Don Cross
a5dbfd22c4 Adjusted JS unit test thresholds to pass for updated planet models.
Because I had to tweak models to get better planet apsis predictions,
it caused slight changes in other calculations that tripped
unit test errors. These are all still within safe values, so
I relaxed the ones that failed.
2020-01-06 12:06:30 -05:00
Don Cross
819e59745d Decreased Neptune apsis prediction errors from 49.25 days to 15.45 days.
Include an extra 4 terms in the radial component of the VSOP
model for Neptune. The code automatically picks the 4 terms
that maximize the time derivative's highest possible contribution.
2020-01-05 20:44:29 -05:00
Don Cross
113396d04c C#: Call RefractionAngle from Horizon. Added refraction unit test.
Removed redundant refraction calculations from Astronomy.Horizon().
Added a unit test that InverseRefractionAngle() converges and calculates
an accurate inverse of RefractionAngle().
2019-12-24 11:06:33 -05:00
Don Cross
44d75bb83c C# rotation: finished unit tests. 2019-12-22 14:12:15 -05:00
Don Cross
d3f0339498 C# rotation: Added more rotation functions. 2019-12-22 13:32:15 -05:00
Don Cross
8768a157cb C# rotation: Added more rotation functions.
More work on new functions for converting orientation systems.
Changed a few classes to structs for memory allocation efficiency.
Moved stuff around in astronomy.cs so the Astronomy class comes
last. This is helpful when I want to add new functions, so I
don't have to search for the end of the class.
2019-12-22 12:07:38 -05:00
Don Cross
660096e8b0 C# rotation: Added Rotation_EQJ_ECL, Rotation_ECL_EQJ. 2019-12-21 21:54:41 -05:00
Don Cross
30a0e51347 C# rotation: Implemented InverseRotation(). 2019-12-21 21:08:35 -05:00
Don Cross
633b7ae2ef C# rotation: Added CombineRotation. Started unit tests. 2019-12-21 20:52:15 -05:00
Don Cross
0aeb875ec5 C#: Implemented SearchPeakMagnitude. 2019-12-01 11:41:48 -05:00
Don Cross
fb251cf263 C#: Added unit test for Saturn illumination. 2019-12-01 10:50:26 -05:00
Don Cross
efd1629e9a C#: Implemented Illumination(). Not fully tested yet.
The unit test exercises Illumination() except for Saturn.
Will implement that next.
2019-12-01 10:27:40 -05:00
Don Cross
df12a2c8c8 C#: Added SearchLunarApsis, NextLunarApsis. 2019-11-27 22:13:52 -05:00
Don Cross
655b9bca46 C#: Implemented functions Elongation and SearchMaxElongation. 2019-11-06 18:50:06 -05:00
Don Cross
915f1007c3 C# - Added TestPlanetLongitudes tests. 2019-11-06 14:21:48 -05:00
Don Cross
af106481f6 C#: Implemented SearchRelativeLongitude. 2019-11-05 22:12:21 -05:00
Don Cross
162f3c5683 C#: Added SearchHourAngle and SearchRiseSet. 2019-11-03 15:33:30 -05:00
Don Cross
fd0bc0f48a Ported MoonTest from C to C#. 2019-10-31 20:28:20 -04:00
Don Cross
d9f447a7a4 C#: Added moon phase/quarter search functions. 2019-10-30 22:14:54 -04:00