3
$\begingroup$

I am making a watch app, where i need to know where there is currently sun, and where its not.

I need to have some sort of formula/function to insert: date, time and longitude, and get back the latitude of the civil twilight.

Can someone help me?

$\endgroup$
4
  • $\begingroup$ You might check with people who made an online tool like geodesyapps.ga.gov.au/sunrise to see if they have a service or can help you with the formula. $\endgroup$
    – haresfur
    Jun 22 at 23:47
  • $\begingroup$ you can take a look at timeanddate.com and try to find the formulas they use. $\endgroup$ Jun 23 at 14:52
  • $\begingroup$ I think that since the Earth is not spherical, any "formula" you use will have to be geo-referenced and thus software is required. And that is not even taking into account the leap year problem and other time corrections you will need depending on year. Maybe you could derive a "formula" for a specific location based on empirical evidence. $\endgroup$
    – f.thorpe
    Jun 24 at 17:47
  • $\begingroup$ Astronomical algorithms by Meeus J. published by Willmenn-Bell Inc, USA contains the algorithm or formula you need! $\endgroup$
    – Harish
    Jul 1 at 10:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.