-1

I want to make an Android application for an university project which calculates prayer times.

The first line in the code is:

d = jd - 2451545.0;  // jd is the given Julian date

How can I obtain a Julian date?

Also, in the code RA = arctan2(cos(e)* sin(L), cos(L))/ 15;, how does the comma work? How can I execute this statement mathematically and/or programmatically?

APerson
  • 8,140
  • 8
  • 35
  • 49
  • before asking local imam Question 2 should be solved because I could not calculate values at all – user3806916 Jul 05 '14 at 15:22
  • @GabeSechan "ask your local imam" -- ha ha ha. Cut it out. If you don't know how to obtain a Julian date, just stay out of it. – Robert Dodier Jul 05 '14 at 18:44
  • 1
    @RobertDodier He edited the question. Originally he had a link to a page noting the times of prayer each day and adking if it was accurate. That part was removed. Check the edit history on the question. – Gabe Sechan Jul 05 '14 at 18:48
  • https://stackoverflow.com/a/61891905/12478830 – MMG May 21 '20 at 14:08

2 Answers2

1

On your 3rd question:

RA is the result of a function called arctan2 divided by 15(source), that takes 2 values seperated by a comma. Those two values are results of a calculation itself, cos respektivly sin of the values e or L. Because sin and cos only take 1 parameter, there is no comma, because no values have to be seperated.

sschrass
  • 7,014
  • 6
  • 43
  • 62
0

Julian date 0.0 is 01/1/4713 BC, so the number of days since that date till 01/01/2000 is = (4712+2000)*365.25-13=2,451,545 days. 13 days are subtracted because there was a correction on Georgian calendar that happened on 3/9/1752 which was made 13/9/1752 which makes a 11 days lost, plus there where two leap years in 1800 & 1900 without 29th FEBRUARY, so there is a 13 days difference to be accounted for in the formula above.