issues getting GPS coordinates

Discussions about CSEntry
Post Reply
sjonabro

issues getting GPS coordinates

Post by sjonabro »

Hi everyone,
I know that this issue has been brought up many many times... but I am getting an error message every time I try to read the GPS coordinates into my samsung tab4.

The error message that I keep getting is: Message (-14) there was an error reading the gps coordinates

I have made sure to be in a place with strong signal, but that doesn't seem to be the problem.

These are a few of the things that I have tried:

1)--------------------------------------------------------------------------------------
gps(open);
if gps(read,5) then
errmsg("Latitude is %f, longitude is %f",gps(latitude),gps(longitude));
LAT=gps(latitude);
LONG=gps(longitude);

else
errmsg("GPS signal could not be acquired");

endif;
gps(close);

2)--------------------------------------------------------------------------------------
if gps(open) and gps(read, 5) then
LAT=gps(latitude);
LONG=gps(longitude);

else
errmsg("GPS signal could not be acquired");

endif;
gps(close);
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: issues getting GPS coordinates

Post by josh »

Try using a longer timeout in the call to read the gps. Five seconds is pretty short. Try gps(read, 60) to read for up to a minute.
sjonabro

Re: issues getting GPS coordinates

Post by sjonabro »

Thanks Josh, giving it a 60 second wait did the trick.
Aniseh
Post Reply