1nmea(n) NMEA protocol implementation nmea(n)
2
3
4
5______________________________________________________________________________
6
8 nmea - Process NMEA data
9
11 package require Tcl 8.2
12
13 package require nmea ?0.1.1?
14
15 ::nmea::open_port port ?speed?
16
17 ::nmea::open_file file rate
18
19 ::nmea::input sentence
20
21 ::nmea::configure_port settings
22
23 ::nmea::close_port
24
25 ::nmea::close_file
26
27 ::nmea::do_line
28
29 ::nmea::log file
30
31 ::nmea::checksum data
32
33 ::nmea::write sentence data
34
35_________________________________________________________________
36
38 This package provides a standard interface for writing software which
39 recieves NMEA standard input data. It allows for reading data from COM
40 ports, files, or programmatic input. It also supports the checksumming
41 and logging of incoming data. After parsing, input is dispatched to
42 user defined handler commands for processing. To define a handler,
43 create a proc with the NMEA sentence name in the ::nmea namespace. For
44 example, to process GPS fix data use "proc ::nmea::GPGSA". The proc
45 must take one argument, which is a list of the data values.
46
48 ::nmea::open_port port ?speed?
49 Open the specified COM port and read NMEA sentences when avail‐
50 able. Port speed is set to 4800bps by default or to speed.
51
52 ::nmea::open_file file rate
53 Open file file and read NMEA sentences, one per line, at the
54 rate by rate in milliseconds. The file format may omit the
55 leading $ and/or the checksum. If rate is <= 0 then lines will
56 only be processed when a call to do_line is made. The rate may
57 be adjusted by setting ::nmea::nmea(rate).
58
59 ::nmea::input sentence
60 Processes and dispatches the supplied sentence. If sentence con‐
61 tains no commas it is treated as a Tcl list, otherwise it must
62 be standard comma delimited NMEA data, with an optional checksum
63 and leading $.
64
65 ::nmea::configure_port settings
66 Changes the current port settings. settings has the same format
67 as fconfigure -mode.
68
69 ::nmea::close_port
70 Close the open port
71
72 ::nmea::close_file
73 Close the open file
74
75 ::nmea::do_line
76 If there is a currently open file, this command will read and
77 process a single line from it. Returns the number of lines read.
78
79 ::nmea::log file
80 Starts or stops file logging. If a file name is specified then
81 all NMEA output will be logged to the file in append mode. If
82 file is an empty string then any logging will be stopped.
83
84 ::nmea::checksum data
85 Returns the checksum of the supplied data
86
87 ::nmea::write sentence data
88 If there is a currently open port, this command will write the
89 specified sentence and data in proper NMEA checksummed format.
90
92 ::nmea::checksum
93 A boolean value which determines whether incoming sentences are
94 validated or not.
95
96 ::nmea::rate
97 When reading from a file this sets the rate that lines are pro‐
98 cessed in milliseconds.
99
101 This document, and the package it describes, will undoubtedly contain
102 bugs and other problems. Please report such in the category nmea of
103 the Tcllib SF Trackers [http://source‐
104 forge.net/tracker/?group_id=12883]. Please also report any ideas for
105 enhancements you may have for either package and/or documentation.
106
108 gps, nmea
109
111 Copyright (c) 2006-2007, Aaron Faupell <afaupell@users.sourceforge.net>
112
113
114
115
116nmea 0.1 nmea(n)