$((ai(sunset) - ai(sunrise)) - ((df(hh) * 60 + df(mm)) * 60)) / si(rwidth)
Is this a valid formula to calculate x of the sun on my phone screen? Working on a new wallpaper.
$((ai(sunset) - ai(sunrise)) - ((df(hh) * 60 + df(mm)) * 60)) / si(rwidth)
Is this a valid formula to calculate x of the sun on my phone screen? Working on a new wallpaper.
You will have better luck using HH instead of hh as it uses 24hrs instead of 12.
As for the formula, not sure what you’re trying to calculate; x of the sun? Maybe i’m just dense. If you’re working with ai(sunset/rise) i would recommend using df(HHmm), no need to multiply by 60.
My plan is to display the suns motion going across the sky, and I am starting with X, the goal is to create a sun that is time accurate on my wallpaper
First I agree that using a 24 hour clock is much simpler.
Secondly if you take, for example, 1600h (sunset) - 0700h (sunrise) - 1300h (time of day) you’re going to end up with a negative number (-400 in this example) so you’ll need to test for a negative and multiple by -1, or just wrap the whole formula in mu(abs, x) [where x is your formula] to always get the absolute value.
Otherwise it should work I think.