#include "terrno.h" #include "envnames.h" #include "uif.h" int getsiteloc(rlat, rlon) double *rlat, *rlon; int getsiteprms(latname, lonname, deflag, rlat, rlon) char *latname, *lonname; int deflag; double *rlat, *rlon;
These two functions provide a means of retrieving latitude and longitude parameter values for a particular site location.
getsiteloc gets the values of latitude and longitude that are in the last_location file and returns them in rlat and rlon.
getsiteprms queries the user for latitude and longitude values, and in general, should be used in conjunction with the command processing function cmdform. The latitude and longitude queries are processed in sequence.
Function arguments are defined as follows:
lat/lon parameter names, length no greater than MAX_PARAM_NAME.
default flag, either NO_DEFAULT, HAS_DEFAULT or OPTIONAL.
default values when deflag = HAS_DEFAULT and the returned values in all case.
All of the above functions return 0 if successful. Otherwise they return -1 and set terrno to the appropriate error code.
One likely use of the above two functions in an application program requiring site-like latitude and longitude values is to call getsiteloc first to obtain what are likely the most frequently used latitude and longitude values for a particular site. Then call getsiteprms to have the user confirm or change these values.
last_location, terascan, sitelist include/terrno.h, include/envnames.h, include/uif.h, lib/libapp.a
cmdform, prmyn, prmlat, prmlon, prmnames, sitelocation, terascan, formats, uif
If getsiteloc cannot retrieve the latitude and longitude values from the last_location file, it will attempt to retrieve them from environment variables. The use of latitude and longitude environment variables are obsolete, see include/envnames.h.
Last Update: $Date: 1999/05/10 20:56:40 $