nidas  v1.2-1520
GPS_Novatel_Serial.h
Go to the documentation of this file.
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 4; -*-
2 // vim: set shiftwidth=4 softtabstop=4 expandtab:
3 /*
4  ********************************************************************
5  ** NIDAS: NCAR In-situ Data Acquistion Software
6  **
7  ** 2013, Copyright University Corporation for Atmospheric Research
8  **
9  ** This program is free software; you can redistribute it and/or modify
10  ** it under the terms of the GNU General Public License as published by
11  ** the Free Software Foundation; either version 2 of the License, or
12  ** (at your option) any later version.
13  **
14  ** This program is distributed in the hope that it will be useful,
15  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  ** GNU General Public License for more details.
18  **
19  ** The LICENSE.txt file accompanying this software contains
20  ** a copy of the GNU General Public License. If it is not found,
21  ** write to the Free Software Foundation, Inc.,
22  ** 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23  **
24  ********************************************************************
25 */
26 
27 #ifndef NIDIS_DYNLD_GPS_NOVATEL_SERIAL_H
28 #define NIDIS_DYNLD_GPS_NOVATEL_SERIAL_H
29 
30 #include "GPS_NMEA_Serial.h"
31 
32 namespace nidas { namespace dynld {
33 
40 {
41 public:
42 
44 
46 
54  bool process(const Sample* samp,std::list<const Sample*>& results)
55  throw();
56 
61  static bool novatelChecksumOK(const char* rec,int len);
62 
63 private:
64 
65  dsm_time_t parseBESTPOS(const char* input,double *dout,int nvars,dsm_time_t tt)
66  throw();
67 
68  dsm_time_t parseBESTVEL(const char* input,double *dout,int nvars,dsm_time_t tt)
69  throw();
70 
75 
80 
85 
90 
94 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7)
95  static const int BESTPOS_SAMPLE_ID;
96 #else
97  static const int BESTPOS_SAMPLE_ID = 4;
98 #endif
99 
103 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7)
104  static const int BESTVEL_SAMPLE_ID;
105 #else
106  static const int BESTVEL_SAMPLE_ID = 5;
107 #endif
108 
109  unsigned int _badNovatelChecksums;
110 };
111 
112 }} // namespace nidas namespace dynld
113 
114 #endif
static const int BESTPOS_SAMPLE_ID
Id of sample from Novatel BESTPOS record.
Definition: GPS_Novatel_Serial.h:95
A class for reading NMEA records from a GPS.
Definition: GPS_NMEA_Serial.h:41
unsigned int dsm_sample_id_t
Definition: Sample.h:63
dsm_time_t parseBESTPOS(const char *input, double *dout, int nvars, dsm_time_t tt)
Definition: GPS_Novatel_Serial.cc:93
long long dsm_time_t
Posix time in microseconds, the number of non-leap microseconds since 1970 Jan 1 00:00 UTC...
Definition: Sample.h:61
unsigned int _badNovatelChecksums
Definition: GPS_Novatel_Serial.h:109
void validate()
Implementation of DSMSensor::validate for a Character Sensor.
Definition: GPS_Novatel_Serial.cc:60
int _bestVelNvars
Number of variables requested from Novatel BESTVEL record (sample id == 5)
Definition: GPS_Novatel_Serial.h:84
GPS_Novatel_Serial()
Definition: GPS_Novatel_Serial.cc:52
dsm_sample_id_t _bestPosId
Full sample id of Novatel BESTPOS variables.
Definition: GPS_Novatel_Serial.h:79
int len
Definition: sing.cc:934
Interface to a data sample.
Definition: Sample.h:189
dsm_time_t parseBESTVEL(const char *input, double *dout, int nvars, dsm_time_t tt)
Definition: GPS_Novatel_Serial.cc:198
int _bestPosNvars
Number of variables requested from Novatel BESTPOS record (sample id == 4)
Definition: GPS_Novatel_Serial.h:74
static const int BESTVEL_SAMPLE_ID
Id of sample from Novatel BESTPOS record.
Definition: GPS_Novatel_Serial.h:104
bool process(const Sample *samp, std::list< const Sample * > &results)
Virtual method that is called to convert a raw sample containing an ASCII NMEA message to a processed...
Definition: GPS_Novatel_Serial.cc:313
dsm_sample_id_t _bestVelId
Full sample id of Novatel BESTVEL variables.
Definition: GPS_Novatel_Serial.h:89
A class for reading Novatel records from a GPS.
Definition: GPS_Novatel_Serial.h:39
static bool novatelChecksumOK(const char *rec, int len)
Calculate the checksum of the Novatel message and return a logical indicating whether it is equal to ...
Definition: GPS_Novatel_Serial.cc:286
Definition: InvalidParameterException.h:35