Re: [Flightgear-devel] Sun Azimuth [Was: licensing problems in SUSE Linux]

2005-08-08 Thread Steve Hosgood
On Mon, 2005-08-08 at 06:31, Durk Talsma wrote: On Sunday 07 August 2005 15:54, Erik Hofman wrote: Erik Hofman wrote: Is this correct or am I missing something? I just realized that you also need to adjust for day-of-year to compensate for the out-of-center rotation that causes long

Re: [Flightgear-devel] Sun Azimuth [Was: licensing problems in SUSE Linux]

2005-08-08 Thread Erik Hofman
Steve Hosgood wrote: Durk is quite right. It's non-trivial, but dealing with all these issues is not really a problem. I'm in the middle of doing it myself, but have just only just got back from a week on vacation. My main interest is in removing the use of Xearth's find the point on the planet

Re: [Flightgear-devel] Sun Azimuth [Was: licensing problems in SUSE Linux]

2005-08-08 Thread Erik Hofman
Erik Hofman wrote: But if you don't mind I'm still working on my own solution, I already have the code to compensate for lon and daylight saving time. Which is silly since daylight saving time isn't something nature provides for us, but which is man made. So that code is commented out again.

[Flightgear-devel] Sun Azimuth [Was: licensing problems in SUSE Linux]

2005-08-07 Thread Erik Hofman
Hi, I just tried an idea I had which was the following: * Unix time represents the current time in seconds since 00:00:00 UTC, January 1, 1970. * There are 86400 seconds in a day By combining these tow I can get the normalized UTC time-of-day (ranging from 0.0 .. 1.0) at lat/lon (0.0 , 0.0)

Re: [Flightgear-devel] Sun Azimuth [Was: licensing problems in SUSE Linux]

2005-08-07 Thread Erik Hofman
Erik Hofman wrote: Given that 12.00 UTC is high noon and 0.00 is midnight it is now easy to determine the sun azimuth for (0,0) by using the following formula: double azimuth = -90.0 + 180 * daytime. This should be: double azimuth = -90 + 180.0*(0.5 + 0.5*daytime); Erik

Re: [Flightgear-devel] Sun Azimuth [Was: licensing problems in SUSE Linux]

2005-08-07 Thread Erik Hofman
Erik Hofman wrote: Is this correct or am I missing something? I just realized that you also need to adjust for day-of-year to compensate for the out-of-center rotation that causes long days (and nights) for both polar areas. Erik ___

Re: [Flightgear-devel] Sun Azimuth [Was: licensing problems in SUSE Linux]

2005-08-07 Thread Durk Talsma
On Sunday 07 August 2005 15:54, Erik Hofman wrote: Erik Hofman wrote: Is this correct or am I missing something? I just realized that you also need to adjust for day-of-year to compensate for the out-of-center rotation that causes long days (and nights) for both polar areas. Erik Hi