Need help calculating equation of time

2011-10-20 Thread Dwayne Henderson
Hello!

At https://gist.github.com/1278755 - is anybody able to tell what's wrong
with my equation of time calculation?

Thank you!

--Dwayne
---
https://lists.uni-koeln.de/mailman/listinfo/sundial



Re: Approximating solar coordinates

2011-10-19 Thread Dwayne Henderson
Ricardo,

I'm not sure what you mean, but here's my program:

https://gist.github.com/1278755

I've managed to identify all the numbers (hopefully), but the calculation
itself is not yet correct.

--Dwayne

On Wed, Oct 19, 2011 at 6:48 PM, Ricardo Cernic rncer...@uol.com.br wrote:

 Hi Dwayne,

 It has been a long time ago when I wrote my last program, but as far as I
 remember you usually can define the precision of a variable (int, long or
 float, double). Have you consider it? Usually these kind of calculation use
 / generate huge numbers.

 BR,

 Ricardo
 São Paulo - Brazil
 http://relogiosdesol.blogspot.com


 On 18/10/2011, at 16:48, Dwayne Henderson wrote:

  Oh, about the unladen swallow thing. I'm not sure if the dude who told me
 to put that there was just joking:
 
  http://www.youtube.com/watch?v=y2R3FvS4xr4
 
  --Dwayne
 
  On Tue, Oct 18, 2011 at 8:28 PM, Dwayne Henderson 
 its.code.in.h...@gmail.com wrote:
  Thanks a lot Andrew!
 
  I worked in your numbers. The calculation is still a bit off though:
 
  1) Failure:
  test_equation_of_time(TestSolarCalculations):
  Expected 2011-10-01 10:23:00 UTC, not 2011-01-06 01:08:11 UTC.
 
  2) Failure:
  test_suns_declination(TestSolarCalculations):
  Expected -3.18, not -3.2087920449753007.
 
  If you have any thoughts about that, or any more suggestions, please let
 me know.
 
  https://gist.github.com/1278755
 
  Thanks again man.
 
  --Dwayne
 
 
  On Tue, Oct 18, 2011 at 4:46 PM, Andrew James 
 andrew.ja...@securetogether.co.uk wrote:
  Dwayne
 
 
 
  I’ll let others who know more comment further, but the link you have
 found names some of the numbers from which their meaning should be clearer
 (?), though I don’t think the name for 0.020 is at all helpful ...
 
 
 
  Also
 
  360 / 0.98560028 = 365.259636 = anomalistic year in days
 
  360 / 0.98564736 = 365.2421897 = mean tropical year in days
 
 
 
  So the numbers 0.98560028 and 0.98564736 convert days to fractions of one
 of those kinds of years in degrees.
 
 
 
  0.00014 is more or less half of 0.01671 squared which I think comes from
 the approximation to an ellipse by periodic terms.
 
 
 
  Hope this is some help.
 
 
 
  Andrew James
 
 
 
  From: sundial-boun...@uni-koeln.de [mailto:sundial-boun...@uni-koeln.de]
 On Behalf Of Dwayne Henderson
  Sent: 12 October 2011 12:30
  To: sundial@uni-koeln.de
  Subject: Approximating solar coordinates
 
 
 
  Greetings!
 
  At the U.S. Naval Observatory's algorithm for calculating solar
 coordinates - would anybody happen to know what the numbers 357.529,
 280.459, 0.98560028, 0.98564736, 1.915, 0.020, 1.00014, 0.01671, 0.00014,
 23.439 and 0.0036 represent?
 
  I've done all the Googling I can, but this is the closest I've gotten:
 
  https://gist.github.com/1278755
 
  Much obliged!
 
  --Dwayne
 
  This message has been scanned for viruses by MailControl.
 
 
 
  Secure Meters (UK) Ltd. is a registered company in England: 2199653
  Secure House, Moorside Road, Winchester, SO23 7RX
 
  This correspondence is confidential and solely for the intended
 recipient(s). If you are not the intended recipient, you must not use,
 disclose, copy, distribute or retain this message or
  any part of it. If you are not the intended recipient please delete this
 correspondence from your system and notify the sender immediately.
 
 
 
  ---
  https://lists.uni-koeln.de/mailman/listinfo/sundial
 


---
https://lists.uni-koeln.de/mailman/listinfo/sundial



Approximating solar coordinates

2011-10-18 Thread Dwayne Henderson
Greetings!

At the U.S. Naval Observatory's algorithm for calculating solar
coordinateshttp://aa.usno.navy.mil/faq/docs/SunApprox.php- would
anybody happen to know what the numbers 357.529, 280.459,
0.98560028, 0.98564736, 1.915, 0.020, 1.00014, 0.01671, 0.00014, 23.439 and
0.0036 represent?

I've done all the Googling I can, but this is the closest I've gotten:

https://gist.github.com/1278755

Much obliged!

--Dwayne
---
https://lists.uni-koeln.de/mailman/listinfo/sundial



Re: Approximating solar coordinates

2011-10-18 Thread Dwayne Henderson
Oh, about the unladen swallow thing. I'm not sure if the dude who told me to
put that there was just joking:

http://www.youtube.com/watch?v=y2R3FvS4xr4

--Dwayne

On Tue, Oct 18, 2011 at 8:28 PM, Dwayne Henderson 
its.code.in.h...@gmail.com wrote:

 Thanks a lot Andrew!

 I worked in your numbers. The calculation is still a bit off though:

 1) Failure:
 test_equation_of_time(TestSolarCalculations):
 Expected 2011-10-01 10:23:00 UTC, not 2011-01-06 01:08:11 UTC.

 2) Failure:
 test_suns_declination(TestSolarCalculations):
 Expected -3.18, not -3.2087920449753007.

 If you have any thoughts about that, or any more suggestions, please let me
 know.

 https://gist.github.com/1278755

 Thanks again man.

 --Dwayne


 On Tue, Oct 18, 2011 at 4:46 PM, Andrew James 
 andrew.ja...@securetogether.co.uk wrote:

  Dwayne

 ** **

 I’ll let others who know more comment further, but the link you have found
 names some of the numbers from which their meaning should be clearer (?),
 though I don’t think the name for 0.020 is at all helpful ...

 ** **

 Also 

 360 / 0.98560028 = 365.259636 = anomalistic year in days

 360 / 0.98564736 = 365.2421897 = mean tropical year in days

 ** **

 So the numbers 0.98560028 and 0.98564736 convert days to fractions of one
 of those kinds of years in degrees.

 ** **

 0.00014 is more or less half of 0.01671 squared which I *think* comes
 from the approximation to an ellipse by periodic terms.

 ** **

 Hope this is some help.

 ** **

 Andrew James

 ** **
  --

 *From:* sundial-boun...@uni-koeln.de [mailto:sundial-boun...@uni-koeln.de]
 *On Behalf Of *Dwayne Henderson
 *Sent:* 12 October 2011 12:30
 *To:* sundial@uni-koeln.de
 *Subject:* Approximating solar coordinates

 ** **

 Greetings!

 At the U.S. Naval Observatory's algorithm for calculating solar
 coordinates http://aa.usno.navy.mil/faq/docs/SunApprox.php - would
 anybody happen to know what the numbers 357.529, 280.459, 0.98560028,
 0.98564736, 1.915, 0.020, 1.00014, 0.01671, 0.00014, 23.439 and 0.0036
 represent?

 I've done all the Googling I can, but this is the closest I've gotten:

 https://gist.github.com/1278755

 Much obliged!

 --Dwayne 

 This message has been scanned for viruses by 
 MailControlhttp://www.mailcontrol.com/
 .


 *Secure Meters (UK) Ltd. is a registered company in England: 2199653*
 Secure House, **Moorside Road, Winchester**, **SO23 7RX

 This correspondence is confidential and solely for the intended
 recipient(s). If you are not the intended recipient, you must not use,
 disclose, copy, distribute or retain this message or
 any part of it. If you are not the intended recipient please delete this
 correspondence from your system and notify the sender immediately.**



---
https://lists.uni-koeln.de/mailman/listinfo/sundial