Add Moon Tilt angle
amoledwatchfaces opened this issue · 5 comments
[position angle of axis]
and maybe also
[bright limb angle] ?
Maybe this file will helpSunMoonCalculator.java
This is what I'm using to rotate moon right now. (Initial position of bitmap = grows from top to bottom, that's why it's rotated -90° on start)
axis = position angle of axis in degrees
brightLimb = bright limb angle in degrees
parallactic = parallactic angle in degrees
`var brightLimbRotation = brightLimb - 90
if (brightLimb > 180) {
brightLimbRotation = brightLimb - 270
}
brightLimbRotation -= axis
val preRotate = parallactic - axis
val finalRotation = brightLimbRotation + preRotate`
This is the file to draw moon Bitmap, everything is set, only angles are needed.
Right now, it's using hardcoded location (lat: 48.0, long 20.0) with current time.
What's interesting is that SMC.java calculates parallactic angle differently too, for the same location. (+- 10°)
There was a stupid bug in MoonPosition.getParallacticAngle()
that always gave wrong results.
The bug is fixed with suncalc v3.6 / v2.13. Does it solve your problem?
There was a stupid bug in
MoonPosition.getParallacticAngle()
that always gave wrong results.The bug is fixed with suncalc v3.6 / v2.13. Does it solve your problem?
I'll test it as soon as possible and let you know. Thanks for fixing it!
ParallacticAngle issue was fixed :)