Ed Anderson wrote:
I just found this description of the Garmin GPS NEMA output sentences.
Ed Anderson
Matthews, NC
RV-6A N494BW
eanderson@carolina.rr.com
------------------------------------------------------------
Simple Text Output Format:
The simple text (ASCII) output contains time, position, and velocity
data in
the fixed width fields (not delimited) defined in the following table:
FIELD DESCRIPTION: WIDTH: NOTES:
----------------------- ------- ------------------------
Sentence start 1 Always '@'
----------------------- ------- ------------------------
/Year 2 Last two digits of UTC year
| ----------------------- ------- ------------------------
| Month 2 UTC month, "01".."12"
T | ----------------------- ------- ------------------------
i | Day 2 UTC day of month, "01".."31"
m | ----------------------- ------- ------------------------
e | Hour 2 UTC hour, "00".."23"
| ----------------------- ------- ------------------------
| Minute 2 UTC minute, "00".."59"
| ----------------------- ------- ------------------------
\Second 2 UTC second, "00".."59"
----------------------- ------- ------------------------
/Latitude hemisphere 1 'N' or 'S'
| ----------------------- ------- ------------------------
| Latitude position 7 WGS84 ddmmmmm, with an implied
| decimal after the 4th digit
| ----------------------- ------- ------------------------
| Longitude hemishpere 1 'E' or 'W'
| ----------------------- ------- ------------------------
| Longitude position 8 WGS84 dddmmmmm with an implied
P | decimal after the 5th digit
o | ----------------------- ------- ------------------------
s | Position status 1 'd' if current 2D differential GPS
position
i | 'D' if current 3D differential GPS
position
t | 'g' if current 2D GPS position
i | 'G' if current 3D GPS position
o | 'S' if simulated position
n | '_' if invalid position
| ----------------------- ------- ------------------------
| Horizontal posn error 3 EPH in meters
| ----------------------- ------- ------------------------
| Altitude sign 1 '+' or '-'
| ----------------------- ------- ------------------------
| Altitude 5 Height above or below mean
\ sea level in meters
----------------------- ------- ------------------------
/East/West velocity 1 'E' or 'W'
| direction
| ----------------------- ------- ------------------------
| East/West velocity 4 Meters per second in tenths,
| magnitude ("1234" = 123.4 m/s)
V | ----------------------- ------- ------------------------
e | North/South velocity 1 'N' or 'S'
l | direction
o | ----------------------- ------- ------------------------
c | North/South velocity 4 Meters per second in tenths,
i | magnitude ("1234" = 123.4 m/s)
t | ----------------------- ------- ------------------------
y | Vertical velocity 1 'U' (up) or 'D' (down)
| direction
| ----------------------- ------- ------------------------
| Vertical velocity 4 Meters per second in hundredths,
\ magnitude ("1234" = 12.34 m/s)
----------------------- ------- ------------------------
Sentence end 2 Carriage return, '0x0D', and
line feed, '0x0A'
----------------------- ------- ------------------------
If a numeric value does not fill its entire field width, the field is
padded
with leading '0's (eg. an altitude of 50 meters above MSL will be output
as
"+00050").
Any or all of the data in the text sentence (except for the sentence
start
and sentence end fields) may be replaced with underscores to indicate
invalid data.
Looks different than the NEMA 0183 protocol but will work fine.
Not quite as easy to handle as NEMA 0183 comma delimited data which
will import directly to a spread sheet. I can write a QB
program to convert it to comma delimited if you wish Ed.
Something like:
OPEN input.dat FOR INPUT AS #1
OPEN output.dat FOR OUTPUT AS #2
ON ERROR GOTO end:
start:
LINE INPUT #1, temp$
file1$=MID$(temp$,xxx,xxx) 'xxx = file pos and len
file2$=MID$(temp$,xxx,xxx)
file3$=MID$(temp$,xxx,xxx)
file4$=MID$(temp$,xxx,xxx)
file5$=MID$(temp$,xxx,xxx)
PRINT #2 file1$,file2$,file3$,file4$,file5$
GOTO start:
end:
CLOSE
SYSTEM
Paul Lamar
As it turns out, apparently the Garmin can be set for one of several
different output formats, one of which is called NMEA 0183 V2 at 4800 baud.
It provides several NMEA sentences and the one that appears closest to what
we want is $GPRMC (Minimum Recommended Data)
RMC - NMEA has its own version of essential gps pvt (position, velocity,
time) data. It is called RMC, The Recommended Minimum, which might look
like:
$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 *
Note that, as of the 2.3 release of NMEA, there is a new field in the RMC
sentence at the end just prior to the checksum. The value of the entry is
A=autonomous, D=differential, E=estimated, N=Data not valid.
It appears that this sentence is Comma delimited so that should help. Might
help to have all this data so it can be important into spreadsheet and I am
fairly certain that with the data comma delimited that MS Excell can handle
it.
Again, I think how we interleave the NMEA data with the D5000 read queries
needs to be worked out, but should not be too hard. I presume we will want
the NMEA and D5000 operating at the same baud rate - looks like it may be
4800 baud as that is the standard for the Garmin 195. Sorry if I am stating
the obvious to you,. but have really not had any experience interfacing
things to the PC.
My program were always PC programs and not interface programs (well, maybe
to the printer {:>)).
Now, I need try out some of this to see if there are any glitches.
Ed Anderson
Ed anybody that learn the PIC real time programming like yourself
will have no trouble with this stuff :-)
If you have any trouble getting your Garmin to work with the com prog
I can just send you my Lowrance GPS sensor. RS232 output only.
Paul Lamar
The AirCraft Rotary Engine NewsLetter. Powered by Linux.
ACRE NL web site. http://home.earthlink.net/~rotaryeng/
Copyright 1998-2002 All world wide rights reserved.