wellenvogel / avnav

using the raspberry pi as a nav computer
MIT License
85 stars 26 forks source link

More NMEA data #13

Closed wellenvogel closed 4 years ago

wellenvogel commented 8 years ago

We should be able to parse and display more nmea data. On the server side this should be handled by some pluggable architecture to be able to add new parsers on the fly. On the viewer we should have a widget approach with the ability to select the widget to be displayed at various positions (nav page, gps page). Potentially more gps data pages. There should be some options to easily add more standard widgets (i.e. no dedicated graphical stuff but simple value formatting).

free-x commented 7 years ago

Hi Andreas,

i'm using sometimes for personal purposing pynmea2 library (https://github.com/Knio/pynmea2)

For example:

#!/usr/bin/env python

import sys
import pynmea2

if len(sys.argv) < 2:
   f=sys.stdin
else:
   f = open(sys.argv[1])

for line in f:
  if line.startswith("!"):
    continue
  elif line.startswith("$"):
    msg = pynmea2.parse(line)
    if type(msg) is pynmea2.types.talker.RMC:
      print "RMC %s%s %s%s sog=%s cog=%s" % ( msg.lat,msg.lat_dir, msg.lon, msg.lon_dir, msg.spd_over_grnd, msg.true_course)
    elif type(msg) is pynmea2.types.talker.GGA:
      print "GPSFix at %s%s %s%s. Sat %s in use %d quality" % ( msg.lat,msg.lat_dir, msg.lon, msg.lon_dir, msg.num_sats, msg.gps_qual)
    elif type(msg) is pynmea2.types.talker.GLL:
      print "ValidStatusFix %s%s %s%s" % ( msg.lat,msg.lat_dir, msg.lon, msg.lon_dir)
    elif type(msg) is pynmea2.types.talker.VTG:
      print "SOG %f" % msg.spd_over_grnd_kts
    elif type(msg) is pynmea2.types.talker.DBT:
      print "Depth: %s" % msg.depth_meters
    elif type(msg) is pynmea2.types.talker.MWV:
      print "Wind: %s %s %s%s" % ( msg.reference, msg.wind_angle, msg.wind_speed, msg.wind_speed_units)

Would that way be helpful?

wellenvogel commented 7 years ago

Looks promising. Thanks, I will try it out. Would like to go away from gpsd anyway...

wellenvogel commented 4 years ago

With 20191223 the infrastrcuture is there. The plugin interface provides the functions. Documentation is still ongoing.