First update in under 12 hours. This provides information on the current lunar phase based on the time and date it is requested, OR based on any date in history or in the future. The computation is done on the device, no API’s are called.
These next blocks are a little Kepler calculation to tell you what the speed and orbital distance of a planet would be, if you changed the mass of the sun, and changed how long a “year” would be. It returns the Distance, and Velocity of the planet.
Instructions.
Index returns an integer, Phase returns a number with decimal points (technically it could be a negative -99.99 – 0 – 99.99.
Age returns a String with a description.
Here are all three blocks in action with some labels
For the blocks on any custom date, everything is number based. No dashes etc.
For the Orbital Calculator, please ensure the mass of the sun does not exceed 200x. That would collapse the solar system and I like our solar system as it is thank you!
It is very very complex maths. You need to determine the position of the sun, and the moon, and there are a number of standards. Here is an example of some of the math numbers involved.
I am trying to get moon phase index for a whole month. so far i tried this and it works (after doing some improvements) but I have to do it for all dates individually. is there any other way to do this?
I am creating a calender in which I want this moon feature too. So I am using images of full moon, new moon, first quarter, etc but I don’t know when will be new moon and when will be full moon using moon phase.
Is there any component which I can use here like. If value is greater then +99 it will be full moon and if value is 0 or in between 0.01-0.09 it will be new moon.
The highest number is 99. Anything close to 99 would be a “full moon”, the Lunar index is the proper breakdown of the moon status.
0 is New moon always. -99 or +99 is full moon always.
In the index, 0 is New Moon and 4 is full moon.
If you pick the middle of the three days of the index for the Full Moon, it will be at its brightest. Same with the New Moon, pick the middle of the three days from the index, and it is the darkest.
Alternatively you can get the lunar phase on each day, and the number closest to 99 is Full, and number closest to 0 is New.