spectraphilic / wasp_sketches

Waspmote sketches develoded by our group
1 stars 0 forks source link

GPS: wait 10sec after signal and require 4 satellites minimum for recording position #65

Open ArcticSnow opened 5 years ago

ArcticSnow commented 5 years ago

To ensure a certain quality measurement for the position, wait 10 second after the GPS.waitforsignal() and check if the number of satellites is more or equal to 4, if yes, then record and move on, if not, wait another 10s, check number of satellites, if yes, record and move on, if not exit, and get time

\\ to get the number of satellites:

USB.println(F("Satellites"));
USB.println(GPS.satellites);
int sat = atoi(GPS.satellites);
USB.println(sat);
USB.println(sat>3);

Also see if PDOP and VDOP can be recorded

GPS.PDOPAccuracy()
GPS.VDOPAccuracy()

more documentation here

jdavid commented 5 years ago

In documentation http://www.libelium.com/downloads/documentation/waspmote-gps-programming_guide.pdf section 5.10 (page 17), there are 4 fields related to accuracy:

GPS.accuracy → Horizontal dilution of precision in GGA sentence
GPS.PDOPAccuracy → Position dilution of precision in GSA sentence
GPS.HDOPAccuracy → Horizontal dilution of precision in GSA sentence
GPS.VDOPAccuracy→ Vertical dilution of precision in GSA sentence

From the same documentation page 6 this is the description of the GGA and GSA sentences:

NMEA GGA: provides location data and an indicator of data accuracy
NMEA GSA: provides the status of the satellites the GPS receiver has been connected to

Which accuracies should be recorded? Should we sent them to the server?

johnhulth commented 5 years ago

I had a quick chat with Trond (our GPS expert) about this. The best approach should be to wait 10 sec after the first fix, that should assure that most of the visibel satellites are used to solve the position. Usually more then 4 (at least 5). This should give a good position.

Alternatively we could use PDOP<2. eg. https://the5krunner.com/2018/07/18/gps-accuracy-hdop-pdop-gdop-multipath-the-atmosphere/ But this number depends on satellite constellation, which could be tricky far north since most GPS-satellites are closer to the ekvator.

I suggest the approach with at least 5 satellites and wait 10+10+10

Record number of satellites and PDOP, that could be useful information for further tests.

jdavid commented 5 years ago

changes done but could not verify, I'm not getting signal now

johnhulth commented 4 years ago

This works great for the GPS units.

Is this also implemented for the 4G gps? Seams like i get worse accuracy for the 4G gps

johnhulth commented 4 years ago

Yes,this should be implemented for 4G gps aswell.

johnhulth commented 4 years ago

make sense to implement minimum number of satellites for 4G gps as well. _numSatellites are accessible, but not pdop