[Kstars-devel] Prakash's KSalmanach

Khudyakov Alexey alexey.skladnoy at gmail.com
Mon May 25 21:14:16 CEST 2009


On Monday 25 of May 2009 17:14:18 Akarsh Simha wrote:
> > > 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).
>
This is one way to do it. I do not know the good way to do yet. I think 
SkyObject's code can be simplified a lot and after that it will be much clearer 
how this feature could be implemented. 

--
  Khudyakov Alexey


More information about the Kstars-devel mailing list