#include <gp.h>
#include <etx.h>
#include <etnames.h>
#include <terrno.h>
int gpetready(set, dosat, xfm)
SETP set;
int dosat;
ETXFORM xfm;
int gpetvready(var, dosat, xfm)
VARP var;
int dosat;
ETXFORM xfm;
int projready (proj, clat, clon, nl, ns,
width, height, angle, projparm, xfm)
int proj;
double clat, clon;
int nl, ns;
double width, height, angle;
double projparm;
ETXFORM xfm;
int orbready(sat, sensor, date, time1,
roll, pitch, yaw, tilt, xfm)
char *sat;
int sensor;
int date;
double time1, roll, pitch, yaw, tilt;
ETXFORM xfm;
int gpetstore(set, xfm)
SETP set;
ETXFORM xfm;
gpetready, gpetvready, projready, and orbready all set up earth transforms in ETXFORM xfm. gpetstore reads the xfm structure and stores the appropriate attributes in the output dataset.
gpetready reads earth transform dataset attributes for a given dataset and performs whatever setup is necessary to compute earth transforms.
If dosat is true, gpetready tries to set up sensor-based earth location calculations, even if the dataset's projection attribute is not SENSOR_PROJ. See etx.
If gpetready is unable to find all the attributes needed to parameterize the specified earth transform, an error occurs.
gpetvready call gpetready to set up the earth transform for the dataset containing a given variable. Then gpetvready adjusts the earth transform's affine mapping so it converts between map/sensor coords and variable (y,x) coords. An error occurs if the variable does not have (y,x) coords.
projready sets up map projection-based earth transform using application-passed arguments, rather than reading the analogous data from TeraScan datasets. proj specifies the map projection; valid projections are listed in include/etx.h. clat and clon specify the projection's center latitude and longitude in degrees north and east, respectively. nl and ns specify the number of map pixel lines and samples, respectively. width and height specify the pixel width and height in kilometers at the center of the map. angle specifies the angle of rotation in degrees; an angle of 90 degrees will turn north to east.
orbready sets up a sensor-based earth transform. orbready reads the appropriate satellite ephemeris and sensor geometry information as part of this setup process, based on the application-supplied values of satellite, sensor, and date. The files accessed are
refdata/satel/satellite/orbdata, and refdata/satel/satellite/sensor
Valid sensor codes are listed in include/etx.h. date is specified in standard TeraScan date format. time1 indicates the time of the first sensor scan line in TeraScan standard time format. roll, pitch, and yaw specify the satellite's attitude in degrees. tilt specifies the sensor's tilt angle, also in degrees.
All functions return 0 if successful. Otherwise, they return -1 and set terrno to the appropriate error code.
Invalid parameter passed to projready.
Missing dataset attributes needed to setup earth transform.
Earth transform affine mapping is singular and not invertible.
Unable to determine directory containing satellite ephemris and and sensor geometry reference datasets.
Unable to open sensor geometry reference dataset for given satellite and sensor.
Error encountered while reading sensor geometry dataset for given satellite and sensor.
Unable to open satellite ephemeris reference dataset for given satellite.
Error encountered while reading satellite ephemeris dataset for given satellite.
include/gp.h, include/etx.h, include/terrno.h, lib/libetx.a, refdata/satel/satellite/orbdata, refdata/satel/satellite/sensor
etcoords, etmisc, etnames, etnav, etxll etx
None.
Last Update: $Date: 1999/05/10 20:56:38 $