Problem with GPS Function
Posted: June 11th, 2018, 12:49 am
Dear Support,
I am currently in the field and during testing the code to a gps function was running well but now it is not. Even when GPS is on, on the phone, the error message still shows up that "Please turn on the GPS", yet the GPS is on. My code is as below. Kindly help.
PROC GPS_CHOOSE
if $ = 2 then
skip to LON_E;
elseif $ = 1 and gps(open) = 0 then
errmsg("Please turn on the GPS");
reenter;
elseif $ = 1 and gps(open) and gps(read, 120) then
LON_E = gps(longitude);
LAT_S = gps(latitude);
ELEVATION = gps(altitude);
else errmsg("GPS signal could not be acquired")
select("Choose another Option", $)
endif;
gps(close);
I am currently in the field and during testing the code to a gps function was running well but now it is not. Even when GPS is on, on the phone, the error message still shows up that "Please turn on the GPS", yet the GPS is on. My code is as below. Kindly help.
PROC GPS_CHOOSE
if $ = 2 then
skip to LON_E;
elseif $ = 1 and gps(open) = 0 then
errmsg("Please turn on the GPS");
reenter;
elseif $ = 1 and gps(open) and gps(read, 120) then
LON_E = gps(longitude);
LAT_S = gps(latitude);
ELEVATION = gps(altitude);
else errmsg("GPS signal could not be acquired")
select("Choose another Option", $)
endif;
gps(close);