Loading ...
Sorry, an error occurred while loading the content.

RE: [irlp-embedded] Reading a GPS from the serial port of IRLP node computer

Expand Messages
  • Rick Bates
    It s doubtful that you ll get a script writer (I m not one) to respond over the next few days, but something along the lines of EXPORT the Lat and Long in the
    Message 1 of 3 , Dec 24, 2011

      It’s doubtful that you’ll get a script writer (I’m not one) to respond over the next few days, but something along the lines of EXPORT the Lat and Long in the script below, then rewrite Randy’s script to draw these values in instead of the fixed values.  Both would have to be run as a cron job, at least while in motion, but you don’t have to write to the screen each time unless you prefer it that way (comment out the last half).  You may wish to adjust the timing of the broadcast.


      A better script would test against the last position to stop lengthen the time between broadcasts after you‘ve stopped moving.  There is no reason to keep sending “I haven’t moved” every 3 minutes for 5 days.  A superior script would emulate ‘SmartBeacon’, which is the most polite (currently) method of beaconing.


      3G shouldn’t be an issue, data is data.


      Merry Christmas,

      Rick WA6NHC


      From: craiginhouston

      How do you get your embedded mobile IRLP node to report its real-time position to the APRS servers over the 3G?

      I was successful today hooking a Germin 18 serial GPS device to the serial port on my regular IRLP node (haven't yet verified that it also works on an embedded node). The script below reads the GGA NMEA sentance at 4800 baud from the GPS unit and displays the data on the console screen. Now all I have to do is merge this script with kc6hur's IRLP APRS status reporting script and I'll be in business!


      Houston Texas

      ---------- script begins here -----------------


      # This script reads NMEA sentances from a GPS device on the serial port and
      # filters out all but the sentence "GPGGA" and the 3rd, 5th, 8th and 9th
      # fields which correspond to Lat, Lon, number of satellites, and altitude

      # set serial port to 4800 baud rate
      stty -F/dev/ttyS0 4800

      # begin infinate loop to read the data and display to the screen

      while true; do

      GPGGAstring="`head -n26 /dev/ttyS0 | grep GPGGA`"

      GPStimeStamp="`echo $GPGGAstring | cut -d"," -f2`"
      Latitude="`echo $GPGGAstring | cut -d"," -f3`"
      Longitude="`echo $GPGGAstring | cut -d"," -f5`"
      NumberOfSatellites="`echo $GPGGAstring | cut -d"," -f8`"
      Altitude="`echo $GPGGAstring | cut -d"," -f9`"

      echo "Latitude = " $Latitude
      echo "Longitude = " $Longitude
      echo "Altitude = " $Altitude
      echo "Satellites = " $NumberOfSatellites
      echo $GPGGAstring


    Your message has been successfully submitted and would be delivered to recipients shortly.