5 years, 3 months ago.

GPS coordinates

Hi guys;

I need to get the coordinates with a GPS, using the NMEA standart. I use the "Hello World" example and I got the TIME information, but there are not any returns about longitude and latitude. The fact my GPS device being in a closed place, could difficult it to get the coordinates?


2 Answers

5 years, 3 months ago.


What platform are you using and example?

What antenna are you using, is it a circular polarised antenna?

And yes being inside can definitely impact the GPS, especially in an office.


Andrea, team mbed

5 years, 3 months ago.

Until they get a lock on to enough satellites most GPS receivers will give a time (which may be wrong) but leave the latitude and longitude fields of the output empty.

Most NMEA sequences contain a field indicating if the data is valid or not. e.g. GGA contains a fix type which is 0 for invalid and 1,2,4 or 5 for various types of GPS position fix. It also gives the number of satellites used. If the fix is shown as invalid none of the data (including the time) should be trusted.

Depending upon the GPS receiver used, the antenna used and the way the building is constructed GPS will either give you a very inaccurate position or no position at all when indoors. If you want to test GPS indoors you either need a simulator or an antenna mounted on the roof. You can sometimes get away with an antenna hanging out the window but it won't work very well, again it depends a lot on the building and antenna.