In this question about how to calculate sunrise, there is a link to a page that describes a algorithm to calculate sunrise sunset.

But when I start to follow the instructions I find that there is a lot of magical constants in that instruction and it is hard to understand what is going on.

For example this part:

  1. Calculate the Sun's mean anomaly $$M = 0.9856 t - 3.289$$

Where did he find $0.9856$ and $3.289$?

And in the next part

  1. Calculate the Sun's true longitude $$ L = M + 1.916 \sin(M) + 0.020 \sin(2 M) + 282.634$$ Note: $L$ potentially needs to be adjusted into the range $[0,360)$ by adding/subtracting $360$.

Where did he find $1.916$, $0.020$ and $282.634$?


1 Answer 1


The mean anomaly relates position and time of an orbiting body. It is zero at the perihelion and increases with time. Its formula is: $M=M_0+nt$.

So, in this case $M_0=-3.289°$ is the mean anomaly when the measurement was made. $n=0.9856$ is the mean motion, which is $2\pi$ divided by the duration of the full orbit.

More information here.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.