sci.astro
[Top] [All Lists]

Re: Simple Calculation of Sunset Time required

Subject: Re: Simple Calculation of Sunset Time required
From: "TR Oltrogge" <troltrogge@xxxxxxxxxxx>
Date: Mon, 21 Apr 2008 13:07:31 GMT
Newsgroups: sci.astro, sci.astro.amateur, comp.home.automation


"Andrew Gabriel" <andrew@xxxxxxxxxxxxxxxxxxxx> wrote in message 
news:480bcdd8$0$638$5a6aecb4@xxxxxxxxxxxxxxxxxxxx
> In article <55eJj.14721$A87.12480@trnddc06>,
> "TR Oltrogge" <troltrogge@xxxxxxxxxxx> writes:
>>
>> Well, after working almost a month I've got a 'C' program that seems to 
>> get
>> within 6 minutes of the U.S. Navy's published times. I actually learned a
>> lot about vector operations. For now I'm going to put this thing to rest,
>> but here's the code...
>
> Could you post it again without losing all the line breaks
> in the second half?
>
> Thanks
> -- 
> Andrew

In the almost three weeks since I posted this 'C' program I cleaned it up a 
little but kept the same logic. I moved some code into subroutines since it 
was used several times from different places. Also, my first posting didn't 
include the source for the cross-product and dot-product of vectors since 
these were pulled from a VCTRSUPPORT.h file I had previously developed. I am 
still at a loss to figure out why I've got about 6 minutes of error (seems 
to vary from about 5 to 7 depending on the time of year) but am not willing 
"fudge" any of my geometrically accurate analysis to eliminate it.

Anyway, I've moved the tidied source code for the SUNSET program and its 
support VCTRSUPPORT header to my web site where you can download them. I 
wish I had a nice drawing to show the geometry that I'm solving, but it's 
all in my head! If you have questions I can give references to the web sites 
that showed me how to solve Kepler's ellipitical orbit calculation. My 
source files are located at...

mysite.verizon.net/troltrogge/sunset.c

and

mysite.verizon.net/troltrogge/VCTRSUPPORT.h




<Prev in Thread] Current Thread [Next in Thread>