001// License: GPL. For details, see LICENSE file.
002package org.openstreetmap.josm.io.nmea;
003
004/**
005 * An NMEA sentence consists of a start delimiter, followed by a comma-separated sequence of fields,
006 * followed by the character * (ASCII 42), the checksum and an end-of-line marker.
007 * The start delimiter is normally $ (ASCII 36).<p>
008 * Most GPS sensors emit only RMC, GGA, GSA, GSV, GLL, VTG, and (rarely) ZDA.
009 * Newer ones conforming to NMEA 3.x may emit GBS as well.
010 * Other NMEA sentences are usually only emitted by high-end maritime navigation systems.<p>
011 * See <a href="http://www.catb.org/gpsd/NMEA.html#_nmea_encoding_conventions">NMEA Encoding Conventions</a>
012 * @since 12421
013 */
014public enum Sentence {
015
016    /**
017     * GBS - GPS Satellite Fault Detection
018     * <pre>
019     *            1      2   3   4   5   6   7   8   9
020     *            |      |   |   |   |   |   |   |   |
021     * $--GBS,hhmmss.ss,x.x,x.x,x.x,x.x,x.x,x.x,x.x*hh
022     * </pre>
023     * Field Number:<ol>
024     * <li>UTC time of the GGA or GNS fix associated with this sentence</li>
025     * <li>Expected error in latitude (meters)</li>
026     * <li>Expected error in longitude (meters)</li>
027     * <li>Expected error in altitude (meters)</li>
028     * <li>PRN of most likely failed satellite</li>
029     * <li>Probability of missed detection for most likely failed satellite</li>
030     * <li>Estimate of bias in meters on most likely failed satellite</li>
031     * <li>Standard deviation of bias estimate</li>
032     * <li>Checksum</li>
033     * </ol>
034     * See <a href="http://www.catb.org/gpsd/NMEA.html#_gbs_gps_satellite_fault_detection">GBS</a>
035     */
036    GBS,
037
038    /**
039     * GGA - Global Positioning System Fix Data
040     * <pre>
041     *                                                      11
042     *        1         2       3 4        5 6 7  8   9  10 |  12 13  14   15
043     *        |         |       | |        | | |  |   |   | |   | |   |    |
044     * $--GGA,hhmmss.ss,llll.ll,a,yyyyy.yy,a,x,xx,x.x,x.x,M,x.x,M,x.x,xxxx*hh
045     * </pre>
046     * Field Number:<ol>
047     * <li>Universal Time Coordinated (UTC)</li>
048     * <li>Latitude</li>
049     * <li>N or S (North or South)</li>
050     * <li>Longitude</li>
051     * <li>E or W (East or West)</li>
052     * <li>GPS Quality Indicator,<ul>
053     *   <li>0 - fix not available,</li>
054     *   <li>1 - GPS fix,</li>
055     *   <li>2 - Differential GPS fix (values above 2 are 2.3 features)</li>
056     *   <li>3 = PPS fix</li>
057     *   <li>4 = Real Time Kinematic</li>
058     *   <li>5 = Float RTK</li>
059     *   <li>6 = estimated (dead reckoning)</li>
060     *   <li>7 = Manual input mode</li>
061     *   <li>8 = Simulation mode</li>
062     * </ul></li>
063     * <li>Number of satellites in view, 00 - 12</li>
064     * <li>Horizontal Dilution of precision (meters)</li>
065     * <li>Antenna Altitude above/below mean-sea-level (geoid) (in meters)</li>
066     * <li>Units of antenna altitude, meters</li>
067     * <li>Geoidal separation, the difference between the WGS-84 earth ellipsoid and mean-sea-level (geoid),
068     *     "-" means mean-sea-level below ellipsoid</li>
069     * <li>Units of geoidal separation, meters</li>
070     * <li>Age of differential GPS data, time in seconds since last SC104 type 1 or 9 update, null field when DGPS is not used</li>
071     * <li>Differential reference station ID, 0000-1023</li>
072     * <li>Checksum</li>
073     * </ol>
074     * See <a href="http://www.catb.org/gpsd/NMEA.html#_gga_global_positioning_system_fix_data">GGA</a>
075     */
076    GGA,
077
078    /**
079     * GSA - GPS DOP and active satellites
080     * <pre>
081     *        1 2 3                        14 15  16  17  18
082     *        | | |                         |  |   |   |   |
083     * $--GSA,a,a,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x.x,x.x,x.x*hh
084     * </pre>
085     * Field Number:<ol>
086     * <li>Selection mode: M=Manual, forced to operate in 2D or 3D, A=Automatic, 3D/2D</li>
087     * <li>Mode (1 = no fix, 2 = 2D fix, 3 = 3D fix)</li>
088     * <li>ID of 1st satellite used for fix</li>
089     * <li>ID of 2nd satellite used for fix</li>
090     * <li>ID of 3rd satellite used for fix</li>
091     * <li>ID of 4th satellite used for fix</li>
092     * <li>ID of 5th satellite used for fix</li>
093     * <li>ID of 6th satellite used for fix</li>
094     * <li>ID of 7th satellite used for fix</li>
095     * <li>ID of 8th satellite used for fix</li>
096     * <li>ID of 9th satellite used for fix</li>
097     * <li>ID of 10th satellite used for fix</li>
098     * <li>ID of 11th satellite used for fix</li>
099     * <li>ID of 12th satellite used for fix</li>
100     * <li>PDOP</li>
101     * <li>HDOP</li>
102     * <li>VDOP</li>
103     * <li>Checksum</li>
104     * </ol>
105     * See <a href="http://www.catb.org/gpsd/NMEA.html#_gsa_gps_dop_and_active_satellites">GSA</a>
106     */
107    GSA,
108
109    /**
110     * GSV - Satellites in view
111     * <pre>
112     *        1 2 3 4 5 6 7     n
113     *        | | | | | | |     |
114     * $--GSV,x,x,x,x,x,x,x,...*hh
115     * </pre>
116     * Field Number:<ol>
117     * <li>total number of GSV messages to be transmitted in this group</li>
118     * <li>1-origin number of this GSV message within current group</li>
119     * <li>total number of satellites in view (leading zeros sent)</li>
120     * <li>satellite PRN number (leading zeros sent)</li>
121     * <li>elevation in degrees (00-90) (leading zeros sent)</li>
122     * <li>azimuth in degrees to true north (000-359) (leading zeros sent)</li>
123     * <li>SNR in dB (00-99) (leading zeros sent) more satellite info quadruples like 4-7 n) checksum</li>
124     * </ol>
125     * See <a href="http://www.catb.org/gpsd/NMEA.html#_gsv_satellites_in_view">GSV</a>
126     */
127    GSV,
128
129    /**
130     * GLL - Geographic Position - Latitude/Longitude
131     * <pre>
132     *        1       2 3        4 5         6 7   8
133     *        |       | |        | |         | |   |
134     * $--GLL,llll.ll,a,yyyyy.yy,a,hhmmss.ss,a,m,*hh
135     * </pre>
136     * Field Number:<ol>
137     * <li>Latitude</li>
138     * <li>N or S (North or South)</li>
139     * <li>Longitude</li>
140     * <li>E or W (East or West)</li>
141     * <li>Universal Time Coordinated (UTC)</li>
142     * <li>Status A - Data Valid, V - Data Invalid</li>
143     * <li>FAA mode indicator (NMEA 2.3 and later)</li>
144     * <li>Checksum</li>
145     * </ol>
146     * See <a href="http://www.catb.org/gpsd/NMEA.html#_gll_geographic_position_latitude_longitude">GLL</a>
147     */
148    GLL,
149
150    /**
151     * RMC - Recommended Minimum Navigation Information
152     * <pre>
153     *                                                          12
154     *        1         2 3       4 5        6  7   8   9    10 11|  13
155     *        |         | |       | |        |  |   |   |    |  | |   |
156     * $--RMC,hhmmss.ss,A,llll.ll,a,yyyyy.yy,a,x.x,x.x,xxxx,x.x,a,m,*hh
157     * </pre>
158     * Field Number:<ol>
159     * <li>UTC Time</li>
160     * <li>Status, V=Navigation receiver warning A=Valid</li>
161     * <li>Latitude</li>
162     * <li>N or S</li>
163     * <li>Longitude</li>
164     * <li>E or W</li>
165     * <li>Speed over ground, knots</li>
166     * <li>Track made good, degrees true</li>
167     * <li>Date, ddmmyy</li>
168     * <li>Magnetic Variation, degrees</li>
169     * <li>E or W</li>
170     * <li>FAA mode indicator (NMEA 2.3 and later)</li>
171     * <li>Checksum</li>
172     * </ol>
173     * See <a href="http://www.catb.org/gpsd/NMEA.html#_rmc_recommended_minimum_navigation_information">RMC</a>
174     */
175    RMC,
176
177    /**
178     * VTG - Track made good and Ground speed
179     * <pre>
180     *         1  2  3  4  5  6  7  8 9   10
181     *         |  |  |  |  |  |  |  | |   |
182     * $--VTG,x.x,T,x.x,M,x.x,N,x.x,K,m,*hh
183     * </pre>
184     * Field Number:<ol>
185     * <li>Track Degrees</li>
186     * <li>T = True</li>
187     * <li>Track Degrees</li>
188     * <li>M = Magnetic</li>
189     * <li>Speed Knots</li>
190     * <li>N = Knots</li>
191     * <li>Speed Kilometers Per Hour</li>
192     * <li>K = Kilometers Per Hour</li>
193     * <li>FAA mode indicator (NMEA 2.3 and later)</li>
194     * <li>Checksum</li>
195     * </ol>
196     * See <a href="http://www.catb.org/gpsd/NMEA.html#_vtg_track_made_good_and_ground_speed">VTG</a>
197     */
198    VTG,
199
200    /**
201     * ZDA - Time &amp; Date - UTC, day, month, year and local time zone
202     * <pre>
203     *        1         2  3  4    5  6  7
204     *        |         |  |  |    |  |  |
205     * $--ZDA,hhmmss.ss,xx,xx,xxxx,xx,xx*hh
206     * </pre>
207     * Field Number:<ol>
208     * <li>UTC time (hours, minutes, seconds, may have fractional subsecond)</li>
209     * <li>Day, 01 to 31</li>
210     * <li>Month, 01 to 12</li>
211     * <li>Year (4 digits)</li>
212     * <li>Local zone description, 00 to +- 13 hours</li>
213     * <li>Local zone minutes description, apply same sign as local hours</li>
214     * <li>Checksum</li>
215     * </ol>
216     * See <a href="http://www.catb.org/gpsd/NMEA.html#_zda_time_amp_date_utc_day_month_year_and_local_time_zone">ZDA</a>
217     */
218    ZDA
219}