Category : C Source Code
Archive   : RECIPEX.ZIP
Filename : FLMOON.C
#define RAD (3.14159265/180.0)
void flmoon(n,nph,jd,frac)
int n,nph;
long *jd;
float *frac;
{
int i;
float am,as,c,t,t2,xtra;
void nrerror();
c=n+nph/4.0;
t=c/1236.85;
t2=t*t;
as=359.2242+29.105356*c;
am=306.0253+385.816918*c+0.010730*t2;
*jd=2415020+28L*n+7L*nph;
xtra=0.75933+1.53058868*c+((1.178e-4)-(1.55e-7)*t)*t2;
if (nph == 0 || nph == 2)
xtra += (0.1734-3.93e-4*t)*sin(RAD*as)-0.4068*sin(RAD*am);
else if (nph == 1 || nph == 3)
xtra += (0.1721-4.0e-4*t)*sin(RAD*as)-0.6280*sin(RAD*am);
else nrerror("nph is unknown in FLMOON");
i=(xtra >= 0.0 ? (int) floor(xtra) : (int) ceil(xtra-1.0));
*jd += i;
*frac=xtra-i;
}
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/