nutate.c 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. #include "astro.h"
  2. void
  3. nutate(void)
  4. {
  5. /*
  6. * uses radian, radsec
  7. * sets phi, eps, dphi, deps, obliq, gst, tobliq
  8. */
  9. double msun, mnom, noded, dmoon;
  10. /*
  11. * nutation of the equinoxes is a wobble of the pole
  12. * of the earths rotation whose magnitude is about
  13. * 9 seconds of arc and whose period is about 18.6 years.
  14. *
  15. * it depends upon the pull of the sun and moon on the
  16. * equatorial bulge of the earth.
  17. *
  18. * phi and eps are the two angles which specify the
  19. * true pole with respect to the mean pole.
  20. *
  21. * all coeffieients are from Exp. Supp. pp.44-45
  22. */
  23. mnom = 296.104608 + 13.0649924465*eday + 9.192e-3*capt2
  24. + 14.38e-6*capt3;
  25. mnom *= radian;
  26. msun = 358.475833 + .9856002669*eday - .150e-3*capt2
  27. - 3.33e-6*capt3;
  28. msun *= radian;
  29. noded = 11.250889 + 13.2293504490*eday - 3.211e-3*capt2
  30. - 0.33e-6*capt3;
  31. noded *= radian;
  32. dmoon = 350.737486 + 12.1907491914*eday - 1.436e-3*capt2
  33. + 1.89e-6*capt3;
  34. dmoon *= radian;
  35. node = 259.183275 - .0529539222*eday + 2.078e-3*capt2
  36. + 2.22e-6*capt3;
  37. node *= radian;
  38. /*
  39. * long period terms
  40. */
  41. phi = 0.;
  42. eps = 0.;
  43. dphi = 0.;
  44. deps = 0.;
  45. icosadd(nutfp, nutcp);
  46. phi = -(17.2327+.01737*capt)*sin(node);
  47. phi += sinadd(4, node, noded, dmoon, msun);
  48. eps = cosadd(4, node, noded, dmoon, msun);
  49. /*
  50. * short period terms
  51. */
  52. dphi = sinadd(4, node, noded, mnom, dmoon);
  53. deps = cosadd(3, node, noded, mnom);
  54. phi = (phi+dphi)*radsec;
  55. eps = (eps+deps)*radsec;
  56. dphi *= radsec;
  57. deps *= radsec;
  58. obliq = 23.452294 - .0130125*capt - 1.64e-6*capt2
  59. + 0.503e-6*capt3;
  60. obliq *= radian;
  61. tobliq = obliq + eps;
  62. gst = 99.690983 + 360.9856473354*eday + .000387*capt2;
  63. gst -= 180.;
  64. gst = fmod(gst, 360.);
  65. if(gst < 0.)
  66. gst += 360.;
  67. gst *= radian;
  68. gst += phi*cos(obliq);
  69. }