Subject: Fwd: GPS
From: "rotaryeng@earthlink.net" <rotaryeng@earthlink.net>
Date: 1/6/2012, 1:17 AM
To: AAAA Put this in the To box


Paul:

A month or two ago we were experimenting with GPS units.
We both have inexpensive Earthmate dongle-type GPS units that are
distributed with Delorme mapping software. I was not able to get my
Linux computer to communicate with  my particular GPS.  A little online
research indicates that Earthmate GPS units do not all containing the
same chip-sets, and I could not find a readily available Linux driver to
communicate with my particular device.

So I ordered a different GPS dongle, a Canmore, purchased from GPSLot
somewhere out there in CA ($20 +). The initial unit they shipped me was
DOA, so GPSLot sent me a replacement unit.  This one works fine with my
Linux machine.

I just plugged it into my Linux machine running a TCL-based serial-port
communication program and the GPS unit sits there and spits out a stream
of data at 4800 Bps. It repeats the data pattern every second, about 6
lines of data.  One of these lines of data contains almost everything
GPS-related that I need for my experimental aircraft instrument panel.
The format is:

$GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A

Where:
    RMC          Recommended Minimum sentence C
    123519       Fix taken at 12:35:19 UTC
    A            Status A=active or V=Void.
    4807.038,N   Latitude 48 deg 07.038' N
    01131.000,E  Longitude 11 deg 31.000' E
    022.4        Speed over the ground in knots
    084.4        Track angle in degrees True
    230394       Date - 23rd of March 1994
    003.1,W      Magnetic Variation
    *6A          The checksum data, always begins with *

I've now ordered a longer dongle-cord for my unit (~$3) so I can get a better signal thru my office window;
I don't want to go outside in the yard and sit in the snow to play with my new toy.

I will probably create a display using satellite imagery to make a pretty map showing current location at all times,
but I will be required to create my own database of maps covering the general area in which I intend to operate.
It would be fun to instead interface with an iPhone or similar device for web-based mapping images,
but since we do not have cellphone service where we live and I would need to set up my R&D department somewhere else.
(It is not always fun living in the armpit of the world).

Otherwise,  I am still experimenting with efficient code to read my data-acquisition board.

R Berglund


Yes the GPRMC sentences has most of what you need.

Here is a complete moving map program written in QB.


I also have the airport data base that goes with this.

Will run in XP command line.

Perhaps you can find a BASIC in Linux that will run this.

Paul Lamar

============================================
' NO TEMP19 VERSION ARRAYS ARE LOADED DIRECTLY
'Comment out shell "erase temp40.dat"

CLS
CLEAR , , 8000     'stack size comes out of the data space so watch out.
CLOSE
'OPEN "ddd.bas" FOR OUTPUT AS #25
ON ERROR GOTO NoTemp40
OPEN "temp40.dat" FOR INPUT AS #40
GOTO readtemp40:

NoTemp40:
RESUME notemp40a
notemp40a:
CLS
LOCATE 12, 1: PRINT "             This module must be run from X-CNTRY"
CLOSE 40
END

readtemp40:
ON ERROR GOTO 0
INPUT #40, desta$, DestIdent$, DestName$, DestCity$, DestState$, DestLat$, DestLon$, DestElevat$, destvar$, destPatAlt$, destLights$, destfueltype$, desttower$, destctaf$
CLOSE 40
'SHELL "erase temp40.dat"      'comment out for development

DestLat2$ = ""
FOR x9 = 1 TO 20
temp$ = MID$(DestLat$, x9, 1)
IF temp$ = "." THEN GOTO endgetdestlat
DestLat2$ = DestLat2$ + temp$
NEXT

endgetdestlat:
DestLat$ = DestLat2$
'PRINT #25, "DestLat$"; DestLat$


DestLon2$ = ""
FOR x9 = 1 TO 20
temp$ = MID$(DestLon$, x9, 1)
IF temp$ = "." THEN GOTO endgetdestlon
DestLon2$ = DestLon2$ + temp$
NEXT
endgetdestlon:
DestLon$ = DestLon2$
'PRINT #25, "DestLon$"; DestLon$

takeofftime = INT(TIMER)

temp$ = DATE$
mon$ = MID$(temp$, 1, 2)
day$ = MID$(temp$, 4, 2)
yr$ = MID$(temp$, 9, 2)
temp2$ = TIME$
hr$ = MID$(temp2$, 1, 2)
filenamesim$ = hr$ + mon$ + day$ + yr$ + ".PB"
OPEN filenamesim$ FOR OUTPUT AS #15 LEN = 4000



tim1 = TIMER
FOR c = 1 TO 999: NEXT
tim2 = TIMER

'PRINT tim1 :PRINT tim2 :PRINT tim2 - tim1
IF tim2 - tim1 > .2 THEN TInterval = 4 ELSE TInterval = 2
'PRINT tinterval :END

CLS
FOR x = 1 TO 4
PRINT
NEXT x
PRINT "               X-CNTRY Copyright 1990, 1991, 1992, 1993"
PRINT "                       by Paul Lamar"
PRINT
PRINT "                                                       "
PRINT
PRINT "                        LAMAR INSTRUMENTS"
PRINT "                        830 Santa Maria St. Suite 303"
PRINT "                        Santa Paula, CA"
PRINT "                        93060 (805) 933 3202"

endit21:
LOCATE 1, 1, 0                              'turn off the cursor

FOR row1 = 1 TO 18
FOR ColNum1 = 1 TO 79                       'Get all characters on the line.
chksum1 = chksum1 + SCREEN(row1, ColNum1) + ColNum1 / row1   'New algol
NEXT ColNum1
NEXT row1

'PRINT chksum1                       'Do this when you change the message
'INPUT z$
IF chksum1 <> 61756.53 THEN copyflag = 1
'Any change in the message will screw this up.

IF copyflag <> 1 THEN GOTO goodcopy

'*****************   SMART ASS  CUSTOMER CHANGES
CLS
LOCATE 15, 1
PRINT "              Sorry something is wrong with the program. "
PRINT "              Call Paul Lamar at (805) 933 3202"
END


-- 
The Rotary Engine NewsLetter. Powered by Linux.
ACRE NL web site. http://www.rotaryeng.net
Youtube key word PaulLamar2
Copyright 1998-2012 All world wide rights reserved.