Commit Graph

98 Commits

Author SHA1 Message Date
Don Cross
53050bf939 TOP2013: Generating Pluto data tables in astronomy.c.
Nothing uses the tables yet. Still need to add the calculation code.
2020-07-04 23:02:14 -04:00
Don Cross
eec6e0b782 Removed obsolete Delta T code generator logic.
We don't need to generate Delta T tables any more because
none of the Astronomy Engine supported languages use it any more.
Now they all use Espenak/Meeus polynomials instead.
2020-05-15 19:40:35 -04:00
Don Cross
3a520386e9 Fixed #68 - No trailing whitespace in generated source code. 2020-05-15 14:31:05 -04:00
Don Cross
258b0572a0 Plot a graph of Delta T extrapolator versus generated function. 2020-05-15 13:05:00 -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
28ac608169 Added Fred Espenak formulas for extrapolating Delta-T, but commented out. 2020-05-14 17:20:34 -04:00
Don Cross
61e694a0b2 Fixed build warnings-as-errors in Windows. 2020-05-04 16:01:29 -04:00
Don Cross
4d81c4324f Shrank minified JS code to 76338 bytes.
Represent DeltaT table entries as lists rather than objects.
This makes them more compact in the minified code.
2020-05-04 12:59:17 -04:00
Don Cross
e7e9d1bb78 Shrank minified JavaScript to 76978 bytes.
Represent constellation name/symbol pairs as lists rather than objects.
This makes the representation more compact.
2020-05-04 12:49:00 -04:00
Don Cross
762bf08f66 Shrank minified JS code more: from 80904 to 77329 bytes.
Store each constellation border as a list rather than an object.
This makes the encoding more compact.
2020-05-04 12:39:32 -04:00
Don Cross
9a6005bf24 Shrank minified JavaScript from 86423 bytes to 80904 bytes.
Changed the units of the angles stored in the constellation
borders data so that the numbers can be represented more compactly.
This requires converting the numbers back at runtime, but this is
well worth the smaller size.
2020-05-04 12:27:37 -04:00
Don Cross
2cb06afa63 Added JavaScript code generator for constellation data tables. 2020-05-03 22:06:18 -04:00
Don Cross
540d9d7cef Added constellation function to Python code. 2020-05-03 21:37:28 -04:00
Don Cross
4f8977067b Snapped constellation border to nearest quarter arcminute.
Instead of using decimal hours/degrees rounded to 4 decimal places,
I went back to the original constel.c and modified it to represent
both RA and DEC in degrees, and to round all values to the nearest
quarter arcminute. This seems closer to the original intent of the
constellation boundaries.
2020-05-02 21:21:32 -04:00
Don Cross
8367638d28 Updated codegen to generate C# constellation tables.
This is just a step toward supporting constellation
calculations in C#. Nothing uses the new tables yet.
2020-05-02 19:24:01 -04:00
Don Cross
1e1af922fe Constellations: Added C unit test. Fixed bugs in C code.
This unit test only exercises 8 different points.
I want to add a more thorough unit test soon, before
moving on to implementing the constellation finder in
the other supported programming languages.
2020-05-02 13:33:25 -04:00
Don Cross
d0f328fe78 Starting work on C version of constellation lookup.
Generate C code for constellation tables.
First pass of Astronomy_FindConstellation(). Not yet tested.
2020-05-02 11:45:32 -04:00
Don Cross
3bb740fd1c Fixed #62 - Automatically update copyright year range. 2020-04-30 15:12:14 -04:00
Don Cross
904037a126 C#: Implemented geocentric moon calculation. Passes unit tests. 2019-10-28 15:37:46 -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
0bbbd06177 C#: Implemented Chebyshev calculations for Pluto. 2019-10-25 16:00:52 -04:00
Don Cross
b49973bec3 C# code generator adds whitespace for proper code indenting. 2019-10-25 15:09:45 -04:00
Don Cross
4173c88e63 C#: implemented VSOP code generator and CalcVsop function. Not yet tested. 2019-10-25 14:06:19 -04:00
Don Cross
2285e4032b Starting to compile generated C# code and reference it from unit test. 2019-10-10 15:19:47 -04:00
Don Cross
7bff374d57 Starting to add support for generating C# code.
Decided to move call to makedoc script from run script.
It was confusing that it was hidden inside unit_test_js,
especially because it invokes the code generator for
all supported languages.
2019-10-10 14:56:49 -04:00
Don Cross
284894c7e1 Updated Windows build process.
Fixed C compiler warnings that show up on Windows but not Linux.
Trim trailing whitespace for target code.
Generate Python documentation.
2019-07-09 16:35:15 -04:00
Don Cross
bae9d45e6f Generate JS iau2000b data from file. 2019-07-06 21:00:57 -04:00
Don Cross
78d43589ff Generate C iau2000b data from file. 2019-07-06 20:49:11 -04:00
Don Cross
463103ef70 JS: Generate AddSol calculations from data file. 2019-07-06 18:15:21 -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
20f87859d8 Moved AddSol data into a data file, so data can be shared across languages. 2019-07-06 17:50:45 -04:00
Don Cross
d750c61337 Python: Moved iau2000b and CalcMoon AddSol data into codegen phase.
Now the code generator knows how to optimize and inject these
two calculations into the Python code.
2019-07-06 17:29:34 -04:00
Don Cross
07ba91ed65 Use same code generator for JavaScript and Python: Chebyshev Pluto model. 2019-06-26 05:25:09 -04:00
Don Cross
027a6af007 Adapted JS vsop code generator to work with Python code too.
Now the Python code and the JavaScript code for VSOP models
are generated by codegen.c using the same $ASTRO_LIST_VSOP macro.
Python functions for calculating from VSOP are not yet implemented.
2019-06-25 21:28:20 -04:00
Don Cross
00dad8be32 Starting to add Python support in source translator. 2019-06-22 21:12:14 -04:00
Don Cross
7d4047429a Fixed #38 - Run C unit tests on Windows. 2019-05-19 21:29:31 -04:00
Don Cross
f41344afd5 Pluto work in progress: implemented Chebyshev code generator.
Not ready to push -- Chebyshev calculation not done yet for Pluto.
2019-05-18 19:57:57 -04:00
Don Cross
475cc122a9 Mostly finished with C version of VSOP calculations.
Still needs unit test.
2019-05-17 15:55:52 -04:00
Don Cross
36141c3d1e Minor changes: use LogError in code generator. 2019-05-16 21:40:05 -04:00
Don Cross
c7074f528e Reworking code generator to handle multiple target languages.
Generating Delta T table in both JavaScript and C.
Work in progress.
2019-05-16 15:24:14 -04:00
Don Cross
929397c8fa Extend the coverage of Delta-T data as far into the future as possible.
Was missing any data from delta_t/predicted.txt that occurred after
the final integer year value. Now include the very last line of data
even when it is not on a year boundary.
2019-05-06 12:19:16 -04:00
Don Cross
ad3bec5f4b Fixed #14 - Linux and Windows JS now match.
The floating point constants emitted for the Pluto Chebyshev
model did not quite match between Linux and Windows.
I suspect the real problem is not the operating system
but that I'm using different versions of Node on both:
Windows: v10.15.3
Linux: v8.15.1

Now I print only 12 place after the decimal instead of 18.
This makes no difference in the unit test output,
and reduces the JS code size significantly.
2019-04-15 13:32:12 -04:00
Don Cross
e87ccfc044 Eliminating JD: CalcChebyshev 2019-04-15 10:28:28 -04:00
Don Cross
c5ed0a3c3d Reduced delta_t data by 19339 bytes. 2019-04-14 17:24:48 -04:00
Don Cross
36643fc47a Fixed #2 - use finer-grained delta-t values without discontinuities.
Using historic, recent, and predicted values of TT-UT instead of
UTC leap seconds.  With linear interpolation, there are no longer
discrete jumps in the calculated TT values. Hopefully, this will
make event solvers (rise, set, etc) more well-behaved.
2019-04-14 16:42:50 -04:00
Don Cross
8dbe1d1f28 Renamed VSOP data types to lower case and to end with '_t'. 2019-04-09 13:42:32 -04:00
Don Cross
e90a3006b6 Updated license comments in source code. 2019-04-09 12:43:08 -04:00
Don Cross
2decdbc685 Generating JavaScript code. 2019-04-09 12:23:35 -04:00