GPS

Discussions about CSEntry
Post Reply
hamouda1987
Posts: 9
Joined: June 14th, 2016, 7:16 am

GPS

Post by hamouda1987 »

Hello Good people

i am using this code for GPS

if gps(read, 60, 10) then // Read up to 60 seconds, try for 10m accuracy
errmsg("Latitude is %f, longitude is %f",gps(latitude),gps(longitude));
else
errmsg("GPS signal could not be acquired");
endif;


when i want to consult or modify a record the latitude and longitude change position and i don't want to have that..

how can i do to resolve that

thanks a lot

Kind regards
jfigueroa
Posts: 100
Joined: August 28th, 2014, 12:46 pm

Re: GPS

Post by jfigueroa »

Hi hamouda1987,

you can use the demode() function.
Some kind like:

Code: Select all

If demode() = 1 then
	if gps(read, 60, 10) then // Read up to 60 seconds, try for 10m accuracy
 		errmsg("Latitude is %f, longitude is %f",gps(latitude),gps(longitude));
 		LAT = gps(latitude);
		LON = gps(longitude);
	else
 		errmsg("GPS signal could not be acquired");
	endif;
endif;
That way you will only get the GPS position when adding a record, not in verify or modify mode.

If you don´t want to loose those values, it will be good if you store them on dictionary variables.
For ex:
LAT = gps(latitude);
LON = gps(longitude);

Regards.
hamouda1987
Posts: 9
Joined: June 14th, 2016, 7:16 am

Re: GPS

Post by hamouda1987 »

thank you So much M.jfigueroa
Post Reply