Giter Club home page Giter Club logo

micropygps's Introduction

micropyGPS

Overview

micropyGPS is a full featured GPS NMEA sentence parser for use with MicroPython and the PyBoard embedded platform. It's also fully compatible with Python 3.x

Features:

  • Parses and verifies most of the important NMEA-0183 output messages into easily handled data structures
  • Provides helper methods to interpret, present, log, and manipulate the GPS data
  • Written in pure Python 3.x using only the standard libraries available in Micropython
  • Implemented as a single class within a single file for easy integration into an embedded project
  • Parser written with a serial UART data source in mind; works on a single character at a time with robust error handling for noisy embedded environments
  • Modeled after the great TinyGPS Arduino library

Install / uninstall

Install by cloning from git and running install via setuptools.

git clone https://github.com/inmcm/micropyGPS.git
python setup.py install

Or install directly from github using pip.

pip install git+https://github.com/inmcm/micropyGPS.git

To uninstall use the following pip command.

pip uninstall micropyGPS

Basic Usage

micropyGPS is easy to use: copy micropyGPS.py into your project directory and import the MicropyGPS class into your script. From there, just create a new GPS object and start feeding it data using the update() method. After you've feed it an entire valid sentence, it will return the sentence type and the internal GPS attributes will be updated. The example below shows the parsing of an RMC sentence and the object returns a tuple with the current latitude data

>>> from micropyGPS import MicropyGPS
>>> my_gps = MicropyGPS()
>>> my_sentence = '$GPRMC,081836,A,3751.65,S,14507.36,E,000.0,360.0,130998,011.3,E*62'
>>> for x in my_sentence:
...     my_gps.update(x)
...
'GPRMC'
>>> my_gps.latitude
(37, 51.65, 'S')

The object will continue to accept new characters and parse sentences for as long as it exists. Each type of sentence parsed can update different internal attributes in your GPS object.

If you have pytest installed, running it with the test_micropyGPS.py script will parse a number of example sentences of various types and test the various parsing, logging, and printing mechanics.

$ pytest -svvv test_micropyGPS.py

Currently Supported Sentences

  • GPRMC
  • GLRMC
  • GNRMC
  • GPGLL
  • GLGLL
  • GNGLL
  • GPGGA
  • GLGGA
  • GNGGA
  • GPVTG
  • GLVTG
  • GNVTG
  • GPGSA
  • GLGSA
  • GNGSA
  • GPGSV
  • GLGSV

Position Data

Data successfully parsed from valid sentences is stored in easily accessible object variables. Data with multiple components (like latitude and longitude) is stored in tuples.

## Latitude is 37° 51.65' S
>>> my_gps.latitude
(37, 51.65, 'S')
# Longitude is 145° 7.36' E
>>> my_gps.longitude
(145, 7.36, 'E')
# Course is 54.7°
>>> my_gps.course
54.7
# Altitude is 280.2 meters
>>> my_gps.altitude
280.2
# Distance from ideal geoid is -34 meters
>>> my_gps.geoid_height
-34.0

Current speed is stored in a tuple of values representing knots, miles per hours and kilometers per hour

>>> my_gps.speed
(5.5, 6.3305, 10.186)

Time and Date

The current UTC time is stored (hours,minutes,seconds)

>>> my_gps.timestamp
(8, 18, 36.0)
>>> my_gps.date
(22, 9, 05)

The timezone can be automatically adjusted for using the by setting the local_offset when you create the object or anytime after. Setting it to -5 means you are on Eastern Standard time in the United States.

>>> my_gps = MicropyGPS(-5)
>>> my_gps.local_offset
-5
# Update With Timestamp Sentence Data...
>>> my_gps.timestamp
(3, 18, 36.0)

The current UTC date is stored (day,month,year). NOTE: The date is not currently adjusted to match the timezone set in local_offset.

>>> my_gps.date
(22, 9, 05)

Satellite Data

Signal quality and individual satellite information is collected from GSV, GSA, and GGA sentences and made available in the following variables.

>>> my_gps.satellites_in_use
7
>>> my_gps.satellites_used
[7, 2, 26, 27, 9, 4, 15]
# Fix types can be: 1 = no fix, 2 = 2D fix, 3 = 3D fix
>>> my_gps.fix_type
3
# Dilution of Precision (DOP) values close to 1.0 indicate excellent quality position data
>>> my_gps.hdop  
1.0
>>> my_gps.vdop
1.5
>>> my_gps.pdop
1.8

The satellite_data_updated() method should be check to be True before trying to read out individual satellite data. This ensures all related GSV sentences are parsed and satellite info is complete

>>> my_gps.satellite_data_updated()
True
# Satellite data is a dict where the key is the satellite number and the value pair is a tuple containing (Elevation, Azimuth, SNR (if available))
>>> my_gps.satellite_data 
{19: (5, 273, None), 32: (5, 303, None), 4: (22, 312, 26), 11: (9, 315, 16), 12: (19, 88, 23), 14: (64, 296, 22), 15: (2, 73, None), 18: (54, 114, 21), 51: (40, 212, None), 21: (16, 175, None), 22: (81, 349, 25), 24: (30, 47, 22), 25: (17, 127, 18), 31: (22, 204, None)}
# Returns just the satellite PRNs visible
>>> my_gps.satellites_visible()
[19, 32, 4, 11, 12, 14, 15, 18, 51, 21, 22, 24, 25, 31]

GPS Statistics

While parsing sentences, the MicropyGPS object tracks the number of number of parsed sentences as well as the number of CRC failures. parsed_sentences are those sentences that passed the base sentence catcher with clean CRCs. clean_sentences refers to the number of sentences parsed by their specific function successfully.

>>> my_gps.parsed_sentences
14
>>> my_gps.clean_sentences
14
>>> my_gps.crc_fails
0

The amount of real time passed since the last sentence with valid fix data was parse is also made available. NOTE: On the pyBoard, this value is returned in milliseconds while on Unix/Windows it is returned in seconds.

# Assume running on pyBoard
>>> my_gps.time_since_fix()
3456

Logging

micropyGPS currently can do very basic automatic logging of raw NMEA sentence data to a file. Any valid ASCII character passed into the parser, while the logging is enabled, is logged to a target file. This is useful if processing GPS sentences, but want to save the collected data for archive or further analysis. Due to the relative size of the log files, it's highly recommended to use an SD card as your storage medium as opposed to the emulated memory on the STM32 micro. All logging methods return a boolean if the operation succeeded or not.

# Logging can be started at any time with the start_logging()
>>> my_gps.start_logging('log.txt')
True
# Arbitrary strings can be written into the log file with write_log() method
>>> my_gps.write_log('Some note for the log file')
True
# Stop logging and close the log file with stop_logging()
>>> my_gps.stop_logging()
True

Prettier Printing

Several functions are included that allow for GPS data to be expressed in nicer formats than tuples and ints.

>>> my_gps.latitude_string()
"41° 24.8963' N"
>>> my_gps.longitude_string()
"81° 51.6838' W"
>>> my_gps.speed_string('kph')
'10.186 km/h'
>>> my_gps.speed_string('mph')
'6.3305 mph'
my_gps.speed_string('knot')
'5.5 knots'
# Nearest compass point based on current course
my_gps.compass_direction()
'NE'
>>> my_gps.date_string('long')
'September 13th, 2098'
# Note the correct century should be provided for GPS data taken in the 1900s
>>> my_gps.date_string('long','19')
'September 13th, 1998'
>>> my_gps.date_string('s_mdy')
'09/13/98'
>>> my_gps.date_string('s_dmy')
'13/09/98'

Pyboard Usage

Test scripts are included to help get started with using micropyGPS on the pyboard platform. These scripts can be copied over to the pyboards internal memory or placed on the SD Card. Make sure, when running them on the pyboard, to rename script you're using to main.py or update boot.py with the name of script you wish to run.

  • uart_test.py is a simple UART echo program to test if both your GPS is hooked up and UART is configured correctly. Some of the standard NMEA sentences should print out once a second (or faster depending on your GPS update rate) if everything is OK
  • sentence_test.py will try and parse all incoming characters from the UART. This script requires micropyGPS.py be present in the same area of storage (SD Card or internal). Whenever a set of characters comprising a valid sentence is received and parsed, the script will print the type of sentence.
  • GPIO_interrupt_updater.py is an example of how to use external interrupt to trigger an update of GPS data. In this case, a periodic signal (1Hz GPS output) is attached to pin X8 causing a mass parsing event every second.

Adjusting the baud rate and update rate of the receiver can be easily accomplished with my companion MTK_command script

An example of how to hookup the pyboard to the Adafruit Ultimate GPS Breakout (minus the PPS signal needed in the external interrupt example) is shown below.

hookup

ESP32

You can follow the setup instructions for the pyboard. The only difference is, that you shoud use micropyGPS as a frozen module. Otherwise there will be exceptions, because there is not enough heap space available.

Other Platforms

As mentioned above, micropyGPS also runs on Python3.x (that's where most of the development was done!). This is useful for testing code or just parsing existing log files.

Beyond the pyBoard and ESP32, micropyGPS should run on other embedded platforms that have an Python3 interpreter such as the Raspberry Pi and BeagleBone boards. These other devices are currently untested.

micropygps's People

Contributors

bsdz avatar ckuethe avatar dwarbritton avatar hagre avatar inmcm avatar kebwi avatar mmedvedmtd avatar peterhinch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

micropygps's Issues

New Feature

It would be useful to add the possibility to determine the distance with the latitude and longitude collected by the gps.

SENTENCE_LIMIT = 76

I am using the NMEA TCP/IP stream of an "emid reach M+" module with this library and had an issue with the SENTENCE_LIMIT of 76. In my case it has to be at least 81 (suggsest 90 to be save).

Example:
$GNGGA,223832.20,ddmm.mmmmmmm,N,dddmm.mmmmmmm,W,1,07,1.2,298.903,M,-30.571,M,0.0,*61\r\n

IndexError, possibly from incomplete GPS data

I have received IndexError in micropyGPS.py in gpgsa(). I made a clunky temporary fix by catching IndexError in 2 places. I am running micropyGPS on a Tiny 2040, using MicroPython rp2-pico-20210202-v1.14.

End of GPVTG not detected

Code from sentence_test.py from the repo pasted directly into PyBoard v1.1 REPL connected to a GT-U7 module:

from pyb import UART
from micropyGPS import MicropyGPS
uart = UART(3, 9600)
my_gps = MicropyGPS()
while True:
    if uart.any():
        stat = my_gps.update(chr(uart.readchar())) # Note the conversion to to chr, UART outputs ints normally
        if stat:
            print(stat)
            stat = None

Output:

GPRMC
GPGGA
GPGSA
GPGSV
GPGSV
GPGSV
GPGLL
GPRMC
GPGGA
GPGSA
GPGSV
GPGSV
GPGSV

It's hard to "see what isn't there", so one doesn't immediately realize there is a problem above, but note that lack of GPVTG detections. Of course, one might simply theorize there are no GPVTG sentences. But now look as this modified code which will expose the invisible missing data.

Code pasted into PyBoard v1.1 REPL connected to a GT-U7 module:

from pyb import UART
from micropyGPS import MicropyGPS
uart = UART(3, 9600)
gps = MicropyGPS()
while True:
	if uart.any():
		c = chr(uart.readchar())
		print(c, end='')
		stat = gps.update(c) # Note the conversion to chr, UART outputs ints normally
		if stat:
			print()
			print('    Sentence completed: ' + stat, end='')
			stat = None

And observe the output, which shows the GPVTG sentences on the wire but failing to trigger a end-of-sentence event:

$GPRMC,025631.00,V,,,,,,,080421,,,N*71
    Sentence completed: GPRMC
$GPVTG,,,,,,,,,N*30
$GPGGA,025631.00,,,,,0,04,25.50,,,,,,*63
    Sentence completed: GPGGA
$GPGSA,A,1,29,05,25,20,,,,,,,,,27.96,25.50,11.49*3E
    Sentence completed: GPGSA
$GPGSV,3,1,11,02,05,077,,05,47,061,22,13,14,101,24,15,15,137,*79
    Sentence completed: GPGSV
$GPGSV,3,2,11,16,16,321,,18,53,266,13,20,48,197,14,23,20,203,21*72
    Sentence completed: GPGSV
$GPGSV,3,3,11,25,22,190,16,26,33,299,08,29,79,111,21*48
    Sentence completed: GPGSV
$GPGLL,,,,,025631.00,V,N*49
    Sentence completed: GPGLL
$GPRMC,025632.00,V,,,,,,,080421,,,N*72
    Sentence completed: GPRMC
$GPVTG,,,,,,,,,N*30
$GPGGA,025632.00,,,,,0,04,25.44,,,,,,*65
    Sentence completed: GPGGA
$GPGSA,A,1,29,05,25,20,,,,,,,,,27.90,25.44,11.45*31
    Sentence completed: GPGSA
$GPGSV,3,1,11,02,05,077,,05,47,061,18,13,14,101,20,15,15,137,*74
    Sentence completed: GPGSV
$GPGSV,3,2,11,16,17,321,,18,53,266,12,20,48,197,12,23,20,203,19*7F
    Sentence completed: GPGSV
$GPGSV,3,3,11,25,22,190,12,26,33,299,08,29,79,111,18*46
    Sentence completed: GPGSV
$GPGLL,,,,,025632.00,V,N*4A
    Sentence completed: GPGLL
$GPRMC,025633.00,V,,,,,,,080421,,,N*73
    Sentence completed: GPRMC
$GPVTG,,,,,,,,,N*30
$GPGGA,025633.00,,,,,0,04,25.38,,,,,,*6F
    Sentence completed: GPGGA

GSV failing at 12 satellite

when there are 12 satellites in view the last sentence is not added to the satellite data. however 11 satellites works fine.

here is sample data and output
sentences
$GPGSV,3,1,12,13,65,002,50,02,61,098,47,39,60,352,,05,56,183,4970
$GPGSV,3,2,12,15,35,325,50,29,32,229,49,06,25,070,44,30,16,096,38
70
$GPGSV,3,3,12,19,08,022,35,07,07,122,,12,06,316,49,25,03,278,36*7D
(my_gps.satellite_data)
{2: (61, 98, 47), 5: (56, 183, 49), 6: (25, 70, 44), 39: (60, 352, None), 13: (65, 2, 50), 15: (35, 325, 50), 29: (32, 229, 49), 30: (16, 96, 38)}

Unable to read data from GPS

Hello,
I am currently using micro python on STM32Fdisc board, attempting to interface with GPS module. I have tried your code and also tested my code but i am unable to read data from GPS.
Do you have any idea about this problem, why it happen ?

Here is the code:

import pyb
import pyb,micropython
from pyb import LED, Pin, UART

rx = bytearray(250)
i = None
uart = UART(2,115200)

data = bytearray(255)
j = 0
#Capture Data in the Rx buffer
for i in range(255):
uart.readinto(rx)
print(rx)

x = uart.readchar()

print(x)

if i == 255:
break

I printed the buffer and the value is 0. So do you have any idea what can be the reason ? I have checked the GPS module its working using C/C++ and also the UART is working fine.

TypeError: ord() expected string of length 1, but int found

Hello,
I'm getting this error whilst trying to parse a string:

Traceback (most recent call last):
  File "gps.py", line 30, in <module>
    my_gps.update(x)
  File "/home/pi/MNT-GPS/micropyGPS.py", line 573, in update
    ascii_char = ord(new_char)
TypeError: ord() expected string of length 1, but int found

Here is my full code:


import serial
import time
import os
from micropyGPS import MicropyGPS
import pifacecad

my_gps = MicropyGPS()

cad = pifacecad.PiFaceCAD()
cad.lcd.backlight_on()
cad.lcd.blink_off() 

# Set up serial:
ser = serial.Serial(
    port='/dev/ttyUSB0',\
    baudrate=4800,\
    parity=serial.PARITY_NONE,\
    stopbits=serial.STOPBITS_ONE,\
    bytesize=serial.EIGHTBITS,\
        timeout=1)


# Main program loop:
while True:
    
    my_sentence = ser.readline()
    for x in my_sentence:
            my_gps.update(x)
    lat = my_gps.latitude
    lon = my_gps.longitude
    cad.lcd.clear()
    cad.lcd.write("%s\n%s" % (lat, lon)) 
    print("%s\n%s" % (lat, lon)) 
    time.sleep(2)

Thanks for the help :)

Unhandled exception occured

Unhandled exception in thread started by <bound_method>
Traceback (most recent call last):
File "/flash/lib/L76micropyGPS.py", line 60, in feedMicroGPS
File "/flash/lib/micropyGPS.py", line 615, in update
File "/flash/lib/micropyGPS.py", line 372, in gpgga
File "/flash/lib/micropyGPS.py", line 363, in gpgga
IndexError: list index out of range
I created the object from repl, it was working fine.
Then I left the computer, and this is what I saw.

RFC: RAM utilisation optimisations

This library works extremely well but there are potential optimisations for use on platforms with little RAM. My asynchronous GPS device driver implements these. The principal categories are as follows:

  • Replace the string addition operator with the format method (since Python strings are immutable the string addition operator causes needless allocations). This also reduces code size.
  • Use lists rather than tuples for bound variables which are updated, changing each element individually to avoid allocating a temporary tuple.
  • Have common _fix and _set_timestamp methods to avoid code duplication.
  • Replace string comparisons with integer comparisons and use the micropython.const function. This may be an optimisation too far for an existing library as it changes the API.

The first optimisation can substantially simplify the MTK_commands library. See this method for an example (implements update_sentences).

Clearly allocation can't be eliminated as floats are necessarily employed and satellite information is dynamic, but minimising it helps reduce RAM fragmentation.

Out of Memory Issue

I'm a getting an Out of Memory Error whenever I import micropyGPS on a NodeMcu v2 board with Micropython 1.9.1 (see https://www.amazon.com/HiLetgo-Version-NodeMCU-Internet-Development/dp/B010O1G1ES).

Based on your project's descrioption, you are using a Pyboard which has 192KiB RAM while the NodeMcu board has 128KiB RAM. Even with a simple import with no classes at all, I still get the Out of Memory Error. I am surprised the extra 64KiB makes a big difference in loading this library.

I am wondering if you were able to load your library on a NodeMcu board previously. I'm planning to strip out the library to the bare essentials (based on my needs), but before that I was thinking if you've done prior testing with a NodeMcu before. Or if you can provide a quick tip on which ones I can strip out quickly.

I will forego any error checking to save memory and assume happy path. All I want is read the coordinates from my Adafruit GPS device. Once that's read, send it to Raspberry for further processing. I am thinking of porting your implementation to Raspberry (if it doesn't exist yet).

I think by the time you read this, I would already start hacking your code tonight or tomorrow.

Produces decimal degrees that are incorrectly formatted.

The code produces decimal degrees that are incorrectly formatted.

This can be seen in the init function definition:

        Setup GPS Object Status Flags, Internal Data Registers, etc
            local_offset (int): Timzone Difference to UTC
            location_formatting (str): Style For Presenting Longitude/Latitude:
                                       Decimal Degree Minute (ddm) - 40° 26.767′ N
                                       Degrees Minutes Seconds (dms) - 40° 26′ 46″ N
                                       Decimal Degrees (dd) - 40.446° N

The correct format for "dd" is +/-90° for latitude, and +/-180° for longitude, with no compass heading suffix. The compass heading is encoded into the sign of the number. (See here)
So in the example from the code would resolve to +40.446 not 40.446 N.
In the southern hemisphere, it would resolve to -40.446, not 40.446 S.

DGPS

Any chance of including a command to enable DGPS?

Cheers,

Kip

date value from RMC string not stored like timestamp

Our adafruit Ultimate GPS has an RTC w/ clock backup, and we noticed that when we were getting RMC strings w/no fix, time would be correct, but the date would be wrong.
else: # Clear Position Data if Sentence is 'Invalid' self._latitude = (0, 0.0, 'N') self._longitude = (0, 0.0, 'W') self.speed = (0.0, 0.0, 0.0) self.course = 0.0 self.date = (0, 0, 0) self.valid = False
Notice that self.date = 0, but timestamp is left alone. I realize this probably is the opposite of the previous issue's intent, but it seems to me in the case of an RTC enabled GPS, both date and time should come through if the GPS has them stored.

Unhandled exception in gpgsa

Unfortunately have no more information. Code was running for 3+ hours.

Traceback (most recent call last):
File "", line 195, in
File "", line 43, in getGPS
File "micropyGPS.py", line 621, in update
File "micropyGPS.py", line 456, in gpgsa
IndexError: list index out of range

I've updated my code, line 459, to add the exception IndexError as seen in issue #26 .

gprmc parsing problem

Hello, thanks for micropyGPS.
I am testing it right now. Unfortunately, there is a problem with parsing GPRMC sentance for my GPS module.
Example sentance:
$GPRMC,165904.00,A,xxxx.85300,N,yyyyy.85129,E,0.564,,011217,,,A*77
gps_segments (from PyCharm debugger):

gps_segments = {list} <class 'list'>: ['GPRMC', '165904.00', 'A', 'xxxx.85300', 'N', 'yyyyy.85129', 'E', '0.564', '', '011217', '', '', 'A', '77']
 00 = {str} 'GPRMC'
 01 = {str} '165904.00'
 02 = {str} 'A'
 03 = {str} 'xxxx.85300'
 04 = {str} 'N'
 05 = {str} 'yyyyy.85129'
 06 = {str} 'E'
 07 = {str} '0.564'
 08 = {str} ''
 09 = {str} '011217'
 10 = {str} ''
 11 = {str} ''
 12 = {str} 'A'
 13 = {str} '77'
 __len__ = {int} 14

Within function gprmc there is a code:

# Course
try:
    course = float(self.gps_segments[8])
except ValueError:
    return False

Since there is no Course data the parsing fails traying to do course = float(str)

Traceback (most recent call last):
  File "xxx", line 3, in Exec
    exec(exp, global_vars, local_vars)
  File "<input>", line 1, in <module>
ValueError: could not convert string to float: 

I just wanted to let you know.
But still its a great SW and the fix is simple.

RMC parsing should reject sentences with data valid False

When power is first applied to the MTK3339 chip it emits RMC messages with gps_segments[2] != 'A'. The 'A' value only appears once a satellite fix has been achieved.

Unfortunately those invalid messages can have invalid date/time contents. These can pass subsequent tests, yielding an incorrect timestamp. In my opinion the 'A' value should be checked at the start of parsing, and the sentence rejected if it is invalid.

local_offset does not work correctly with non-integer values

The local_offset variable makes an adjustment to the 'hours' value in any timestamps that are recorded. However, many locations have a half hour offset (0.5) and this is not accounted for by also adjusting the 'minutes' value.

Additionally, from my reading of the code, I don't believe there is any adjustment being made to the date when local_offset results in a day shift forwards or backwards.

my_gps.update() always returns None for RMC messages

Hello

When using micropyGPS to parse NMEA messages in a file, I noticed that the my_gps.update() method always returns 'None', for RMC messages, even if the sentence has been parsed. The RMC messages are valid and are counted as "clean sentences" by the statistics parser.

I have tried a number of files with different receiver types, with consistent results.

Thanks for making a great tool. Other than this, I have had no issues and this was exactly what i was looking for in a NMEA parser.

Error in GPGSA

b'$GPGSA,A,1,,,,,,,,,,,99.99,99.99,99.99*30\r\n'
Traceback (most recent call last):
  File "<stdin>", line 15, in <module>
  File "micropyGPS.py", line 621, in update
  File "micropyGPS.py", line 458, in gpgsa
IndexError: list index out of range

l76 glonass support

Hi, i'm using this library on my wipy + pytrack shield.

it uses the quectel l76 gps + glonass receiver. here the spec: http://ecksteinimg.de/Datasheet/QuectelL76-LGNSS.pdf

i see that glonass specific sentences are: GLGSV, GNGLL, GNGSA, that are not implemented in your code. You think you will add those features? If I have some spare time i'd like to contribute.

from the spec file, i see that the only difference between:

[gp|gn] rmc
[gp|gl] gsv
[gp|gn] gll
[gp|gn] gsa

is only the "name". as the nmea sentence has the same format. so i think they can be added into
supported_sentences without new parsers.

however, as I understand from the notes in 2.1 chapter in the spec file, gp-gll uses only gps satellites and gn-gll uses gps + glonass satellites. so during parsing, gngll sentence should have some sort of priority on gpgll.

what do you think?

:D

Lypo import issues

Whenever I try to import micropyGPS no further part of the main.py code executes. Prints put inside micropyGPS don't execute either. This fork of Mycropython doesn't have pyb. Can that be a problem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.