org. helvector. moon.Moon

Summary
Simon Gregory, Decmeber 2004.
Quick background on the moons phase.
Number of Milliseconds in one day.
Date of known full moon.
Current date of moon.
Returns a descriptive string of the instances phase.

Version 1. 0.1 a

Simon Gregory, Decmeber 2004.

Moon Notes

Quick background on the moons phase.

Search terms lunar, phase, diagram, moon.

See http://en.wikipedia.org/wiki/Lunar_phase for a good explanation of all things lunar.

Movement

  • Waxing Moon moves from a New to a Full moon.
  • Waning Moon moves from a Full to a New moon.

Phases

  • New Moon is 100% Shadow, as it’s exactly between the earth and the sun.
  • Waxing Crescent
  • First quarter
  • Waxing Gibbous
  • Full Moon is 0% Shadow, as it’s behind the earth and completely illuminated by the sun (except when eclipsed by the earth).
  • Waning Gibbous
  • Last Quarter
  • Waning Crescent

Orbital data

  • Moon day equals 27.3 days.
  • Orbits earth in 27.3 days (Sidereal month).
  • Completes phases in 29.5 days (Synodic month).

Check http://en.wikipedia.org/wiki/Sidereal for more info on orbital periods.

Direction of the waxing and waning depends on which hemisphere you’re looking from.  Though I’m confused as to what might happen at the equator.  My guess is that the shadow should be rotated based on longditude.

This class represnts the moons phase as a percentage %.

0% to %50 describes Waxing moon.

50% to 100% describes Waning moon.

So 0% AND 100% both describe a New Moon in full shade and 50% describes a Full Moon fully lit.

Variables

synodic

private static var synodic: Number

msPerDay

private static var msPerDay: Number

Number of Milliseconds in one day.

baseDate

private static var baseDate: Date

Date of known full moon.

moonDate

private var moonDate: Date

Current date of moon.

northernHemisphere

private var northernHemisphere: Boolean

Functions

Moon

public function Moon(moonDate: Date)

phasePercent

public function phasePercent():Number

phaseDesc

public function phaseDesc(p: Number):String

Returns a descriptive string of the instances phase.

Parameters

pNumber as an elapsed percentage of moon phase/synodic month.

Returns

A human readable description of the phase of the moon in following eight stages New Moon, Waxing crescent, First quarter, Waxing gibbous, Full Moon, Waning crescent, Last quarter, Waning gibbous.

See Also

Nothing yet

Properties

date

public function set date(d: Date):Void

date

public function get date():Date

hemisphere

public function set hemisphere(h: String):Void
private static var synodic: Number
private static var msPerDay: Number
Number of Milliseconds in one day.
private static var baseDate: Date
Date of known full moon.
private var moonDate: Date
Current date of moon.
private var northernHemisphere: Boolean
public function Moon(moonDate: Date)
public function phasePercent():Number
public function phaseDesc(p: Number):String
Returns a descriptive string of the instances phase.
public function set date(d: Date):Void
public function set hemisphere(h: String):Void