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

Akarsh Simha akarshsimha at gmail.com
Tue Dec 16 06:48:33 CET 2008


Hi

I am unable to understand the code in SkyMap::fov(), which (currently)
reads as follows:

float SkyMap::fov() {
    float diagonalPixels = sqrt( (double)(width() * width() + height() * height()) );
    return diagonalPixels / ( 2 * Options::zoomFactor() * dms::DegToRad );

    //if ( width() >= height() )
    //  return 28.65*width()/Options::zoomFactor();
    //else
    //  return 28.65*height()/Options::zoomFactor();
}

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 reason for my interest in this function is that the convention
followed by SkyMap::fov() (and thus, by SkyMap::reportZoom()) is
different from that followed by KStars::slotSetZoom(), which causes
some confusion!

Regards
Akarsh


More information about the Kstars-devel mailing list