[12421] | 1 | // License: GPL. For details, see LICENSE file.
|
---|
| 2 | package org.openstreetmap.josm.io.nmea;
|
---|
| 3 |
|
---|
| 4 | /**
|
---|
| 5 | * An NMEA sentence consists of a start delimiter, followed by a comma-separated sequence of fields,
|
---|
| 6 | * followed by the character * (ASCII 42), the checksum and an end-of-line marker.
|
---|
| 7 | * The start delimiter is normally $ (ASCII 36).<p>
|
---|
| 8 | * Most GPS sensors emit only RMC, GGA, GSA, GSV, GLL, VTG, and (rarely) ZDA.
|
---|
| 9 | * Newer ones conforming to NMEA 3.x may emit GBS as well.
|
---|
| 10 | * Other NMEA sentences are usually only emitted by high-end maritime navigation systems.<p>
|
---|
| 11 | * See <a href="http://www.catb.org/gpsd/NMEA.html#_nmea_encoding_conventions">NMEA Encoding Conventions</a>
|
---|
| 12 | * @since 12421
|
---|
| 13 | */
|
---|
| 14 | public enum Sentence {
|
---|
| 15 |
|
---|
| 16 | /**
|
---|
| 17 | * GBS - GPS Satellite Fault Detection<p>
|
---|
| 18 | * <pre>
|
---|
| 19 | * 1 2 3 4 5 6 7 8 9
|
---|
| 20 | * | | | | | | | | |
|
---|
[12426] | 21 | * $--GBS,hhmmss.ss,x.x,x.x,x.x,x.x,x.x,x.x,x.x*hh
|
---|
[12421] | 22 | * </pre>
|
---|
| 23 | * Field Number:<ol>
|
---|
| 24 | * <li>UTC time of the GGA or GNS fix associated with this sentence</li>
|
---|
| 25 | * <li>Expected error in latitude (meters)</li>
|
---|
| 26 | * <li>Expected error in longitude (meters)</li>
|
---|
| 27 | * <li>Expected error in altitude (meters)</li>
|
---|
| 28 | * <li>PRN of most likely failed satellite</li>
|
---|
| 29 | * <li>Probability of missed detection for most likely failed satellite</li>
|
---|
| 30 | * <li>Estimate of bias in meters on most likely failed satellite</li>
|
---|
| 31 | * <li>Standard deviation of bias estimate</li>
|
---|
| 32 | * <li>Checksum</li>
|
---|
| 33 | * </ol>
|
---|
| 34 | * See <a href="http://www.catb.org/gpsd/NMEA.html#_gbs_gps_satellite_fault_detection">GBS</a>
|
---|
| 35 | */
|
---|
| 36 | GBS,
|
---|
| 37 |
|
---|
| 38 | /**
|
---|
| 39 | * GGA - Global Positioning System Fix Data<p>
|
---|
| 40 | * <pre>
|
---|
| 41 | * 11
|
---|
| 42 | * 1 2 3 4 5 6 7 8 9 10 | 12 13 14 15
|
---|
| 43 | * | | | | | | | | | | | | | | |
|
---|
[12426] | 44 | * $--GGA,hhmmss.ss,llll.ll,a,yyyyy.yy,a,x,xx,x.x,x.x,M,x.x,M,x.x,xxxx*hh
|
---|
[12421] | 45 | * </pre>
|
---|
| 46 | * Field Number:<ol>
|
---|
| 47 | * <li>Universal Time Coordinated (UTC)</li>
|
---|
| 48 | * <li>Latitude</li>
|
---|
| 49 | * <li>N or S (North or South)</li>
|
---|
| 50 | * <li>Longitude</li>
|
---|
| 51 | * <li>E or W (East or West)</li>
|
---|
| 52 | * <li>GPS Quality Indicator,<ul>
|
---|
| 53 | * <li>0 - fix not available,</li>
|
---|
| 54 | * <li>1 - GPS fix,</li>
|
---|
| 55 | * <li>2 - Differential GPS fix (values above 2 are 2.3 features)</li>
|
---|
| 56 | * <li>3 = PPS fix</li>
|
---|
| 57 | * <li>4 = Real Time Kinematic</li>
|
---|
| 58 | * <li>5 = Float RTK</li>
|
---|
| 59 | * <li>6 = estimated (dead reckoning)</li>
|
---|
| 60 | * <li>7 = Manual input mode</li>
|
---|
| 61 | * <li>8 = Simulation mode</li>
|
---|
| 62 | * </ul></li>
|
---|
| 63 | * <li>Number of satellites in view, 00 - 12</li>
|
---|
| 64 | * <li>Horizontal Dilution of precision (meters)</li>
|
---|
| 65 | * <li>Antenna Altitude above/below mean-sea-level (geoid) (in meters)</li>
|
---|
| 66 | * <li>Units of antenna altitude, meters</li>
|
---|
| 67 | * <li>Geoidal separation, the difference between the WGS-84 earth ellipsoid and mean-sea-level (geoid),
|
---|
| 68 | * "-" means mean-sea-level below ellipsoid</li>
|
---|
| 69 | * <li>Units of geoidal separation, meters</li>
|
---|
| 70 | * <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>
|
---|
| 71 | * <li>Differential reference station ID, 0000-1023</li>
|
---|
| 72 | * <li>Checksum</li>
|
---|
| 73 | * </ol>
|
---|
| 74 | * See <a href="http://www.catb.org/gpsd/NMEA.html#_gga_global_positioning_system_fix_data">GGA</a>
|
---|
| 75 | */
|
---|
| 76 | GGA,
|
---|
| 77 |
|
---|
| 78 | /**
|
---|
| 79 | * GSA - GPS DOP and active satellites<p>
|
---|
| 80 | * <pre>
|
---|
| 81 | * 1 2 3 14 15 16 17 18
|
---|
| 82 | * | | | | | | | |
|
---|
[12426] | 83 | * $--GSA,a,a,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x.x,x.x,x.x*hh
|
---|
[12421] | 84 | * </pre>
|
---|
| 85 | * Field Number:<ol>
|
---|
| 86 | * <li>Selection mode: M=Manual, forced to operate in 2D or 3D, A=Automatic, 3D/2D</li>
|
---|
| 87 | * <li>Mode (1 = no fix, 2 = 2D fix, 3 = 3D fix)</li>
|
---|
| 88 | * <li>ID of 1st satellite used for fix</li>
|
---|
| 89 | * <li>ID of 2nd satellite used for fix</li>
|
---|
| 90 | * <li>ID of 3rd satellite used for fix</li>
|
---|
| 91 | * <li>ID of 4th satellite used for fix</li>
|
---|
| 92 | * <li>ID of 5th satellite used for fix</li>
|
---|
| 93 | * <li>ID of 6th satellite used for fix</li>
|
---|
| 94 | * <li>ID of 7th satellite used for fix</li>
|
---|
| 95 | * <li>ID of 8th satellite used for fix</li>
|
---|
| 96 | * <li>ID of 9th satellite used for fix</li>
|
---|
| 97 | * <li>ID of 10th satellite used for fix</li>
|
---|
| 98 | * <li>ID of 11th satellite used for fix</li>
|
---|
| 99 | * <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<p>
|
---|
| 111 | * <pre>
|
---|
| 112 | * 1 2 3 4 5 6 7 n
|
---|
| 113 | * | | | | | | | |
|
---|
[12426] | 114 | * $--GSV,x,x,x,x,x,x,x,...*hh
|
---|
[12421] | 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<p>
|
---|
| 131 | * <pre>
|
---|
| 132 | * 1 2 3 4 5 6 7 8
|
---|
| 133 | * | | | | | | | |
|
---|
[12426] | 134 | * $--GLL,llll.ll,a,yyyyy.yy,a,hhmmss.ss,a,m,*hh
|
---|
[12421] | 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<p>
|
---|
| 152 | * <pre>
|
---|
| 153 | * 12
|
---|
| 154 | * 1 2 3 4 5 6 7 8 9 10 11| 13
|
---|
| 155 | * | | | | | | | | | | | | |
|
---|
[12426] | 156 | * $--RMC,hhmmss.ss,A,llll.ll,a,yyyyy.yy,a,x.x,x.x,xxxx,x.x,a,m,*hh
|
---|
[12421] | 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<p>
|
---|
| 179 | * <pre>
|
---|
| 180 | * 1 2 3 4 5 6 7 8 9 10
|
---|
| 181 | * | | | | | | | | | |
|
---|
[12426] | 182 | * $--VTG,x.x,T,x.x,M,x.x,N,x.x,K,m,*hh
|
---|
[12421] | 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 & Date - UTC, day, month, year and local time zone<p>
|
---|
| 202 | * <pre>
|
---|
| 203 | * 1 2 3 4 5 6 7
|
---|
| 204 | * | | | | | | |
|
---|
[12426] | 205 | * $--ZDA,hhmmss.ss,xx,xx,xxxx,xx,xx*hh
|
---|
[12421] | 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 | }
|
---|