Python Forum
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pynmea2
#11
In Scripts folder as posted,but set up Environment Variables Path
To Path add ;C:\python27\;C:\python27\scripts
Restart.
Test that it work in cmd:
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. Med enerett.
    
C:\Windows\System32>cd\
    
C:\>python
Python 2.7.0 (v2.7.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
    
C:\>pip -V
pip 9.0.1 from c:\python27\lib\site-packages (python 2-7)
C:\>
Upgrade pip if not 9.0.1 upgrade python -m pip install -U pip
Reply
#12
Thanks. Followed your instructions and pip 9.0.1, pynmea2 installed OK.
I get a constant stream of NMEA data from my GPS Module and I have to parse it to get alt, lat, long and time. Not sure how to do it i.e. in real time or batch mode using pynmea2.
Reply
#13
Any suggestions?
Reply
#14
Learn Python.
Without knowing how the data is formatted we can't suggest anything
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#15
Trying to pynmea2 this msg,
("$GPGGA,184353.07,1929.045,S,02410.5
06,E,1,04,2.6,100.00,M,-33.9,M,,0000*6D")

Tried:
c:\Python27\Lib\site-packages>pynmea2.parse(msg)
'pynmea2.parse' is not recognized as an internal or external command,
operable program or batch file.

c:\Python27\Lib\site-packages>pynmea2.parse("$GPGGA,184353.07,1929.045,S,02410.5
06,E,1,04,2.6,100.00,M,-33.9,M,,0000*6D")
'pynmea2.parse' is not recognized as an internal or external command,
operable program or batch file.

c:\Python27\Lib\site-packages>
Reply
#16
It's not from command line(cmd).
It's from interpreter(Interactive Mode).
Reply
#17
Thanks, OK now.

I am trying to pynmea in realtime this data which updates every 15 secs but am stuck:


Time: 2017-05-18T17:37:32.000Z Lat: 43 45' 03.054" N Lon: 79 15' 10.025" W │
└───────────────────────────────── Cooked PVT ─────────────────────────────────┘
┌──────────────────────────────────────────────────────────────────────────────┐
│ GPGGA GPGSA GPRMC GPVTG GPGSV │
└───────────────────────────────── Sentences ──────────────────────────────────┘
┌──────────────────┐┌────────────────────────────┐┌────────────────────────────┐
│Ch PRN Az El S/N ││Time: 173732.000 ││Time: 173732.000 │
│ 0 8 139 76 39 ││Latitude: 4345.0509 N ││Latitude: 4345.0509 │
│ 1 7 307 66 37 ││Longitude: 07915.1671 W ││Longitude: 07915.1671 │
│ 2 27 56 51 23 ││Speed: 0.11 ││Altitude: 245.2 │
│ 3 9 228 39 34 ││Course: 252.00 ││Quality: 2 Sats: 07 │
│ 4 138 217 32 35 ││Status: A FAA: D ││HDOP: 1.08 │
│ 5 30 306 27 19 ││MagVar: ││Geoid: -35.2 │
│ 6 11 169 23 28 │└─────────── RMC ────────────┘└─────────── GGA ────────────┘
│ 7 16 69 23 24 │┌────────────────────────────┐┌────────────────────────────┐
│ 8 23 194 20 25 ││Mode: A 3 ││UTC: RMS: │
│ 9 28 263 12 25 ││Sats: 9 7 23 30 16 8 27 ││MAJ: MIN: │
│10 21 28 3 0 ││DOP: H=1.08 V=0.86 P=1.37 ││ORI: LAT: │
│11 ││PPS offset: ││LON: ALT:
Reply
#18
Which one? In line 1 or bellow
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#19
Line 1 i.e.

2017-05-18T17:37:32.000Z Lat: 43 45' 03.054" N Lon: 79 15' 10.025" W

This line gets updated every 15 secs with new values for time, lat, lon etc. from the GPS Module
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020