Documentation of delnew


Global Index (short | long) | Local contents | Local Index (short | long)


Function Synopsis

[delta, deltaccm] = delnew(ecc, epsi, per)

Help text

  function [delta, deltaccm] = delnew(ecc, epsi, per)

     This program calculates the declination of the sun at
     given values for:
          ecc = eccentricity = (a^2 - b^2)^(.5)/a
          epsi = obliquity
          per = perihelion date


Cross-Reference Information

This function calls

Listing of function delnew

function [delta, deltaccm] = delnew(ecc, epsi, per)

calday = [0:364 80];
n = length(calday);
thetam = 2 * pi * (calday - per) / 365;

theta1 = thetam + (2*ecc - 0.25*ecc^3) * sin(thetam);
theta2 = 1.25 * ecc^2 * sin(2*thetam) + (13/12) * ecc^3 * sin(3*thetam);
theta = theta1 + theta2;

thetanot = calday(n);
theta = theta(1:n-1);

delta = asin(sin(epsi) * sin(theta - thetanot));

deltaccm1 = 0.006918 - .399912 * cos(thetam(1:n-1)) + 0.070257 * sin(thetam(1:n-1));
deltaccm2 = 0.006758 * cos(2 * thetam(1:n-1)) + 0.000907 * sin(thetam(1:n-1));
deltaccm3 = 0.002697 * cos(3 * thetam(1:n-1)) + 0.001480 * sin(thetam(1:n-1));
deltaccm = deltaccm1 + deltaccm2 + deltaccm3;