I'm currently building a GPS logging geiger counter, using a raspberry pi zero w and a Ublox Neo 6M GPS module.
Connected via serial, not USB
Interfacing is happening fine, but I have a weird issue that I cannot find any reference to anywhere.
My waypoints are "clustering", and by that I mean that when I log points, they don't change locations from the first fix of that session
even when i move kilometers from that point, and it seeing up to 9 satellites at times.
The memory battery on the board is shot and I have spares to change that over later.
I'm using pynmea2 to glean the gps data from the NMEA serial data at 9600 baud.
Originally I had though that using the latitude output gave me a decimal degrees output
however when I saw this anomaly I realized that maybe I was just getting the degrees component as a decimal, and not the rest of the location.
I would have to move a very long way to see the location change
So I used the dm_to_sd function of pynmea2 to translate it to a float for decimal degrees.
on the surface and for the first few static points this was spot on correct.
so I went for a walk around the block, and all my coords log within a 20sq/m area - any identical in reading.
despite the fact that I walked almost 1000 meters.
What do you guys this? is this a programming issue, a hardware problem, or an idiot (Me) problem?
I'm using python to do the logging and here;s the code:
Code: Select all
import threading import time import os import serial import pynmea2 def parseGPS(str): if str.find('GGA') > 0: msg = pynmea2.parse(str) print "Timestamp: %s -- Lat: %s %s -- Lon: %s %s -- Altitude: %s %s" % (msg.timestamp,msg.lat,msg.lat_dir,msg.lon,msg.lon_dir,msg.altitude,msg.altitude_units) print (msg.altitude_units) serialPort = serial.Serial("/dev/ttyAMA0", 9600, timeout=0.5) while True: str = serialPort.readline() parseGPS(str)