Lunar Functions

Lunar Position

There are a number of calculations for Lunar position the most useful is tMoon() as this provides the topo-centric co-ordinates and because the Moon is quite close to the Earth we will normally be interested in its position based on our location. If you need a geo-centric position then use Moon(). If you are actually interested in Cartesian co-ordinates than rMoon() is also available.

tMoon(Days after j2000, Latitude, Longitude, Index) returns topo-centric co-ordinates of the Moon given days after J2000 and your latitude and longitude.The index determines what result will be returned.

1 = distance in Earth Radii
2 = Declination in degrees
3 = Right ascension in degrees

Moon(Days after j2000, index) returns geo-centric coords of moon given days after J2000
The Index determines what result will be returned1 = distance in Earth Radii
2 = RA in degrees
3= Dec in degrees
rMoon(Days after j2000, index) returns geo-centric co-ordinates of moon given days after J2000The Index determines what result will be returned
1 = x,  2 = y, 3= z in units of Earth Radii
MoonRise(Days after J2000, Longitude, Latitude, Index, Temperature, Pressure)  Returns the time as a decimal fraction of a day, (0.5= 12:00 – just format the cell to time)

Arguments
Days after 1st January 2000
Longitude (East is -ve)
Latitude (South is -ve)
Index where
  1= Rise
  2= Transit
  3= Set
Temperature – if not entered then 0 degrees C is used
Pressure in millibars, if not entered 1013.25mb is used
if you don’t want to include refraction set the pressure to 0 mBar

Blog on how this function works

Age or phase of the Moon

Sometimes you want to know the exact phase of the Moon other times, questions like ‘when is the next full moon?‘ might be asked, these functions help you get to the answer quickly.

MoonAge(Days after J2000) Return the age of the Moon in days given the date in J2000 format
MoonPhase(Days after J2000, moonfont) For a given date test if the Moon is New, full, first or last quarter and return an appropriate string.If the moon isn’t full, new or 1st / last quarter the string will be empty.
moonfont is optional, if it equals any value the result will return a single character that when the cell is formatted with the moonfont by CurtisClark it will show an icon of the phase instead of the text description.
TIP change the font case on the returned result for an alternative moon icon
moonfont available here http://www.dafont.com/moon-phases.font
NOTE: font needs to be at least 8 point any smaller and you get text instead.
MoonPhaseDate(Days after J2000, Index) Searches for the date of the next phase specified in the index, starting from the closest new moon from the date given.
Index
1= new, 2 = 1st qtr,  3 = Full,  4= last qtr
returns a date in J2000 format correct to a minute (high order terms are ignored)
More accurate than moonphasesearch but starts the search from the closest new moon to the date provided
MoonPhaseSearch(Days after J2000, index) Searches for the date of the next phase specified in the index, starting from the date provided. This is not as accurate as MoonPhaseDate() but only looks forward which is sometimes handy.
Index: 1= new, 2 = 1st qtr,  3 = Full,  4= last qtr
returns a date in J2000 format can be up to a day out but ok for most uses

Lunar Size

These functions focus on Lunar size, combine size with topo-centric position for calculations for solar eclipses.

MoonSize(Days after J2000, Latitude,  longitude) Returns the moons angular size in arc seconds
MoonPerigee(Days after j2000, index) Returns the perigee or apogee of the Moon using the J2000 format date as the start search criteria
index = 1 for perigee and 0 for apogee
Advertisements

One thought on “Lunar Functions

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s