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

James Bowlin bowlin at mindspring.com
Tue Dec 16 07:08:47 CET 2008


On Mon December 15 2008, Akarsh Simha wrote:
> 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.

-- 
HTH, James


More information about the Kstars-devel mailing list