-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Hi,
According to the README documentation, the MoonPosition object returned by SunCalc.getMoonPosition() should include a parallacticAngle property:
Returns an object with the following properties:
altitude: moon altitude above the horizon in radians
azimuth: moon azimuth in radians
distance: distance to moon in kilometers
parallacticAngle: parallactic angle of the moon in radians
However, the current implementation of MoonPosition in the codebase only contains three properties:
public class MoonPosition {
public var azimuth: Double
public var altitude: Double
public var distance: Double
// Missing: parallacticAngle
}
Expected behavior:
MoonPosition should include the parallacticAngle property as documented.
Actual behavior:
The property is missing, causing compilation errors when trying to access it as per the documentation.
Use case:
The parallactic angle is needed to calculate the zenith angle of the moon's bright limb. According to the documentation:
By subtracting the parallacticAngle from the angle (from getMoonIllumination) one can get the zenith angle of the moon's bright limb (anticlockwise).
Suggested fix:
Add the parallacticAngle property to MoonPosition and compute it in the getMoonPosition() method, similar to how it's calculated in the original suncalc.js implementation.
Thank you!