Page 1 of 1

Problem with GPS Function

Posted: June 11th, 2018, 12:49 am
by chalasa
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);

Re: Problem with GPS Function

Posted: June 11th, 2018, 10:30 am
by josh
The logic looks correct. It could be a problem with the phone itself. Try rebooting the phone.

Re: Problem with GPS Function

Posted: June 13th, 2018, 12:13 pm
by chalasa
Yes seems the problem is the phone.