[Kstars-devel] The logic behind SkyMap::fov()

Akarsh Simha akarshsimha at gmail.com
Tue Dec 16 07:41:23 CET 2008


> > Why is it that fov() has been defined to be half the angle
> > corresponding to the diagonal of the screen? Shouldn't we just define
> > it as the angle corresponding to the height() (or rather, the smaller
> > of width() and height()) of the screen?
> 
> The fov() is used in skymapcomposite.cpp to figure out the radius needed
> for the spatial index aperture:
> 
>     // prepare the aperture
>     float radius = map->fov();
>     if ( radius > 90.0 ) radius = 90.0;
> 
>     [...]
> 
>     SkyPoint* focus = map->focus();
>     m_skyMesh->aperture( focus, radius + 1.0, DRAW_BUF );
> 
> This is why fov() returns the half angle of the diameter.  This is the 
> minimum radius needed for the spatial index.  If it makes sense to 
> change the meaning of fov() then we just need a different function that
> returns the what fov() currently returns.  Perhaps we could rename fov()
> to screen_aperture() and then create a new fov() function that returns
> a value that suits your purposes better.

Hi James,

That makes sense. Thanks for the explanation.

Regards
Akarsh



More information about the Kstars-devel mailing list