Code Monkey home page Code Monkey logo

pynmea's Introduction

readne

pynmea's People

Watchers

James Cloos avatar

pynmea's Issues

Multiple Talker Identifier

Hi,
I'm working on a multi talker identifier project and I want to use your library.
Looking at your code I find all the implemented (and not implemented) nmea 
sentences classes related to the GPS talker identifier (GP).
I was wandering if there's a way to get your library work also on sentences 
coming from other equipment than the GPS (maybe avoiding to replace the first 
chars of each sentence with "GP"). 
I think the only way is to change a bit the library structure, deleting the 
"GP" from the current nmea sentences classes and changing the identification 
functions (like _get_type in NMEAStream) to work on the sentences name.
Parsing functions should work also with this changes.

Just a suggestion because I don't know how to contribute directly to this 
project.

Original issue reported on code.google.com by [email protected] on 18 Jan 2013 at 4:19

Patch for $WIMDA

Patch adds parse map for $WIMDA sentences. For use with Airmar weather 
stations, per PB100 Technical Manual rev 1.007.


Original issue reported on code.google.com by [email protected] on 14 Mar 2014 at 4:10

Attachments:

NMEAStream.get_objects loosing sentences

I'm not sure if this package is still being maintained but I've found it pretty 
useful and I came across a bug that is worth reporting.

When using NMEAStream.get_objects() to read sentences from a NMEA file, 
occasionally messages will be lost when _split is called and the last character 
in the data argument is '$'. The last '$' gets stripped (by the split 
operation), and self.head (in _read) becomes the last full sentence. Then the 
next time _read is called, instead of data beginning with $, it begins with a 
full sentence, which is added to another sentence that the $ was stripped off 
the beginning and you get two run-on sentences. These sentences are then thrown 
out.

There are comments in the _split method that indicate some recorders 
run-together sentences with no '$' but, at least in my case, the file is fine, 
but the $ is being lost in the split operation.

My solution is to add the following before _split returns:
if data and data[-1] == '$':
    clean_sentences.append('$')

(See lines 108-110 in attached streamer.py)

I'm not sure if this is a completely robust solution, but it seems to work for 
my tests.

Original issue reported on code.google.com by [email protected] on 24 Feb 2013 at 7:54

Attachments:

Adding support for calculating decimal longitudes and latitudes

Hi,

this is not the cleanest hack but I thought I'd share it. This creates 
longitude_decimal and latitude_decimal properties if it finds the longitude and 
latitude properties in a sentence while parsing it. I use this to allow easy 
mapping using Google Maps.
This is inserted at the end of the parse function in the NMEASentence class 
(line 60):

        #Calculate the decimal value of the longitude and latitude if they exist in the current sentence
        if self.longitude:
            self.longitude_decimal = float(float(self.longitude[3:])/60)+float(self.longitude[:3])
        if self.latitude:
            self.latitude_decimal = float(float(self.latitude[2:])/60)+float(self.latitude[:2])

I also noticed the init.py still shows version as being 0.3.0.

Best,
Charles.

Original issue reported on code.google.com by [email protected] on 30 Apr 2013 at 6:55

RS232 example

Hi, a new example for the docs that probably captures what many people are 
looking for when they have their shiny new Venus GPS from sparkfun.

thanks -



import serial
from pynmea import nmea


ser = serial.Serial('/dev/ttyUSB0', 9600)
while True:
    myline =  ser.readline()

    if(myline.startswith('$GPGGA')):
        gpgga = nmea.GPGGA()

# Ask the object to parse the data
        gpgga.parse(myline)

        time = float(gpgga.timestamp)
        lat = float(gpgga.latitude)
        lon = float(gpgga.longitude)

        print "Time %f Lat %f Long %f" % ( time, lat, lon)

Original issue reported on code.google.com by [email protected] on 4 Jun 2014 at 4:45

Noob question + requests

I have NMEA setances in the form of $GPRMC, $GPGGA AND $GPGSA. Are those 
already implemented? Also, I can read in those sentances, but I how can I parse 
them with pynmea? I'm a bit of a python programming noob, so I thought you may 
be able to point me into the right direction. Thanks!

Original issue reported on code.google.com by [email protected] on 3 Oct 2011 at 7:46

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.