Don Cross
b82f4af407
Python work in progress: SearchMoonQuarter, NextMoonQuarter.
2019-06-29 16:25:39 -04:00
Don Cross
c864dab19d
Python work in progress: SearchPeakMagnitude.
2019-06-29 16:05:59 -04:00
Don Cross
2aa487aa6d
Python: work in progress - magnitude functions.
2019-06-29 15:28:41 -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
90e526b75f
Python: more work in progress, translating functions.
2019-06-29 14:12:57 -04:00
Don Cross
ba06afd817
Python work in progress: translating more functions.
2019-06-29 08:06:49 -04:00
Don Cross
9df032d1ce
Python: added to-do list comments of functions to be implemented.
2019-06-28 20:55:03 -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
dfb888efb9
Measure time required by JS and C astro_check.
2019-06-27 15:27:01 -04:00
Don Cross
8615a2548a
Huge performance boost to Python code: re-use e_tilt calculations.
...
Calculate _e_tilt() no more than once per Time instance.
Cache the value in the Time instance and re-use it.
This reduced astro_check time from 5.0 minutes to 2.0 minutes.
2019-06-27 14:54:49 -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
c611b50d3f
Significant performance boost to Python code: eliminate _ter2cel().
...
There were 3 calls to _ter2cel(), each of which redundantly
called _sidereal_time, which results in 3 calculations of _e_tilt().
Reworked so there is only one call to _e_tilt().
Minor changes to support using cProfile, which is how I found this.
2019-06-27 14:22:59 -04:00
Don Cross
f85025da31
Implemented astro_check in Python. Exercises major parts of the code.
...
There is still a slight discrepancy in calculations of altitude,azimuth
that is larger than between JS and C.
2019-06-26 21:12:27 -04:00
Don Cross
6d0ee59c1f
Python: starting to implement astro_check.
2019-06-26 19:12:59 -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
f3efb29846
Python: Implemented quadratic interpolation, to be used by Search.
2019-06-26 17:06:14 -04:00
Don Cross
5802739e66
Python: implemented function GeoVector.
2019-06-26 07:28:51 -04:00
Don Cross
d2346051e3
Python: Implemented HelioVector function.
2019-06-26 06:05:24 -04:00
Don Cross
03c1bf3c8b
Python: Implemented VSOP and Chebyshev calculations.
2019-06-26 05:51:55 -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
49e505e654
Verified GeoMoon C and Python versions are consistent for a single test case.
...
This is a good indicator that the Python translation of CalcMoon is correct.
2019-06-24 15:47:17 -04:00
Don Cross
787812287c
Python: calling GeoMoon() without errors, but calculations not yet validated.
2019-06-24 15:25:28 -04:00
Don Cross
44b9d26d1d
Python: CalcMoon work in progress. First pass is finished. Not yet tested.
2019-06-24 14:48:08 -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
e47602f46b
Python: translation in progress.
2019-06-23 21:28:45 -04:00
Don Cross
b5ebc4a645
Added python unit test.
2019-06-23 19:52:16 -04:00
Don Cross
7f0a369027
Python: reworked names and made Time more object-oriented.
2019-06-23 19:46:28 -04:00
Don Cross
a76b069ccc
Python: added astro_time_t.Utc(). Added more testing.
2019-06-23 17:50:13 -04:00
Don Cross
8a344d251d
Python: more work on date/time and formatting of same.
2019-06-23 17:36:33 -04:00
Don Cross
35017483cb
Fixed problem in Python MakeTime() function.y
2019-06-23 17:10:58 -04:00
Don Cross
2a97849af2
Python: Implemented AddDays function.
2019-06-22 21:35:48 -04:00
Don Cross
f29d44aa43
Python: Implemented MakeTime function.
2019-06-22 21:33:48 -04:00
Don Cross
66b0efda5a
Python: CurrentTime() working.
2019-06-22 21:24:56 -04:00
Don Cross
e37d7e90f0
Trim trailing whitespace from python code.
2019-06-22 21:15:54 -04:00
Don Cross
00dad8be32
Starting to add Python support in source translator.
2019-06-22 21:12:14 -04:00
Don Cross
b8149b73d3
Added culminate project to Windows examples.sln
2019-06-19 17:53:27 -04:00
Don Cross
b82afc6387
Added seasons project to Windows examples.sln
2019-06-19 17:48:54 -04:00
Don Cross
6b15caff7b
Added riseset project to Windows examples.sln
2019-06-19 17:44:21 -04:00
Don Cross
4b4b5b7af5
Fixed build problems in Windows for moonphase.c example.
2019-06-19 17:37:22 -04:00
Don Cross
743394b6d7
Added C example: culminate.
2019-06-18 21:00:57 -04:00
Don Cross
9e4c340f60
Added link to culminate.js in nodejs example markdown. Enhanced comments.
2019-06-18 15:41:04 -04:00
Don Cross
a205fcbcb7
Added node.js example for how to calculate culmination.
2019-06-18 15:28:47 -04:00
Don Cross
0e0bac95ce
Added nodejs seasons test.
2019-06-16 21:30:53 -04:00
Don Cross
ab642feb21
Added C example: calculating seasons.
2019-06-16 20:39:40 -04:00
Don Cross
5e755fe894
Fixed warnings found by lgtm.
2019-06-16 13:47:10 -04:00
Don Cross
e9a6c036ab
Added comments to a couple of static functions.
2019-06-15 20:38:49 -04:00
Don Cross
7f542cb5c7
Added test of riseset.js example program.
2019-06-15 15:50:54 -04:00
Don Cross
bffce01bb3
Added node.js example of calculating sunrise, sunset, moonrise, moonset.
2019-06-15 15:45:56 -04:00
Don Cross
480a7d44f1
Added browser demo for calculating sunrise, sunset, moonrise, moonset.
2019-06-15 15:12:28 -04:00