RA and declination of Sun & phase of Moon program

Click For Summary
SUMMARY

This discussion focuses on creating a Fortran program to calculate the right ascension and declination of the Sun, as well as the phase of the Moon, based on a given date and time. Key references include Jan Meeus's books, "Astronomical Formulae for Calculators" and "Astronomical Algorithms," which provide essential algorithms for these calculations. The discussion emphasizes the importance of using epoch corrections to align with the current ephemeris for accurate results. Participants confirm that the algorithms for sunrise calculations can be adapted for the Sun's position at a specific epoch time.

PREREQUISITES
  • Understanding of Fortran programming language
  • Familiarity with astronomical calculations
  • Knowledge of Julian day calculations
  • Ability to implement epoch corrections in algorithms
NEXT STEPS
  • Study "Astronomical Algorithms" by Jan Meeus for detailed algorithms
  • Research how to implement Julian day calculations in Fortran
  • Learn about epoch corrections and their application in astronomical computations
  • Explore existing Fortran libraries for astronomical calculations
USEFUL FOR

Astronomy enthusiasts, Fortran programmers, and anyone interested in developing applications related to celestial mechanics and astronomical phenomena.

Jadaav
Messages
175
Reaction score
1
Hello there,

I want to write a fortran program which gives me the right ascension and declination of the sun and the phase of the moon when a date and time is given.

I just want to know how to write it and if there are any references that can help me.

Thanks,
Jadaav.
 
Astronomy news on Phys.org
Jan Meeus wrote several small books on Astronomic calculations for everyone. The first book was based on using desktop calculators, later on he provided another with algorithms.

Astronomical Formulae for Calculators
Astronomical Algorithms

Basically you want the algorithm used to determine when sunrise will occur at a given latitude, longitude, and date. This can be simplified to solve for the position of the sun at a given epoch time, i.e., see https://en.wikipedia.org/wiki/Julian_day.

Phases of the moon is the both books, too. You have to make epoch corrections to match the current ephemeris, just like above.
 
  • Like
Likes   Reactions: Jadaav
Thanks Jim. I've taken a look at the second book and it seems to be really interesting. I've found what I was looking for.

I'll try to do the programming bit and I'll you know.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K