Closed astrorigin closed 3 years ago
I fail to understand why the test for swe_lat_to_lmt does not result in tjd_lmt = 2452275.5000 like in C and Python.
swe_lat_to_lmt
tjd_lmt = 2452275.5000
(Its counterpart swe_lmt_to_lat seems ok...)
swe_lmt_to_lat
#include <stdlib.h> #include "swephexp.h" int main(void) { double tjd_lat = 2452275.4978254; double tjd_lmt; int i; char serr[256]; double geolon = 121.34; swe_set_ephe_path(NULL); i = swe_lat_to_lmt(tjd_lat, geolon, &tjd_lmt, serr); if (i != 0) exit(1); printf("tjd_lmt = %f\n", tjd_lmt); return 0; }
The error was in line 5012 of sweph.c, where the wrong function was called. Thank you for pointing out this error.
The fix was so simple that I pushed directly to the master branch.
Fix: https://github.com/cyjoelchen/php-sweph/commit/5d5069f43a6036c9010b1f54aca211aed2c00cac
I fail to understand why the test for
swe_lat_to_lmt
does not result intjd_lmt = 2452275.5000
like in C and Python.(Its counterpart
swe_lmt_to_lat
seems ok...)