nidas v1.2.3
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
32namespace nidas { namespace dynld {
33
40{
41public:
42
44
48 void validate();
49
57 bool process(const Sample* samp,std::list<const Sample*>& results) throw();
58
63 static bool novatelChecksumOK(const char* rec,int len);
64
65private:
66
67 dsm_time_t parseBESTPOS(const char* input,double *dout,int nvars);
68
69 dsm_time_t parseBESTVEL(const char* input,double *dout,int nvars);
70
78 dsm_time_t gps_to_utc(const char* input);
79
80
85
90
95
100
102
106#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7)
107 static const int BESTPOS_SAMPLE_ID;
108#else
109 static const int BESTPOS_SAMPLE_ID = 4;
110#endif
111
115#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7)
116 static const int BESTVEL_SAMPLE_ID;
117#else
118 static const int BESTVEL_SAMPLE_ID = 5;
119#endif
120
122};
123
124}} // namespace nidas namespace dynld
125
126#endif
Interface to a data sample.
Definition Sample.h:190
A class for reading NMEA records from a GPS.
Definition GPS_NMEA_Serial.h:42
A class for reading Novatel records from a GPS.
Definition GPS_Novatel_Serial.h:40
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:289
dsm_time_t gps_to_utc(const char *input)
Calculate time of solution in UTC from the Novatel #BESTxxx packets.
Definition GPS_Novatel_Serial.cc:316
int _bestVelNvars
Number of variables requested from Novatel BESTVEL record (sample id == 5)
Definition GPS_Novatel_Serial.h:94
unsigned int _badNovatelChecksums
Definition GPS_Novatel_Serial.h:121
int _bestPosNvars
Number of variables requested from Novatel BESTPOS record (sample id == 4)
Definition GPS_Novatel_Serial.h:84
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:354
void validate()
Definition GPS_Novatel_Serial.cc:60
static const int BESTPOS_SAMPLE_ID
Id of sample from Novatel BESTPOS record.
Definition GPS_Novatel_Serial.h:107
dsm_time_t parseBESTVEL(const char *input, double *dout, int nvars)
Definition GPS_Novatel_Serial.cc:207
dsm_time_t parseBESTPOS(const char *input, double *dout, int nvars)
Definition GPS_Novatel_Serial.cc:93
static const int BESTVEL_SAMPLE_ID
Id of sample from Novatel BESTPOS record.
Definition GPS_Novatel_Serial.h:116
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:89
dsm_sample_id_t _bestVelId
Full sample id of Novatel BESTVEL variables.
Definition GPS_Novatel_Serial.h:99
dsm_time_t _leapSeconds
Definition GPS_Novatel_Serial.h:101
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:62
unsigned int dsm_sample_id_t
Definition Sample.h:64
Root namespace for the NCAR In-Situ Data Acquisition Software.
Definition A2DConverter.h:31
int len
Definition sing.cc:948