#include "products.h"
FUNCTION c_pgtest (model, order, points_q, start, nlines)
struct MODEL *model; struct ORDER *order; long points_q; long *start; long *nlines;
The AVHRR model structure for the image to be tested.
A standing order structure containing the information necessary to specify an area of interest and the requirements to be met before a product will be automatically generated. See c_pg2struct().
A queue of points defining the area covered by the image. This queue should have been created by c_pgpoints().
The starting line of the window to be included in the product. This will be set to zero if the image should not be processed or an error is encountered.
The number of lines to be included in the product. This will be set to negative one if the image should not be processed or an error is encountered.
To determine if an AVHRR archive image meets the requirements for a standing order the following tests are made: was the image acquired during the requested time period; is the image being processed within the specified number of days after acquisition; was the image acquired during the correct time of day (daytime or nighttime); is the image the correct data type (GAC, HRPT, LAC). If any of these tests fail, the image does not meet the requirements for the standing order and NOPROCESS is returned.
If the image meets all of these requirements, every point from points_q is tested to determine if it lies within the area of interest for the standing order. The minimum and maximum line numbers are calculated from each point that lies within the area, and these are used to calculate the starting line and the number of lines that should be processed for the standing order.
c_pgtest() returns
PROCESS --> Successful completion. The product should be produced for the standing order NOPROCESS --> Successful completion. The product should not be produced for the standing order E_FAIL --> Operation failed.