source: pacpussensors/trunk/NMEA0183/src/EXPID.cpp@ 94

Last change on this file since 94 was 59, checked in by DHERBOMEZ Gérald, 10 years ago

Integration of new modules:

  • GPS NMEA0183 decoder
  • Span CPT Decoder

Update of:

File size: 8.7 KB
Line 
1#include "nmea0183.h"
2#pragma hdrstop
3
4/*
5** Author: Samuel R. Blackburn
6** Internet: sam_blackburn@pobox.com
7**
8** You can use it any way you like as long as you don't try to sell it.
9**
10** Copyright, 1996, Samuel R. Blackburn
11**
12** $Workfile: expid.cpp $
13** $Revision: 4 $
14** $Modtime: 10/10/98 2:59p $
15*/
16
17QString expand_talker_id( const QString &identifier )
18{
19 QString expanded_identifier;
20
21 char first_character = 0x00;
22 char second_character = 0x00;
23
24 first_character = identifier[ 0 ].toLatin1();
25 second_character = identifier[ 1 ].toLatin1();
26
27 /*
28 ** Set up our default return value
29 */
30
31 expanded_identifier = "Unknown - ";
32 expanded_identifier += identifier;
33
34 switch( first_character )
35 {
36 case 'A': // AG, AP
37
38 switch( second_character )
39 {
40 case 'G': // AG
41
42 expanded_identifier = "Autopilot - General";
43 break;
44
45 case 'P': // AP
46
47 expanded_identifier = "Autopilot - Magnetic";
48 break;
49 }
50
51 break;
52
53 case 'C': // CD, CS, CT, CV, CX and CC,CM
54
55 switch( second_character )
56 {
57 case 'C': // CC
58
59 expanded_identifier = "Commputer - Programmed Calculator (outdated)";
60 break;
61
62 case 'D': // CD
63
64 expanded_identifier = "Communications - Digital Selective Calling (DSC)";
65 break;
66
67 case 'M': // CM
68
69 expanded_identifier = "Computer - Memory Data (outdated)";
70 break;
71
72 case 'S': // CS
73
74 expanded_identifier = "Communications - Satellite";
75 break;
76
77 case 'T': // CT
78
79 expanded_identifier = "Communications - Radio-Telephone (MF/HF)";
80 break;
81
82 case 'V': // CV
83
84 expanded_identifier = "Communications - Radio-Telephone (VHF)";
85 break;
86
87 case 'X': // CX
88
89 expanded_identifier = "Communications - Scanning Receiver";
90 break;
91 }
92
93 break;
94
95 case 'D': // DE, DF
96
97 switch( second_character )
98 {
99 case 'E': // DE
100
101 expanded_identifier = "DECCA Navigation";
102 break;
103
104 case 'F': // DF
105
106 expanded_identifier = "Direction Finder";
107 break;
108 }
109
110 break;
111
112 case 'E': // EC, EP, ER
113
114 switch( second_character )
115 {
116 case 'C': // EC
117
118 expanded_identifier = "Electronic Chart Display & Information System (ECDIS)";
119 break;
120
121 case 'P': // EP
122
123 expanded_identifier = "Emergency Position Indicating Beacon (EPIRB)";
124 break;
125
126 case 'R': // ER
127
128 expanded_identifier = "Engine Room Monitoring Systems";
129 break;
130 }
131
132 break;
133
134 case 'G': // GP
135
136 switch( second_character )
137 {
138 case 'P': // GP
139
140 expanded_identifier = "Global Positioning System (GPS)";
141 break;
142 }
143
144 break;
145
146 case 'H': // HC, HE, HN
147
148 switch( second_character )
149 {
150 case 'C': // HC
151
152 expanded_identifier = "Heading - Magnetic Compass";
153 break;
154
155 case 'E': // HE
156
157 expanded_identifier = "Heading - North Seeking Gyro";
158 break;
159
160 case 'N': // HN
161
162 expanded_identifier = "Heading - Non North Seeking Gyro";
163 break;
164 }
165
166 break;
167
168 case 'I': // II, IN
169
170 switch( second_character )
171 {
172 case 'I': // II
173
174 expanded_identifier = "Integrated Instrumentation";
175 break;
176
177 case 'N': // IN
178
179 expanded_identifier = "Integrated Navigation";
180 break;
181 }
182
183 break;
184
185 case 'L': // LA, LC
186
187 switch( second_character )
188 {
189 case 'A': // LA
190
191 expanded_identifier = "Loran A";
192 break;
193
194 case 'C': // LC
195
196 expanded_identifier = "Loran C";
197 break;
198 }
199
200 break;
201
202 case 'M': // MP
203
204 switch( second_character )
205 {
206 case 'P': // MP
207
208 expanded_identifier = "Microwave Positioning System (outdated)";
209 break;
210 }
211
212 break;
213
214 case 'O': // OM, OS
215
216 switch( second_character )
217 {
218 case 'M': // OM
219
220 expanded_identifier = "OMEGA Navigation System";
221 break;
222
223 case 'S': // OS
224
225 expanded_identifier = "Distress Alarm System (outdated)";
226 break;
227 }
228
229 break;
230
231 case 'P': // P
232
233 break;
234
235 case 'R': // RA
236
237 switch( second_character )
238 {
239 case 'A': // RA
240
241 expanded_identifier = "RADAR and/or ARPA";
242 break;
243 }
244
245 break;
246
247 case 'S': // SD, SN, SS
248
249 switch( second_character )
250 {
251 case 'D': // SD
252
253 expanded_identifier = "Sounder, Depth";
254 break;
255
256 case 'N': // SN
257
258 expanded_identifier = "Electronic Positioning System, other/general";
259 break;
260
261 case 'S': // SS
262
263 expanded_identifier = "Sounder, Scanning";
264 break;
265 }
266
267 break;
268
269 case 'T': // TI, TR
270
271 switch( second_character )
272 {
273 case 'I': // TI
274
275 expanded_identifier = "Turn Rate Indicator";
276 break;
277
278 case 'R': // TR
279
280 expanded_identifier = "TRANSIT Navigation System";
281 break;
282 }
283
284 break;
285
286 case 'V': // VD, VM, VW
287
288 switch( second_character )
289 {
290 case 'D': // VD
291
292 expanded_identifier = "Velocity Sensor, Doppler, other/general";
293 break;
294
295 case 'M': // VM
296
297 expanded_identifier = "Velocity Sensor, Speed Log, Water, Magnetic";
298 break;
299
300 case 'W': // VW
301
302 expanded_identifier = "Velocity Sensor, Speed Log, Water, Mechanical";
303 break;
304 }
305
306 break;
307
308
309 case 'W': // WI
310
311 switch( second_character )
312 {
313 case 'I': // WI
314
315 expanded_identifier = "Weather Instruments";
316 break;
317 }
318
319 break;
320
321 case 'Y': // YC, YD, YF, YL, YP, YR, YT, YV, YX
322
323 switch( second_character )
324 {
325 case 'C': // YC
326
327 expanded_identifier = "Transducer - Temperature (outdated)";
328 break;
329
330 case 'D': // YD
331
332 expanded_identifier = "Transducer - Displacement, Angular or Linear (outdated)";
333 break;
334
335 case 'F': // YF
336
337 expanded_identifier = "Transducer - Frequency (outdated)";
338 break;
339
340 case 'L': // YL
341
342 expanded_identifier = "Transducer - Level (outdated)";
343 break;
344
345 case 'P': // YP
346
347 expanded_identifier = "Transducer - Pressure (outdated)";
348 break;
349
350 case 'R': // YR
351
352 expanded_identifier = "Transducer - Flow Rate (outdated)";
353 break;
354
355 case 'T': // YT
356
357 expanded_identifier = "Transducer - Tachometer (outdated)";
358 break;
359
360 case 'V': // YV
361
362 expanded_identifier = "Transducer - Volume (outdated)";
363 break;
364
365 case 'X': // YX
366
367 expanded_identifier = "Transducer";
368 break;
369
370 }
371
372 break;
373
374 case 'Z': // ZA, ZC, ZQ, ZV
375
376 switch( second_character )
377 {
378 case 'A': // ZA
379
380 expanded_identifier = "Timekeeper - Atomic Clock";
381 break;
382
383 case 'C': // ZC
384
385 expanded_identifier = "Timekeeper - Chronometer";
386 break;
387
388 case 'Q': // ZQ
389
390 expanded_identifier = "Timekeeper - Quartz";
391 break;
392
393 case 'V': // ZV
394
395 expanded_identifier = "Timekeeper - Radio Update, WWV or WWVH";
396 break;
397 }
398
399 break;
400 }
401
402 return( expanded_identifier );
403}
Note: See TracBrowser for help on using the repository browser.