[Kstars-devel] Prakash's KSalmanach

Akarsh Simha akarshsimha at gmail.com
Mon May 25 15:14:18 CEST 2009


On Mon, May 25, 2009 at 03:34:25PM +0400, Khudyakov Alexey wrote:
> On Saturday 23 May 2009 22:01:20 Akarsh Simha wrote:
> > > This way calculated twilights are longer than real. Moreover solution
> > > always exist even if sun never goes below 6/12/18 degrees.
> >
> > That's right. I suggested the linear interpolation, figuring that the
> > error will be within 1 minute of time. I requested Prakash to indicate
> > that in the comments. I don't know if he's done that.
> >
> Hmm... for what latitudes? In high latitudes answer will be anything but 
> accurate. Border case: Sun's low transit is at about -3 degrees. There is only 
> civil twilight, although linear extrapolation will give answer for both 
> nautical and astronomical twilights.

Hmm... you're right. I didn't think of that! I live near the equator,
so my intuition is wired for that! Yes, Prakash should fix that code
before it is released.

> > > Right way to do this is to find when Sun goes above/below -6/12/18 deg.
> > > as done in SkyObject::riseSetTime. However it will require a lot of
> > > changes to that function.
> >
> > Hmm... Maybe we should correct that and make it as accurate as KStars
> > claims to be. Prakash, would you want to do that? Some
> > code-duplication might be okay. If we really want to avoid code
> > duplication, I guess we should have a method to compute the fine
> > position given an approximate position.
> >
> I think it's better be implemented in SkyObject class. This would require 
> extensive refactoring. And duplicate code always could be removed. 

You mean that you recommend that we implement a

KStarsDateTime SkyObject::timeAtAlt( double altitude, KStarsDateTime &now, bool refract, bool &circumpolar )

That would first calculate a first approximation through the cosine
rule, and then iterate to find the exact time of reaching altitude
(required for the Sun and planets).

Regards
Akarsh


More information about the Kstars-devel mailing list