findrange - Find the line numbers corresponding to the latitude range of an image

SYNTAX

FUNCTION findrange(lat1, lat2, startln, stopln, quadnum, areaopt, numfound, model)

    double	 lat1;
    double	 lat2;
    long	 startln[2];
    long	 stopln[2];
    long	 quadnum;
    long	 areaopt;
    long	 *numfound;
    struct MODEL *model;

PARAMETERS

lat1 (double, input)

The starting latitude defining the specified range.

lat2 (double, input)

The ending latitude defining the specified range.

startln (long[2], output)

The line corresponding to the starting latitude. The second element will be set only if areaopt = 2 and the specified latitude range occurs twice in the image.

stopln (long[2], output)

The line corresponding to the ending latitude. The second element will be set only if areaopt = 2 and the specified latitude range occurs twice in the image.

quadnum (long, input)

Quadrant number. See the AVHRRIN application for a detailed description of the quadrant numbers:

     = 1:	Quadrant 1
     = 2:	Quadrant 2
     = 3:	Quadrant 3
     = 4:	Quadrant 4
     = 5:	Any quadrant
     = 6:	North pole
     = 7:	South pole
     = 8:	Both poles

areaopt (long, input)

Areas option:

     = 0:	Return the first area found.
     = 1:	Return the second area found.
     = 2:	Return both areas found.

numfound (long *, output)

The number of areas found.

model (struct MODEL *, input)

Model and orbital information.

DESCRIPTION

Spherical trigonometry is used to find the location of the desired latitude in relation to the satellite's location at a given time in the scene. This yields an approximate line number, which is then refined to find the exact latitude. Note that the scan lines are not parallel to the lines of latitude, and are consequently oriented differently depending if the pass is ascending or descending.

RETURN VALUE

findrange() returns

    E_SUCC --> Successful completion
    E_FAIL --> Operation failed