Use wasm ephemeris locally and document Caddy serving
This commit is contained in:
parent
dbe9758b7c
commit
ba47f6dae4
7 changed files with 3876 additions and 25 deletions
|
|
@ -133,7 +133,7 @@ int * planetary_moment(double lat, double lon, long unixtime, double *lunar, dou
|
|||
time_t timestamp = 0;
|
||||
int32 year, month, day, hour, minute, second, iflag, iflgret;
|
||||
int pl, ipl, rsmi, return_code, dl, lhour, nm;
|
||||
double hours, tjd_ts, te, lastnew;
|
||||
double hours, tjd_ts, te, lastnew = 0.0;
|
||||
double x2[6], datm[2], geopos[3], moon[20], llp[20], lunarday[31], data[13], datb[10];
|
||||
char serr[AS_MAXCH], starname[255];
|
||||
|
||||
|
|
@ -188,7 +188,8 @@ int * planetary_moment(double lat, double lon, long unixtime, double *lunar, dou
|
|||
planets[16] = datb[2]; // armc
|
||||
|
||||
// calculate moon phase
|
||||
return_code = swe_pheno(te, SE_MOON, iflag, &moon, serr);
|
||||
// swe_pheno expects a pointer to the first element
|
||||
return_code = swe_pheno(te, SE_MOON, iflag, moon, serr);
|
||||
if (return_code == ERR) printf("%s\n", serr);
|
||||
lunar[1] = moon[0];
|
||||
lunar[2] = moon[1];
|
||||
|
|
@ -221,7 +222,7 @@ int * solar_moment(double lat, double lon, long unixtime, long *solar) {
|
|||
long epoch = 0;
|
||||
struct tm *tmp;
|
||||
time_t timestamp = 0;
|
||||
int32 year, month, day, hour, minute, second, iflag, pday = 0;
|
||||
int32 year, month, day, hour, minute, second, iflag = 0, pday = 0;
|
||||
int ipl, rsmi, hourlength[3];
|
||||
double hours, tjd, td;
|
||||
double datm[2], geopos[3], lastset, lastrise, nextset, nextrise, onextrise, onextset;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue