[Prev][Next][Index][Thread]

RE: (meteorobs) Three questions



Hi Tom,

Please find below the answer to question one. I guess there are copy rights on the 
algorithhms below, but this should not be a problem for personal use.
I hope you speak "C" !

Marc de Lignie
Dutch Meteor Society

>
>
>Greetings. I have three hopefully easy questions. Any help appreciated.
>
>1. What is the formula for determining solar longitude?
>

/*
   Calculates the Julian day for a given month, day and year
   Source: numerical recipes
*/
long julianday(int mm, int id, int iyyy)
{
    long jul;
    int ja,jy,jm;

    if (iyyy == 0) {
      printf("JULDAY: there is no year zero.");
      exit(1);
    }
    if (iyyy < 0) ++iyyy;
    if (mm > 2) {
         jy=iyyy;
         jm=mm+1;
    } else {
         jy=iyyy-1;
         jm=mm+13;
    }
    jul = (long) (floor(365.25*jy)+floor(30.6001*jm)+id+1720995L);
    if (id+31L*(mm+12L*iyyy) >= IGREG) {
         ja=0.01*jy;
         jul += 2-ja+(int) (0.25*ja);
    }
    return jul;
}


/*
   Calculates solar longitude for equinox 2000.0, given Julian Day and Universal Time
   Source: Casper ter Kuile.
   Original source: Jean Meeus.
*/
float sol2000(long jul, float tut)
{
  double sl,sa,te,c1,c2,c3,c,stl,omega,sal;

  te=(jul-2415020L)/36525.;                      /* decimale eeuw vanaf 1900 */
  sl = 279.69668 + 36000.76892*te + .0003025*te*te;
  sa = 358.47583 + 35999.04975*te - .00015  *te*te - .0000033*te*te*te;
  sl = sl - floor(sl/360.)*360.;
  sa = sa - floor(sa/360.)*360.;
  sa = sa*PS;
  c1 = (1.91946 - .004789 * te - .000014*te*te) * sin(sa);
  c2 = (.020094 - .0001*te) * sin(2.*sa);
  c3 = .000293 * sin(3.*sa);
  c = c1 + c2 + c3;
/*
  Berekening  werkelijke  zonne-lengte  en  werkelijke  anomalie
*/
  stl = sl + c;
/*
  Berekening  schijnbare  zonne-lengte
*/
  omega = 259.18 - 1934.142*te;
  omega = omega - floor(omega/360.)*360.;
  sal = stl - .00569 - .00479 * sin(omega*PS);  /* zonslengte voor 12h UT */
  sal=sal+(tut-12.)/24.*360./365.25;
  sal=sal - .01396 * (100.*te - 100.);          /* precessie correctie */
  return sal;
}



------------------------------------------------------------------------------------
Marc de Lignie
Prins Hendrikplein 42                        Tel. +31 (70) 320 5673
NL-2264 SN  Leidschendam            Fax. +31 (70) 332 6477
The Netherlands                                E-mail: mcdelign@pidot net

Predicted progress always fails. Real progress is all the small
steps you realize to have made when looking back in time.
-------------------------------------------------------------------------------------