MaplyMoon
@interface MaplyMoon : NSObject
Utility for calculating moon position.
This is a utility class that figures out where the moon is at a given data and provides the position.
-
Initialize with a date.
Initialize with the given date. The moon position will correspond to that. Must be after 2000.
Declaration
Objective-C
- (nonnull instancetype)initWithDate:(NSDate *_Nonnull)date;Swift
init(date: Date) -
Location on the globe where the moon would land if it fell straight down. Ouch.
Declaration
Objective-C
- (MaplyCoordinate)asCoordinate;Swift
func asCoordinate() -> MaplyCoordinate -
Return the location above the globe in lon/lat/distance. Yay geocentric!
Declaration
Objective-C
- (MaplyCoordinate3d)asPosition;Swift
func asPosition() -> MaplyCoordinate3d -
Illuminated fraction of the moon
Declaration
Objective-C
@property (readonly, atomic) double illuminatedFraction;Swift
var illuminatedFraction: Double { get } -
Phase of the moon.
Declaration
Objective-C
@property (readonly, atomic) double phase;Swift
var phase: Double { get }
View on GitHub
MaplyMoon Class Reference