Jump to content

Talk:Sunrise equation

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Untitled and out of chronological sequence

[edit]

Am I correct that the equations presented do not take into account the altitude of the observer? DrMattB (talk) 21:47, 29 December 2014 (UTC)[reply]


This equation actually only works in Radians mode. I'm no math expert, so I don't know the proper way to mention that in the text...

71.193.205.228 03:05, 24 December 2006 (UTC)[reply]

It must be assumed by most programmers that computer languages must use conversions when working with such angles. I wouldn't worry about it. Degrees show up with that special character ° — Preceding unsigned comment added by 2601:242:4000:7812:84CB:CCDA:1AA:53E9 (talk) 23:37, 23 November 2016 (UTC)[reply]


This article is marked as a stub. My guess is that we should remove that now that there is more information.

Also, the generic equation should work in both degrees and radians so as long as you keep everything in the same coordinate system. It should be noted that most programming languages and spreadsheet programs use only radians, but a hand-held calculator should be able to handle both.

--Bu gee (talk) 15:53, 16 December 2008 (UTC)[reply]

In the sunset calculation there's an unbalanced left parenthesis in the Latex representation. I'm not familiar with this part of the markup language so perhaps someone else can correct the error. I think it's just the case that the first parenthesis needs removing but the formula has changed over the history of the article and appears to have spent some time in a different form so I'm not certain whether an error in the formula has crept in.

79.71.145.79 (talk) 16:27, 26 October 2009 (UTC)[reply]

Validity of the Algorithm

[edit]

I programmed the algorithm and it works fine. Two questions are open: What's the time area the algorithm is valid and between which latitudes does the algorithm give reasonable results? —Preceding unsigned comment added by Hgs07 (talkcontribs) 20:11, 20 September 2010 (UTC) ---Still pretty new here, but I was googling and the [1] site shows up with an updated algorithm. It also lists the parameters of their equation. Didn't go into the details to check the differences in the equation, but I also notice this article doesn't cite very many resources. So it should be checked against this one at least http://www.esrl.noaa.gov/gmd/grad/solcalc/calcdetails.html Gödel's Prodigal Apprentice (talk) 06:32, 3 January 2014 (UTC)[reply]

Still pretty new here, but I was googling and the https://wiki.riteme.site/wiki/NOAA site shows up with an updated algorithm. It also lists the parameters of their equation. Didn't go into the details to check the differences in the equation, but I also notice this article doesn't cite very many resources. So it should be checked against this one at least http://www.esrl.noaa.gov/gmd/grad/solcalc/calcdetails.html Gödel's Prodigal Apprentice (talk) 06:36, 3 January 2014 (UTC)[reply]

Oh, what about the algorithm for Time.is? For example, the sunrise time for Fort Collins is 7:24 but Loveland is 7:23. But they both have the same sunset time. How odd. Just another possible comparison. Gödel's Prodigal Apprentice (talk) 07:19, 3 January 2014 (UTC)[reply]

The algorithm seems to be not valid

[edit]

I had programmed by the algorithm, but the result for shanghai is far from correct.

  • Computed sun rise time for Shanghai in March 20th: 10:12AM(CST)
  • Correct sun rise time for Shanghai in March 20th: 5:59AM(CST)

Can anyone else double-check the algorithm? Thanks --Mountain (talk) 06:10, 20 March 2011 (UTC)[reply]

Maybe you should link this page for further referral: http://williams.best.vwh.net/sunrise_sunset_algorithm.htm In a nutshell, the sunrise time depends on how you define it. It can be one of the official, civil, nautical or astronomical definitions, giving four different times. The formula present here does not seem to deal with Sun's zenith. —Preceding unsigned comment added by 217.150.130.114 (talk) 07:22, 11 May 2011 (UTC)[reply]

It is my first writing for Wiki and I researched a lot before writing my comments here. My writing skill is not very good, but my programming and mathematics skill are better. I programmed this algorithm and I found two changes that can improve the accuracy: 1) If you search Jdate for Jan 1, 2000, you will find 2451544.5 and n will become -0.5, that means you find M for 0TU - Longitude. A better value should be 12TU - Longitude. My recommendation is to use 2451544.5 instead of 2451545 when you compute n = the number of days since Jan 1st, 2000 12:00. As you can see, the label of n do not fit with its value. 2) Sidereal time is shorter that universal time. The approximation for that is 3662422/3652422 = 1.0027. In Solar Transit, I replaced J* with j2000 - (Longitude/360)/1.0027. The basic idea here is that sidereal time = sideral time at 0h + hours since 0h*1.0027. Equation of time should also be converted in UT time. Staubinr (talk) 08:52, 14 October 2018 (UTC)[reply]

After 3 to 4 pages of mathematics equations, I was able to prove that I was right. If some is interested, I can add my proof. Staubinr (talk) 23:20, 14 October 2018 (UTC)[reply]

The equation for transit time can be more accurate with little modifications. I will prove it and describe it: A) A simple mathematical proof:

The key here is the Equation of Time and Sideral Time. I will use these four basic equations:

1) GMST (Greenwich mean sidereal time) = GMST0 (GMST at 0h TU) + hUT (hours in UT) * 1.0027 (1.0027 ±= 3662422/3652422);

2) LMST (local mean sideral time) = GMST + longitude (observer with negative west);

3) LMST = HA (Hour Angle) + RAS (Right ascension of the sun);

4) ET (Equation of Time) = 12h + GMST0 - RAS - 0.0027*(Ephemerid Time - UT);

The key is to find hUT for an HA equal 0. Then we match GMST0 on equation 1 and 4:

GMST0 = GMST - hUT*1.0027 = ET - 12h + 0.0027*dT + RAS

We can match our SET (simple equation of time) = ET - 12h + 0.0027*dT

With equation 2 we have: GMST = LMST - longitude

And with equation 3 we have LMST = RAS

Then GMST = RAS - longitude

And GMST0 = RAS - longitude - hUT*1.0027 = SET + RAS

And hUT = (-SET - longitude)/1.0027

The real proof is more complex then that.

Staubinr (talk) 21:31, 15 October 2018 (UTC)[reply]

B) More accurate proof with mixing values for 0h UT and 12h-longitude UT:

I will use d = a date at 0h UT, and h = 12h UT - longitude. We use d+h to computer M, ET and Lambda. From equation 4 we have:

ET(d+h) - 12h + 0.0027*dT = GMST0(d+h) - RAS(d+h)

We can rewrite GMST0(d+h) = GMST0(d) + deltaGMST0*h with deltaGMST0 around 4 minutes per day

Then SET(d+h) = GMST0(d) + deltaGMST0*h - RAS(d+h)

and LMST = RAS(d+h)

and GSMT = RAS(d+h) - longitude

and GMST0(d) = RAS(d+h) - longitude - hUT*1.0027 = SET(d+h) - deltaGMST0*h + RAS(d+h)

and hUT = (deltaGMST0*h - longitude - SET(d+h))/1.0027

With deltaGMST0 = 1/365.2422 and h = 12 - longitude we have: (12 - longitude)*deltaGMST0 - longitude And ((12 - longitude + 365.2422*longitude)/365.2422)*365.2422/366.2422 = ((12-364.2422*longitude)/366.2422 ±= longitude/1.0027

Conclusion: We need to find a better source for these equations.

Staubinr (talk) 22:29, 15 October 2018 (UTC)[reply]

Not sure why you calculate equation of center twice. The first one is accurate with C = 1.9148*Sin(M)+... The second time is not accurate with 0.0053*Sin(M). if you multiply 0.0053*360 = 1,908. It is a very bad approximation of C. Why not just replace 0.0053*sin(m) with c/360. Also the argument of perihelion can be more accurate with 282.9374 + 0.000047*J*. Moreover replacing -0.0069*Sin(2*el) with -0.00685*Sin(2*el) + 0.00015*Sin(4*el) is an other good improvement. With these changes, you can have a ±10 seconds accuracy. I tested it with 2018 and longitude of 120.

Staubinr (talk) 01:29, 28 October 2018 (UTC)[reply]

Equation of Centre: Length or Angle?

[edit]

Does anyone know why the Equation of Centre is calculated as a length but is then used as an angle in the Ecliptic Longitude? 77.89.154.66 (talk) 12:34, 6 September 2013 (UTC)[reply]

In the celestial sphere, arc lengths are angles. Specifically, the Equation of the Center is an arc length along the ecliptic, and is used as a correction to the Mean Anomaly to get the true ecliptic longitude. 2001:4452:3A9:7500:2B24:195C:3B8F:BFAC (talk) 11:14, 20 May 2022 (UTC)[reply]

2451545

[edit]

Why is this constant used throught the algorithm, why not instead explain what it is (I believe it to be J2000, that is, the Julian date of January 01 2000 at 12 noon http://docs.kde.org/stable/en/kdeedu/kstars/ai-julianday.html )

More curiously, though, is the 0009 that is sometimes attached to the constant does anyone know its relevance?

Ok, a bit of googling shows that the algorithm described on this page is also shown on http://users.electromagnetic.net/bu/astro/sunrise-set.php With a bit more explanation of what constants mean AND a link to more definition, BUT the link is dead, thank the Wayback machine for the following http://web.archive.org/web/20040707121402/http://www.astro.uu.nl/~strous/AA/en/reken/zonpositie.html — Preceding unsigned comment added by 124.197.2.81 (talk) 18:18, 19 September 2013 (UTC)[reply]

Useless algo

[edit]

Let's say your result for Jset is 2456609. What is it? 2456609 seconds, milliseconds, peanuts? — Preceding unsigned comment added by 84.2.139.75 (talk) 21:00, 11 November 2013 (UTC)[reply]

The Julian day number is unitless, because it is a count of the number of days since an epoch, possibly including fractional parts. It is not a unit of time. 2001:4452:3A9:7500:2B24:195C:3B8F:BFAC (talk) 11:20, 20 May 2022 (UTC)[reply]
if you look at this :
you see that the result is a fractional value in days.

--alex (talk) 09:07, 23 November 2020 (UTC)[reply]

Error; or the need for alternative contours

[edit]

I think that there are some issues with this graph. Either the label that says 1 hour is meant to be 0 hours; and the label that says 23 hours is meant to be 24 hours; or the graph should have displayed the 0 and 24 hour contours instead of the current 1 and 23 hour contours. Can someone who understands the sunrise equation please produce a better graph? Thank-you --123.243.217.67 (talk) 18:15, 2 August 2014 (UTC)[reply]

What does "(current) Julian cycle" mean?

[edit]

The section called "Calculate current Julian cycle" says, "n is the Julian cycle since Jan 1st, 2000." But Julian cycle is not defined.

Julian day defines related concepts, but not "Julian cycle" per se.

Google search on "Julian cycle" leads to pages like http://www.hermetic.ch/cal_stud/jdn.htm and http://whatis.techtarget.com/definition/Julian-date, which say that a Julian cycle is the 7980-year period starting at 4713 BC. The Julian day article defines this as the Julian period. Could a Julian period be what the "Calculate current Julian cycle" section refers to? It doesn't seem to be, since "Julian cycle since Jan 1st, 2000" wouldn't mean "current Julian cycle" -- the latter would start from 4713 BC, not 2000 AD. And whereas the Julian period is 7980 years long, the "current Julian cycle" referred to here seems to be very short, e.g. 15 years in 2015.

The only "cycles" talked about in the Julian day article are the indiction, Metonic and solar cycles. But it's pretty clear that these "subordinate cycles" are not what the "Calculate current Julian cycle" section refers to.

My guess is that in the "Calculate current Julian cycle" section, "current Julian cycle" means "the number of days since the J2000 epoch." Maybe there's a more concise and accurate term for that, but "Julian cycle" is apparently not it. If we can't find a concise and accurate term, we should probably change it to a long-but-accurate phrase. But hopefully someone who understands this better than me can offer a better solution. Huttarl (talk) 22:19, 29 September 2015 (UTC)[reply]

Just implemented this in code

[edit]

It appears the equation of time needs to be added rather than subtracted.

I found the change in terminology between mean solar noon and mean solar time confusing. It is mean solar noon.

Julian Date should refer instead to JDN, Julian Date Number. It needs to be an integer for the rest to work. Showing a decimal 2451545.0, just furthers the confusion. — Preceding unsigned comment added by 184.100.67.177 (talk) 21:18, 9 March 2016 (UTC)[reply]

0.0008 Leap Seconds

[edit]

Since this is showing up in here we might as well reference it. [2] — Preceding unsigned comment added by 2601:242:4000:7812:84CB:CCDA:1AA:53E9 (talk) 16:25, 23 November 2016 (UTC)[reply]

The question was brought up in 2451545 and how to calculate these is not the point. We have articles about that. [3] and [4]

It's just funny we don't call them Joseph Numbers. :-)

It should be corrected for the right terms such as AJDN and JDN are different. See the exact terminology. One has time added and the latter is just a date beginning at Noon or 12:00. [5]

Is it really necessary to add this number on to the starting JDN? We are talking seconds here and how accurate does this approximate formula need to be? At least it is now explained what that magic number is but it has decreased from whatever it was before to 0.0008 and I know that leap seconds are increasing not decreasing. In fact at this time 0.0008 is even a roundup of 0.00079. For further information on these values ... International Earth Rotation and Reference Systems Service.[6] If you use this service then it needs to be cited that there was an initial number of leap seconds added when this was adopted. I think that it's in the article.[7] The service bulletin only shows what to add on to that and is not a total.

My point is that these calculations should be done with and without the leap seconds to see what difference an approximate minute really makes.

Thanks for adding the reference to the relevant articles.

This could be of interest to programmers as well [8] I have used it and there are lots of comments inside the code itself.

Show the math then (68.184 / 60 / 60 / 24).round(5) that we get from that 'current number' of leap seconds because it changes from year to year. The Earth is slowing down and hence we have to add time on to compensate.

What could really be explained are the short cuts taken to calculate the equation of time [9] in this formula if it can be done without complicating it.

Now I've deviated from my initial topic but I don't want to have to start another one.

No mention is made for a term that could be useful. see https://wiki.riteme.site/wiki/Diurnal_arc To go with that we have http://stjarnhimlen.se/comp/ppcomp.html

Perhaps some of this will help someone get the wiki for Diurnal_arc better explained. — Preceding unsigned comment added by 2601:242:4000:7812:84CB:CCDA:1AA:53E9 (talk) 16:21, 23 November 2016 (UTC)[reply]

Here is a current data file.[10] Which I got from [11] reference (.1 Which happens to be a Ruby wrapper library for the SOFA C library. One more reference on this page but is about three months behind. It has been updated though since I last saw it.[12]

Also I noticed that all USNO links are down at this time. Does anybody know what's up with that? And this also effects a lot of info here in wiki...

References

Theory of the equation--a nitpicky problem?

[edit]

At the beginning of the section on the theory of the equation, its says: "The Earth rotates at an angular velocity of 15°/hour." While taking that as true actually gives the correct answer to the problem, it is in fact not correct. (It works because the starting point for the problem needs to be what this statement is meant to reflect, rather than what it actually says.
The Earth actually rotates one full turn on its axis in just a tad more than 23 hours, 56 minutes. So in fact, the Earth rotates at an angular velocity of about 14.955 degrees per hour. But of course, to go a full noon-to-noon or midnight-to midnight cycle, the Earth has to turn just shy of 4 minutes of arc farther.
But 15 degrees is actually the correct value to start from because what we are considering is not the actual rotating of the Earth, but the apparent path of the Sun seems to take, as it seems (from where we stand) to go around the Earth.
Perhaps a better statement would be, "On average, the Sun, in its apparent path around the Earth, appears to move 15 degrees per hour along that path." Or perhaps someone can recast that to improve it. Uporządnicki (talk) 15:20, 17 January 2017 (UTC)[reply]

You're assuming the coordinate system has to be inertial. Just make it one in which the line containing the Sun and the Earth is stationary and the stars are rotating about the Earth's axis at one revolution every 18³×7×773 = 31556952 seconds, close enough for government work. (This is exactly the average number of seconds per year, averaged over any consecutive 400 years of the Gregorian calendar, which is a significantly better approximation of reality than the Julian calendar.) Vaughan Pratt (talk) 04:44, 15 July 2017 (UTC)[reply]

The inverse problem

[edit]

I'm working with light data from tags on Atlantic bluefin tuna, which clearly show sunrise, sunset, and Julian day (to within a few seconds). I'd like to know the latitude and longitude of the animal at local noon of that day, at least on the real projective plane (on the sphere there are two solutions). Is there a published algorithm for this problem? It's not hard to derive but I'd prefer to use what's already known. Vaughan Pratt (talk) 04:44, 15 July 2017 (UTC)[reply]

Declination of the Sun and lambda?

[edit]

The "Declination of the Sun" section uses λ in its equation but does not describe what λ represents. I'm new to this and have no clue. 2600:1700:8D90:A2B0:213:72FF:FE32:59B5 (talk) 16:39, 3 September 2018 (UTC)[reply]

Symbols in the equation?

[edit]

Out of curiosity, what are the symbols used for the hour angle? A lower-case omega and ... a subscript zero? A subscript letter "o"? Something else? 2600:1700:8D90:A2B0:213:72FF:FE32:59B5 (talk) 16:31, 11 June 2019 (UTC)[reply]

A strange choice anyway. A more logical choice would be H, this is what you will find in the traditional books on spherical astronomy. AstroLynx (talk) 16:40, 11 June 2019 (UTC)[reply]

Perpetual day/night

[edit]

I've implemented it in code and it appears to be accurate, but upon testing I noticed some coordinates didn't work and realized those coordinates and times were for when there are no sunsets nor sunrises which results in being greater than 1 (for 24 hour night) or lesser than -1 (for 24 hour daylight) so attempting to get the value of will return an error. That section should make an observation for that — Preceding unsigned comment added by Jack mcslay (talkcontribs) 01:11, 13 December 2019 (UTC)[reply]

Equation of Time

[edit]

Considering the statement from the [Solar Transit] section:

EOT = is a simplified version of the equation of time. The coefficients are fractional day minutes.

The equation can be seen on Equation_of_time#Equation_of_time in a slightly different form:

Δtey = −2e sin M + y sin (2M + 2λp) = −7.659 sin M + 9.863 sin (2M + 3.5932) minutes

With

7.659 / 1440 ~ 0.0053 and 9.863 / 1440 ~ 0.0069

But these are each others negative, i.c.:

EOT = - Δtey

Is there something wrong with any of these pages?

"The coefficients are fractional day minutes." is incorrect; these are fractional days.

Mmjo (talk) 09:38, 9 April 2021 (UTC)[reply]

Accounting for atmospheric temperature and pressure effect on refraction?

[edit]

Are there any well-established formulae for accounting for the fact that higher atmospheric pressure and lower temperature increase the refraction of sun's rays, thus effectively hastening sunrise and delaying sunset? Irfan (talk) 02:29, 25 April 2022 (UTC)[reply]

Python code doesn't match with formulas in text

[edit]

For mean solar time, Python code uses: J_ = n + 0.0009 - l_w / 360.0. But the 0.0009 constant isn't in the Mean solar time formula in the article. 77.99.36.144 (talk) 09:43, 27 March 2024 (UTC)[reply]