Still cant get the MoonAge formulae to match New Moon tables, available on various websites.
Here is my revised formula:
Derived from original ‘Simple()’ moon phase function - reference: Ben Daglish - )
Ben (G7) 's suggested use of: ((#DNOW #/1000)/86400 , changed to scientific notation
Synodic month: 29.5306 , based on correct rounding for 29.53058868
Lunar epoch date of: 1970 Jan 7 20:36 - reference: Lunar Perigee and Apogee Calculator )
Trig2() (beta code) shown for comparison, which is probably (errors not withstanding) more accurate
JulianDate:
base date: J1721059.5 (1BCE-01-03 00:00:00.0 UTC) as J1
#NOW#
base date: J2440587.5 (1970-01-01 00:00:00.0 UTC)
(#DNOW#/8.64e7+2440587.5)
(floor((#DNOW#/8.64e7+2440587.5)*10000)/10000)
Lunation: (lunar cycles, starting 1900)
lunar epoch: J2415020.0 (1899-12-31 12:00:00.0 UTC)
(floor(((70*365.2425)+(#DNOW#/8.64e7))/29.5306))
(floor(865.7791+(#DNOW#/8.64e7)/29.5306))
Moon Age:
lunar epoch: J2440594.358333 (1970-01-07 20:36:00.0 UTC)
(floor(
(((#DNOW#/1000)/86400+2440587.5-2440594.3583)%29.5306)
*100)/100)
(floor(
((#DNOW#/8.64e7-6.8583)%29.5306)
*100)/100)
(floor(((#DNOW#/8.64e7-6.8583)%29.5306)*100)/100)
1 Like
Additional revised syntax (as above)
Elongation:
Elongation = MoonAge x 12.1908
(((#DNOW#/8.64e7-6.8583)%29.5306)*12.1908)
Luminosity:
Luminosity = floor(( (1-cos( Elongation x 0.01745)) /2) x100) %
Output: ##.######
(floor(((1-cos(
(((#DNOW#/8.64e7-6.8583)%29.5306)*12.1908)
*0.01745))/2)*100))
(floor(((1-cos((((#DNOW#/8.64e7-6.8583)%29.5306)*12.1908)*0.01745))/2)*100))
In range: 20-100% (for icon)
(20+floor(((1-cos((((#DNOW#/8.64e7-6.8583)%29.5306)*12.1908)*0.01745))/2)*80))
Output: ##.0%
(floor((((1-cos(
(((#DNOW#/8.64e7-6.8583)%29.5306)*12.1908)
*0.01745))/2)*100)*10)/10)%
(floor((((1-cos((((#DNOW#/8.64e7-6.8583)%29.5306)*12.1908)*0.01745))/2)*100)*10)/10)%
1 Like
Does it match the tables with this modification now? It looks to be close, it is showing the same at Ben’s example above yours.
The number in black/red is Ben’s, included for comparison.
Yes, it is closer. But the trig2() function (combined output of 4 or more complex lunar cycles) is clearly superior. I am going to continue testing, and also complete the trig1() code. All three (and ‘Conway’) are listed on the Ben-Daglish.net website (see above).
For now, I would recommend to use my latest ‘Simplex’ formula.
Still a work-in-progress:
Update: Now with attitude (tilt) This is just baseline, with seasonal variance still to be added.
4 Likes
brbr123
December 17, 2018, 3:18pm
50
Hi Ben, can you PLS check what I am doing wrong with my moon phase here?
Enjoy thousands of free and premium watch faces for all WearOS, Samsung, and Apple smartwatches including Samsung Gear S3 & S2, Huawei, Moto 360, Sony Smartwatch 3, Fossil Q, LG Watch Urbane and more!
Ben
December 18, 2018, 7:31am
51
1 Like
i don’t know how you guys keep those expressions straight. That’s just amazing!
pitpro
April 8, 2020, 1:13am
53
Full moon is at 4/7/2020, 9:35pm.
It’s now 8:12pm(4/20) and your indicator
is showing 99.9% Waiting for 100% ; )
Bravo!
Thanks
1 Like