novatel.h File Reference


Detailed Description

GNSS core 'c' function library: decoding/encoding NovAtel data.

Author:
Glenn D. MacGougan (GDM)
Date:
2007-11-29
Since:
2006-08-04
REFERENCES

"LICENSE INFORMATION"
Copyright (c) 2007, refer to 'author' doxygen tags
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file novatel.h.

#include <stdio.h>
#include "basictypes.h"

Go to the source code of this file.

Data Structures

struct  NOVATELOEM3_structObservation
 A NOVATEL OEM3 observation message container. i.e. RGEB container. More...
struct  NOVATELOEM3_structREPB
 A container for REPB (raw ephemeris) data. More...
struct  NOVATELOEM4_structTrackingStatus
 The NovAtel OEM4 tracking status. More...
struct  NOVATELOEM4_structRxStatusBitField
 The NovAtel OEM4 receiver status bitfield. More...
struct  NOVATELOEM4_structBinaryHeader
 The NovAtel OEM4 binary message header. More...
struct  NOVATELOEM4_structObservation
 A container for a NovAtel OEM4 observation. More...
struct  NOVATELOEM4_structBestPosition
 A container for the best position, BESTPOS, record. More...
struct  NOVATELOEM4_structTime
 A container for the TIME message. More...

Enumerations

enum  NOVATELOEM3_enumMessageType {
  NOVATELOEM3_POSB = 1,
  NOVATELOEM3_TM1B = 3,
  NOVATELOEM3_IONB = 16,
  NOVATELOEM3_UTCB = 17,
  NOVATELOEM3_ALMB = 18,
  NOVATELOEM3_REPB = 14,
  NOVATELOEM3_RGEB = 32
}
 brief This enumeration is for the supported NovAtel OEM3 message types. More...
enum  NOVATELOEM3_enumSolutionStatus
 brief This enumeration is for the NovAtel OEM3 solution status indicator. More...
enum  NOVATELOEM4_enumMessageType
 This enumeration is for NovAtel OEM4 message types. More...
enum  NOVATELOEM4_enumTrackingState
 This enumeration is for NovAtel OEM4 channel tracking state. More...
enum  NOVATELOEM4_enumCorrelatorSpacing
 This enumeration is for NovAtel OEM4 correlator spacing. More...
enum  NOVATELOEM4_enumSatelliteSystem
 This enumeration is for NovAtel OEM4 satellite system. More...
enum  NOVATELOEM4_enumCodeType
 This enumeration is for NovAtel OEM4 code type. More...
enum  NOVATELOEM4_enumFrequency
 This enumeration is for NovAtel OEM4 frequency. More...
enum  NOVATELOEM4_enumTimeStatus {
  NOVATELOEM4_TIMESTATUS_UNKNOWN = 20,
  NOVATELOEM4_TIMESTATUS_APPROXIMATE = 60,
  NOVATELOEM4_TIMESTATUS_COARSEADJUSTING = 80,
  NOVATELOEM4_TIMESTATUS_COARSE = 100,
  NOVATELOEM4_TIMESTATUS_COARSESTEERING = 120,
  NOVATELOEM4_TIMESTATUS_FREEWHEELING = 130,
  NOVATELOEM4_TIMESTATUS_FINEADJUSTING = 140,
  NOVATELOEM4_TIMESTATUS_FINE = 160,
  NOVATELOEM4_TIMESTATUS_FINESTEERING = 180,
  NOVATELOEM4_TIMESTATUS_SATTIME = 200
}
 The NovAtel OEM4 time status enumeration. More...
enum  NOVATELOEM4_enumSolutionStatus {
  NOVATELOEM4_SOLNSTATUS_SOL_COMPUTED = 0,
  NOVATELOEM4_SOLNSTATUS_INSUFFICIENT_OBS = 1,
  NOVATELOEM4_SOLNSTATUS_NO_CONVERGENCE = 2,
  NOVATELOEM4_SOLNSTATUS_SINGULARITY = 3,
  NOVATELOEM4_SOLNSTATUS_COV_TRACE = 4,
  NOVATELOEM4_SOLNSTATUS_TEST_DIST = 5,
  NOVATELOEM4_SOLNSTATUS_COLD_START = 6,
  NOVATELOEM4_SOLNSTATUS_V_H_LIMIT = 7,
  NOVATELOEM4_SOLNSTATUS_VARIANCE = 8,
  NOVATELOEM4_SOLNSTATUS_RESIDUALS = 9,
  NOVATELOEM4_SOLNSTATUS_DELTA_POS = 10,
  NOVATELOEM4_SOLNSTATUS_NEGATIVE_VAR = 11 ,
  NOVATELOEM4_SOLNSTATUS_INTEGRITY_WARNING = 13,
  NOVATELOEM4_SOLNSTATUS_INS_14 = 14,
  NOVATELOEM4_SOLNSTATUS_INS_15 = 15,
  NOVATELOEM4_SOLNSTATUS_INS_16 = 16,
  NOVATELOEM4_SOLNSTATUS_INS_17 = 17,
  NOVATELOEM4_SOLNSTATUS_PENDING = 18,
  NOVATELOEM4_SOLNSTATUS_INVALID_FIX = 19,
  NOVATELOEM4_SOLNSTATUS_UNAUTHORIZED = 20
}
 NovAtel OEM4 Solution Status enumeration. More...
enum  NOVATELOEM4_enumSolutionType {
  NOVATELOEM4_POS_STATUS_NONE = 0,
  NOVATELOEM4_POS_STATUS_FIXEDPOS = 1,
  NOVATELOEM4_POS_STATUS_FIXEDHEIGHT = 2 ,
  NOVATELOEM4_POS_STATUS_DOPPLER_VELOCITY = 8 ,
  NOVATELOEM4_POS_STATUS_SINGLE = 16,
  NOVATELOEM4_POS_STATUS_PSRDIFF = 17,
  NOVATELOEM4_POS_STATUS_WAAS = 18,
  NOVATELOEM4_POS_STATUS_PROPAGATED = 19,
  NOVATELOEM4_POS_STATUS_OMNISTAR = 20 ,
  NOVATELOEM4_POS_STATUS_L1_FLOAT = 32,
  NOVATELOEM4_POS_STATUS_IONOFREE_FLOAT = 33,
  NOVATELOEM4_POS_STATUS_NARROW_FLOAT = 34,
  NOVATELOEM4_POS_STATUS_L1_INT = 48,
  NOVATELOEM4_POS_STATUS_WIDE_INT = 49,
  NOVATELOEM4_POS_STATUS_NARROW_INT = 50,
  NOVATELOEM4_POS_STATUS_RTK_DIRECT_INS = 51,
  NOVATELOEM4_POS_STATUS_INS_52 = 52,
  NOVATELOEM4_POS_STATUS_INS_53 = 53,
  NOVATELOEM4_POS_STATUS_INS_54 = 54,
  NOVATELOEM4_POS_STATUS_INS_55 = 55,
  NOVATELOEM4_POS_STATUS_INS_56 = 56,
  NOVATELOEM4_POS_STATUS_OMNISTAR_HP = 64,
  NOVATELOEM4_POS_STATUS_OMNISTAR_XP = 65,
  NOVATELOEM4_POS_STATUS_CDGPS = 66
}
 NovAtel OEM4 Position Status enumeration. More...
enum  NOVATELOEM4_enumClockStatus {
  NOVATELOEM4_CLOCK_STATUS_VALID = 0,
  NOVATELOEM4_CLOCK_STATUS_CONVERGING = 1,
  NOVATELOEM4_CLOCK_STATUS_ITERATING = 2,
  NOVATELOEM4_CLOCK_STATUS_INVALID = 3,
  NOVATELOEM4_CLOCK_STATUS_ERROR = 4
}

Functions

BOOL NOVATELOEM3_FindNextMessageInFile (FILE *fid, unsigned char *message, const unsigned maxMessageLength, BOOL *wasEndOfFileReached, BOOL *wasMessageFound, unsigned *filePosition, unsigned *messageLength, unsigned *messageID, unsigned *numberBadChecksums)
 Find the next NovAtel OEM3 message in an open file.
BOOL NOVATELOEM3_FindNextMessageInBuffer (unsigned char *buffer, const unsigned bufferLength, unsigned char *message, const unsigned maxMessageLength, BOOL *wasEndOfBufferReached, BOOL *wasMessageFound, unsigned *startPosition, unsigned *messageLength, unsigned *messageID, unsigned *numberBadChecksums)
 Find the next NovAtel OEM3 message in a data buffer.
BOOL NOVATELOEM3_DecodeREPB (const unsigned char *message, const unsigned messageLength, unsigned *prn, unsigned *tow, unsigned short *iodc, unsigned char *iode, unsigned *toe, unsigned *toc, unsigned short *week, unsigned char *health, unsigned char *alert_flag, unsigned char *anti_spoof, unsigned char *code_on_L2, unsigned char *ura, unsigned char *L2_P_data_flag, unsigned char *fit_interval_flag, unsigned short *age_of_data_offset, double *tgd, double *af2, double *af1, double *af0, double *m0, double *delta_n, double *ecc, double *sqrta, double *omega0, double *i0, double *w, double *omegadot, double *idot, double *cuc, double *cus, double *crc, double *crs, double *cic, double *cis)
 Decode a NovAtel OEM3 REPB message.
BOOL NOVATELOEM3_DecodeRGEB (const unsigned char *message, const unsigned messageLength, NOVATELOEM3_structObservationHeader *obsHeader, NOVATELOEM3_structObservation *obsArray, const unsigned char maxNrObs, unsigned *nrObs)
 Decode a NovAtel OEM3 RGEB message.
BOOL NOVATELOEM3_DecodePOSB (const unsigned char *message, const unsigned messageLength, unsigned short *gps_week, double *gps_tow, double *latitude_degs, double *longitude_degs, double *height_msl, double *undulation, unsigned int *datum_id, double *lat_std, double *lon_std, double *hgt_std, NOVATELOEM3_enumSolutionStatus *status)
 Decode a NovAtel OEM3 POSB message.
BOOL NOVATELOEM3_DecodeTM1B (const unsigned char *message, const unsigned messageLength, unsigned short *gps_week, double *gps_tow, double *clk_offset, double *clk_offset_std, double *utc_offset, BOOL *is_clk_stabilized)
 Decode a NovAtel OEM3 TM1B message.
BOOL NOVATELOEM3_DecodeIONB (const unsigned char *message, const unsigned messageLength, double *alpha0, double *alpha1, double *alpha2, double *alpha3, double *beta0, double *beta1, double *beta2, double *beta3)
 Decode a NovAtel OEM3 IONB message.
BOOL NOVATELOEM4_FindNextMessageInFile (FILE *fid, unsigned char *message, const unsigned maxMessageLength, BOOL *wasEndOfFileReached, BOOL *wasMessageFound, unsigned *filePosition, unsigned short *messageLength, unsigned short *messageID, unsigned *numberBadCRC)
 Find the next NovAtel OEM4 message in an open file.
BOOL NOVATELOEM4_FindNextMessageInBuffer (unsigned char *buffer, const unsigned bufferLength, unsigned char *message, const unsigned maxMessageLength, BOOL *wasEndOfBufferReached, BOOL *wasMessageFound, unsigned *startPosition, unsigned short *messageLength, unsigned short *messageID, unsigned *numberBadCRC)
 Find the next NovAtel OEM4 message in a buffer.
BOOL NOVATELOEM4_DecodeBinaryMessageHeader (const unsigned char *message, const unsigned short messageLength, NOVATELOEM4_structBinaryHeader *header)
 Decode a Novatel OEM4 binary message header given a complete binary message.
BOOL NOVATELOEM4_DecodeRANGEB (const unsigned char *message, const unsigned short messageLength, NOVATELOEM4_structBinaryHeader *header, NOVATELOEM4_structObservation *obsArray, const unsigned char maxNrObs, unsigned *nrObs)
 Decode a NovAtel OEM4 RANGEB message.
BOOL NOVATELOEM4_DecodeBESTPOSB (const unsigned char *message, const unsigned short messageLength, NOVATELOEM4_structBinaryHeader *header, NOVATELOEM4_structBestPosition *bestpos)
 Decode a NovAtel OEM4 BESTPOSB message.
BOOL NOVATELOEM4_DecodeTIMEB (const unsigned char *message, const unsigned short messageLength, NOVATELOEM4_structBinaryHeader *header, NOVATELOEM4_structTime *time_data)
 Decode a NovAtel OEM4 TIMEB message.
BOOL NOVATELOEM4_DecodeTrackingStatus (const unsigned rawTrackingStatus, NOVATELOEM4_structTrackingStatus *trackingStatus)
 Decode the raw 32 bit value that contains tracking status information.
BOOL NOVATELOEM4_DecodeRAWEPHEMB (const unsigned char *message, const unsigned short messageLength, NOVATELOEM4_structBinaryHeader *header, unsigned *prn, unsigned *reference_week, unsigned *reference_time, unsigned *tow, unsigned short *iodc, unsigned char *iode, unsigned *toe, unsigned *toc, unsigned short *week, unsigned char *health, unsigned char *alert_flag, unsigned char *anti_spoof, unsigned char *code_on_L2, unsigned char *ura, unsigned char *L2_P_data_flag, unsigned char *fit_interval_flag, unsigned short *age_of_data_offset, double *tgd, double *af2, double *af1, double *af0, double *m0, double *delta_n, double *ecc, double *sqrta, double *omega0, double *i0, double *w, double *omegadot, double *idot, double *cuc, double *cus, double *crc, double *crs, double *cic, double *cis)
 Decode a NovAtel OEM4 RAWEPHEMB message.
BOOL NOVATELOEM4_DecodeRANGECMPB (const unsigned char *message, const unsigned short messageLength, NOVATELOEM4_structBinaryHeader *header, NOVATELOEM4_structObservation *obsArray, const unsigned char maxNrObs, unsigned *nrObs)
 Decode a NovAtel OEM4 RANGEBCMPB message.


Enumeration Type Documentation

enum NOVATELOEM3_enumMessageType

brief This enumeration is for the supported NovAtel OEM3 message types.

Enumerator:
NOVATELOEM3_POSB  message 1, byte count = 88
NOVATELOEM3_TM1B  message 3, byte count = 52
NOVATELOEM3_IONB  message 16, byte count = 76
NOVATELOEM3_UTCB  message 17, byte count = 52
NOVATELOEM3_ALMB  message 18, byte count = 120
NOVATELOEM3_REPB  message 14, byte count = 108
NOVATELOEM3_RGEB  message 32, byte count = 32 + obs * 44

Definition at line 53 of file novatel.h.

enum NOVATELOEM3_enumSolutionStatus

brief This enumeration is for the NovAtel OEM3 solution status indicator.

Definition at line 66 of file novatel.h.

enum NOVATELOEM4_enumClockStatus

Enumerator:
NOVATELOEM4_CLOCK_STATUS_VALID  The clock model is valid.
NOVATELOEM4_CLOCK_STATUS_CONVERGING  The clock model is near validity.
NOVATELOEM4_CLOCK_STATUS_ITERATING  The clock model is iterating towards validity.
NOVATELOEM4_CLOCK_STATUS_INVALID  The clock model is not valid.
NOVATELOEM4_CLOCK_STATUS_ERROR  Clock model error.

Definition at line 479 of file novatel.h.

enum NOVATELOEM4_enumCodeType

This enumeration is for NovAtel OEM4 code type.

Definition at line 247 of file novatel.h.

enum NOVATELOEM4_enumCorrelatorSpacing

This enumeration is for NovAtel OEM4 correlator spacing.

Definition at line 225 of file novatel.h.

enum NOVATELOEM4_enumFrequency

This enumeration is for NovAtel OEM4 frequency.

Definition at line 258 of file novatel.h.

enum NOVATELOEM4_enumMessageType

This enumeration is for NovAtel OEM4 message types.

Definition at line 170 of file novatel.h.

enum NOVATELOEM4_enumSatelliteSystem

This enumeration is for NovAtel OEM4 satellite system.

Definition at line 236 of file novatel.h.

enum NOVATELOEM4_enumSolutionStatus

NovAtel OEM4 Solution Status enumeration.

Enumerator:
NOVATELOEM4_SOLNSTATUS_SOL_COMPUTED  Solution computed.
NOVATELOEM4_SOLNSTATUS_INSUFFICIENT_OBS  Insufficient observations.
NOVATELOEM4_SOLNSTATUS_NO_CONVERGENCE  No convergence.
NOVATELOEM4_SOLNSTATUS_SINGULARITY  Singularity at parameters matrix.
NOVATELOEM4_SOLNSTATUS_COV_TRACE  Covariance trace exceeds maximum (trace > 1000 m).
NOVATELOEM4_SOLNSTATUS_TEST_DIST  Test distance exceeded (maximum of 3 rejections if distance > 10 km).
NOVATELOEM4_SOLNSTATUS_COLD_START  Not yet converged from cold start.
NOVATELOEM4_SOLNSTATUS_V_H_LIMIT  Height or velocity limits exceeded (in accordance with COCOM export licensing restrictions).
NOVATELOEM4_SOLNSTATUS_VARIANCE  Variance exceeds limits.
NOVATELOEM4_SOLNSTATUS_RESIDUALS  Residuals are too large.
NOVATELOEM4_SOLNSTATUS_DELTA_POS  Delta position is too large.
NOVATELOEM4_SOLNSTATUS_NEGATIVE_VAR  Negative variance.
NOVATELOEM4_SOLNSTATUS_INTEGRITY_WARNING  Large residuals make position unreliable.
NOVATELOEM4_SOLNSTATUS_INS_14  INS solution status values - Output only when using an inertial navigation system such as NovAtel’s SPAN products.
NOVATELOEM4_SOLNSTATUS_INS_15  INS solution status values - Output only when using an inertial navigation system such as NovAtel’s SPAN products.
NOVATELOEM4_SOLNSTATUS_INS_16  INS solution status values - Output only when using an inertial navigation system such as NovAtel’s SPAN products.
NOVATELOEM4_SOLNSTATUS_INS_17  INS solution status values - Output only when using an inertial navigation system such as NovAtel’s SPAN products.
NOVATELOEM4_SOLNSTATUS_PENDING  When a FIX POSITION command is entered, the receiver computes its own position and determines if the fixed position is valid. PENDING implies there are not enough satellites being tracked to verify if the FIX POSITION entered into the receiver is valid. The receiver needs to be tracking two or more GPS satellites to perform this check. Under normal conditions you should only see PENDING for a few seconds on power up before the GPS receiver has locked onto its first few satellites. If your antenna is obstructed (or not plugged in) and you have entered a FIX POSITION command, then you may see PENDING indefinitely.
NOVATELOEM4_SOLNSTATUS_INVALID_FIX  The fixed position, entered using the FIX POSITION command, is not valid.
NOVATELOEM4_SOLNSTATUS_UNAUTHORIZED  Position type is unauthorized - HP or XP on a receiver not authorized for it.

Definition at line 376 of file novatel.h.

enum NOVATELOEM4_enumSolutionType

NovAtel OEM4 Position Status enumeration.

Enumerator:
NOVATELOEM4_POS_STATUS_NONE  No solution.
NOVATELOEM4_POS_STATUS_FIXEDPOS  Position has been fixed by the FIX POSITION command.
NOVATELOEM4_POS_STATUS_FIXEDHEIGHT  Position has been fixed by the FIX HEIGHT/AUTO command.
NOVATELOEM4_POS_STATUS_DOPPLER_VELOCITY  Velocity computed using instantaneous Doppler.
NOVATELOEM4_POS_STATUS_SINGLE  Single point position.
NOVATELOEM4_POS_STATUS_PSRDIFF  Pseudorange differential solution.
NOVATELOEM4_POS_STATUS_WAAS  Solution calculated using corrections from an SBAS.
NOVATELOEM4_POS_STATUS_PROPAGATED  Propagated by a Kalman filter without new observations.
NOVATELOEM4_POS_STATUS_OMNISTAR  OmniSTAR VBS position (L1 sub-meter) a.
NOVATELOEM4_POS_STATUS_L1_FLOAT  Floating L1 ambiguity solution.
NOVATELOEM4_POS_STATUS_IONOFREE_FLOAT  Floating ionospheric-free ambiguity solution.
NOVATELOEM4_POS_STATUS_NARROW_FLOAT  Floating narrow-lane ambiguity solution.
NOVATELOEM4_POS_STATUS_L1_INT  Integer L1 ambiguity solution.
NOVATELOEM4_POS_STATUS_WIDE_INT  Integer wide-lane ambiguity solution.
NOVATELOEM4_POS_STATUS_NARROW_INT  Integer narrow-lane ambiguity solution.
NOVATELOEM4_POS_STATUS_RTK_DIRECT_INS  RTK status where the RTK filter is directly initialized from the INS filter *b.
NOVATELOEM4_POS_STATUS_INS_52  INS calculated position types *b.
NOVATELOEM4_POS_STATUS_INS_53  INS calculated position types *b.
NOVATELOEM4_POS_STATUS_INS_54  INS calculated position types *b.
NOVATELOEM4_POS_STATUS_INS_55  INS calculated position types *b.
NOVATELOEM4_POS_STATUS_INS_56  INS calculated position types *b.
NOVATELOEM4_POS_STATUS_OMNISTAR_HP  OmniSTAR HP position (L1/L2 decimeter) *a.
NOVATELOEM4_POS_STATUS_OMNISTAR_XP  OmniSTAR XP position.
NOVATELOEM4_POS_STATUS_CDGPS  Position solution using CDGPS correction *a.

Definition at line 403 of file novatel.h.

enum NOVATELOEM4_enumTimeStatus

The NovAtel OEM4 time status enumeration.

Enumerator:
NOVATELOEM4_TIMESTATUS_UNKNOWN  Time validity is unknown.
NOVATELOEM4_TIMESTATUS_APPROXIMATE  Time is set approximately.
NOVATELOEM4_TIMESTATUS_COARSEADJUSTING  Time is approaching coarse precision.
NOVATELOEM4_TIMESTATUS_COARSE  This time is valid to coarse precision.
NOVATELOEM4_TIMESTATUS_COARSESTEERING  Time is coarse set, and is being steered.
NOVATELOEM4_TIMESTATUS_FREEWHEELING  Position is lost, and the range bias cannot be calculated.
NOVATELOEM4_TIMESTATUS_FINEADJUSTING  Time is adjusting to fine precision.
NOVATELOEM4_TIMESTATUS_FINE  Time has fine precision.
NOVATELOEM4_TIMESTATUS_FINESTEERING  Time is fine, set and is being steered.
NOVATELOEM4_TIMESTATUS_SATTIME  Time from satellite. This is only used in logs containing satellite data such as ephemeris and almanac.

Definition at line 287 of file novatel.h.

enum NOVATELOEM4_enumTrackingState

This enumeration is for NovAtel OEM4 channel tracking state.

Definition at line 207 of file novatel.h.


Function Documentation

BOOL NOVATELOEM3_DecodeIONB ( const unsigned char *  message,
const unsigned  messageLength,
double *  alpha0,
double *  alpha1,
double *  alpha2,
double *  alpha3,
double *  beta0,
double *  beta1,
double *  beta2,
double *  beta3 
)

Decode a NovAtel OEM3 IONB message.

Given a message buffer with a complete NovAtel OEM3 IONB binary message, extract the alpha and beta values.

Author:
Glenn D. MacGougan (GDM)
Date:
2008-12-03
Since:
2008-12-03
Returns:
TRUE(1) if successful, FALSE(0) otherwise.
Parameters:
message  The message buffer containing a complete RGEB message (input).
messageLength  The length of the entire message (input).
alpha0  coefficients of a cubic equation representing the amplitude of the vertical delay [s] (output).
alpha1  coefficients of a cubic equation representing the amplitude of the vertical delay [s/semi-circle] (output).
alpha2  coefficients of a cubic equation representing the amplitude of the vertical delay [s/semi-circle^2] (output).
alpha3  coefficients of a cubic equation representing the amplitude of the vertical delay [s/semi-circle^3] (output).
beta0  coefficients of a cubic equation representing the period of the model [s] (output).
beta1  coefficients of a cubic equation representing the period of the model [s/semi-circle] (output).
beta2  coefficients of a cubic equation representing the period of the model [s/semi-circle^2] (output).
beta3  coefficients of a cubic equation representing the period of the model [s/semi-circle^3] (output).

Definition at line 1155 of file novatel.c.

BOOL NOVATELOEM3_DecodePOSB ( const unsigned char *  message,
const unsigned  messageLength,
unsigned short *  gps_week,
double *  gps_tow,
double *  latitude_degs,
double *  longitude_degs,
double *  height_msl,
double *  undulation,
unsigned int *  datum_id,
double *  lat_std,
double *  lon_std,
double *  hgt_std,
NOVATELOEM3_enumSolutionStatus status 
)

Decode a NovAtel OEM3 POSB message.

Given a message buffer with a complete NovAtel OEM3 POSB binary message.

Author:
Glenn D. MacGougan (GDM)
Date:
2008-12-08
Since:
2008-12-08
Returns:
TRUE(1) if successful, FALSE(0) otherwise.
Parameters:
message  The message buffer containing a complete RGEB message (input).
messageLength  The length of the entire message (input).
gps_week  The GPS week number [0-1023], user must account for week rollover (output).
gps_tow  The GPS time of week [0-604800) (output).
latitude_degs  The latitude [deg] (output).
longitude_degs  The longitude [deg] (output).
height_msl  The height (with respect to mean sea level) [m] (output).
undulation  The geoidal undulation [m] (output).
datum_id  The datum id (61 is WGS84) (output).
lat_std  The estimated solution precision (1-sigma) (output).
lon_std  The estimated solution precision (1-sigma) (output).
hgt_std  The estimated solution precision (1-sigma) (output).
status  The solution status indicator.

Definition at line 913 of file novatel.c.

BOOL NOVATELOEM3_DecodeREPB ( const unsigned char *  message,
const unsigned  messageLength,
unsigned *  prn,
unsigned *  tow,
unsigned short *  iodc,
unsigned char *  iode,
unsigned *  toe,
unsigned *  toc,
unsigned short *  week,
unsigned char *  health,
unsigned char *  alert_flag,
unsigned char *  anti_spoof,
unsigned char *  code_on_L2,
unsigned char *  ura,
unsigned char *  L2_P_data_flag,
unsigned char *  fit_interval_flag,
unsigned short *  age_of_data_offset,
double *  tgd,
double *  af2,
double *  af1,
double *  af0,
double *  m0,
double *  delta_n,
double *  ecc,
double *  sqrta,
double *  omega0,
double *  i0,
double *  w,
double *  omegadot,
double *  idot,
double *  cuc,
double *  cus,
double *  crc,
double *  crs,
double *  cic,
double *  cis 
)

Decode a NovAtel OEM3 REPB message.

Given a message buffer with a complete NovAtel OEM3 REPB binary message, this function will decode the content into useable ephemeris information.

Author:
Glenn D. MacGougan (GDM)
Date:
2008-12-01
Since:
2008-12-01
Returns:
TRUE(1) if successful, FALSE(0) otherwise.
Parameters:
message  The message buffer containing a complete RANGEB message (input).
messageLength  The length of the entire message (input).
prn  The satellite PRN number.
tow  The time of week in subframe1, the time of the leading bit edge of subframe 2 [s]
iodc  10 bit issue of data (clock), 8 LSB bits will match the iode []
iode  8 bit issue of data (ephemeris) []
toe  reference time ephemeris (0-604800) [s]
toc  reference time (clock) (0-604800) [s]
week  10 bit gps week 0-1023 (user must account for week rollover ) [week]
health  6 bit health parameter, 0 if healthy, unhealth othersize [0=healthy]
alert_flag  1 = URA may be worse than indicated [0,1]
anti_spoof  anti-spoof flag from 0=off, 1=on [0,1]
code_on_L2  0=reserved, 1=P code on L2, 2=C/A on L2 [0,1,2]
ura  User Range Accuracy lookup code, 0 is excellent, 15 is use at own risk [0-15], see p. 83 GPSICD200C
L2_P_data_flag  flag indicating if P is on L2 1=true [0,1]
fit_interval_flag  fit interval flag (four hour interval or longer) 0=4 fours, 1=greater [0,1]
age_of_data_offset  age of data offset [s]
tgd  group delay [s]
af2  polynomial clock correction coefficient (rate of clock drift) [s/s^2]
af1  polynomial clock correction coefficient (clock drift) [s/s]
af0  polynomial clock correction coefficient (clock bias) [s]
m0  mean anomaly at reference time [rad]
delta_n  mean motion difference from computed value [rad/s]
ecc  eccentricity []
sqrta  square root of the semi-major axis [m^(1/2)]
omega0  longitude of ascending node of orbit plane at weekly epoch [rad]
i0  inclination angle at reference time [rad]
w  argument of perigee [rad]
omegadot  rate of right ascension [rad/s]
idot  rate of inclination angle [rad/s]
cuc  amplitude of the cosine harmonic correction term to the argument of latitude [rad]
cus  amplitude of the sine harmonic correction term to the argument of latitude [rad]
crc  amplitude of the cosine harmonic correction term to the orbit radius [m]
crs  amplitude of the sine harmonic correction term to the orbit radius [m]
cic  amplitude of the cosine harmonic correction term to the angle of inclination [rad]
cis  amplitude of the sine harmonic correction term to the angle of inclination [rad]

Definition at line 618 of file novatel.c.

BOOL NOVATELOEM3_DecodeRGEB ( const unsigned char *  message,
const unsigned  messageLength,
NOVATELOEM3_structObservationHeader *  obsHeader,
NOVATELOEM3_structObservation obsArray,
const unsigned char  maxNrObs,
unsigned *  nrObs 
)

Decode a NovAtel OEM3 RGEB message.

Given a message buffer with a complete NovAtel OEM3 RGEB binary message, and a user provided array of observation structs, this function will decode the binary message into the user provided array.

Author:
Glenn D. MacGougan (GDM)
Date:
2008-12-01
Since:
2008-12-01
Returns:
TRUE(1) if successful, FALSE(0) otherwise.
Parameters:
message  The message buffer containing a complete RGEB message (input).
messageLength  The length of the entire message (input).
obsHeader  A pointer to a user provided struct with obs header info (output).
obsArray  A pointer to a user provided array of NOVATELOEM3_structObservation (output).
maxNrObs  The maximum number of elements in the array provided (input).
nrObs  The number of valid elements set in the array (output).

Definition at line 748 of file novatel.c.

BOOL NOVATELOEM3_DecodeTM1B ( const unsigned char *  message,
const unsigned  messageLength,
unsigned short *  gps_week,
double *  gps_tow,
double *  clk_offset,
double *  clk_offset_std,
double *  utc_offset,
BOOL is_clk_stabilized 
)

Decode a NovAtel OEM3 TM1B message.

Given a message buffer with a complete NovAtel OEM3 TM1B binary message. This log provides the time of the GPSCard 1PPS, normally high, active low pulse (1 millisecond), where falling edge is reference, in GPS week number and seconds into the week. The TM1A/B log follows a 1PPS pulse. It also includes the receiver clock offset, the standard deviation of the receiver clock offset and clock model status. This log will output at a maximum rate of 1 Hz.

Author:
Glenn D. MacGougan (GDM)
Date:
2008-12-08
Since:
2008-12-08
Returns:
TRUE(1) if successful, FALSE(0) otherwise.
Parameters:
message  The message buffer containing a complete RGEB message (input).
messageLength  The length of the entire message (input).
gps_week  The GPS week number [0-1023], user must account for week rollover (output).
gps_tow  The GPS time of week [0-604800) (output).
clk_offset  The receiver clock offset [s] (output). GPSTime = receiver_time - offset.
clk_offset_std  The estimated precision of the clock offset [s] at 1 sigma (output).
utc_offset  The estimated difference between UTC and GPS time. UTC_time = GPS_time + utc_offset. (e.g. -13.0) (output).
is_clk_stabilized  A boolean to indicate if the clock is stable (output).

Definition at line 1048 of file novatel.c.

BOOL NOVATELOEM3_FindNextMessageInBuffer ( unsigned char *  buffer,
const unsigned  bufferLength,
unsigned char *  message,
const unsigned  maxMessageLength,
BOOL wasEndOfBufferReached,
BOOL wasMessageFound,
unsigned *  startPosition,
unsigned *  messageLength,
unsigned *  messageID,
unsigned *  numberBadChecksums 
)

Find the next NovAtel OEM3 message in a data buffer.

Search a valid buffer for the next NovAtel OEM3 message. The user must provide a message buffer with an associated maximum length (8192 bytes recommended ).

Author:
Glenn D. MacGougan (GDM)
Date:
2008-12-03
Since:
2008-12-03
Returns:
TRUE(1) if successful, FALSE(0) otherwise.
Parameters:
buffer  A pointer to a buffer containing input data.
bufferLength  The length of the valid data contained in the buffer.
message  A message buffer in which to place the message found (input/output).
maxMessageLength  The maximum size of the message buffer (input).
wasEndOfBufferReached  Has the end of the buffer been reached (output).
wasMessageFound  Was a valid message found (output).
startPosition  The index into the buffer for the start of the message found (output).
messageLength  The length of the entire message found and stored in the message buffer (output).
messageID  The message ID of the message found.
numberBadChecksums  The number of bad checksum values found. (checksum fails or mistaken messages).

Definition at line 424 of file novatel.c.

BOOL NOVATELOEM3_FindNextMessageInFile ( FILE *  fid,
unsigned char *  message,
const unsigned  maxMessageLength,
BOOL wasEndOfFileReached,
BOOL wasMessageFound,
unsigned *  filePosition,
unsigned *  messageLength,
unsigned *  messageID,
unsigned *  numberBadChecksums 
)

Find the next NovAtel OEM3 message in an open file.

Search a file (FILE*), that is already open, for the next NovAtel OEM3 message. The user must provide a message buffer with an associated maximum length (8192 bytes recommended ).

Author:
Glenn D. MacGougan (GDM)
Date:
2008-12-01
Since:
2008-12-01
Returns:
TRUE(1) if successful, FALSE(0) otherwise.
Parameters:
fid  A file pointer to an open file (input).
message  A message buffer in which to place the message found (input/output).
maxMessageLength  The maximum size of the message buffer (input).
wasEndOfFileReached  Has the end of the file been reached (output).
wasMessageFound  Was a valid message found (output).
filePosition  The file position for the start of the message found (output).
messageLength  The length of the entire message found and stored in the message buffer (output).
messageID  The message ID of the message found.
numberBadChecksums  The number of bad checksum values found. (checksum fails or mistaken messages).

Definition at line 203 of file novatel.c.

BOOL NOVATELOEM4_DecodeBESTPOSB ( const unsigned char *  message,
const unsigned short  messageLength,
NOVATELOEM4_structBinaryHeader header,
NOVATELOEM4_structBestPosition bestpos 
)

Decode a NovAtel OEM4 BESTPOSB message.

Given a message buffer with a complete NovAtel OEM4 BESTPOSB binary message, and a user provided array of observation structs, this function will decode the binary message.

Author:
Glenn D. MacGougan (GDM)
Date:
2008-12-18
Since:
2008-12-18
Returns:
TRUE(1) if successful, FALSE(0) otherwise.
Parameters:
message  The message buffer containing a complete RANGEB message (input).
messageLength  The length of the entire message (input).
header  A pointer to a NovAtel OEM4 header information struct (output).
bestpos  A pointer to a NovAtel OEM4 best position information struct (output).

Definition at line 2114 of file novatel.c.

BOOL NOVATELOEM4_DecodeBinaryMessageHeader ( const unsigned char *  message,
const unsigned short  messageLength,
NOVATELOEM4_structBinaryHeader header 
)

Decode a Novatel OEM4 binary message header given a complete binary message.

Author:
Glenn D. MacGougan (GDM)
Date:
2007-11-29
Since:
2006-11-10
Returns:
TRUE(1) if successful, FALSE(0) otherwise.
Parameters:
message  The message buffer containing a complete NOVATEL OEM4 binary message (input).
messageLength  The length of the entire message (input).
header  A pointer to a NovAtel OEM4 header information struct (output).

Definition at line 1683 of file novatel.c.

BOOL NOVATELOEM4_DecodeRANGEB ( const unsigned char *  message,
const unsigned short  messageLength,
NOVATELOEM4_structBinaryHeader header,
NOVATELOEM4_structObservation obsArray,
const unsigned char  maxNrObs,
unsigned *  nrObs 
)

Decode a NovAtel OEM4 RANGEB message.

Given a message buffer with a complete NovAtel OEM4 RANGEB binary message, and a user provided array of observation structs, this function will decode the binary message into the user provided array.

Author:
Glenn D. MacGougan (GDM)
Date:
2007-11-29
Since:
2006-11-10
Returns:
TRUE(1) if successful, FALSE(0) otherwise.
Parameters:
message  The message buffer containing a complete RANGEB message (input).
messageLength  The length of the entire message (input).
header  A pointer to a NovAtel OEM4 header information struct (output).
obsArray  A pointer to a user provided array of struct_NOVATELOEM4_RANGE (output).
maxNrObs  The maximum number of elements in the array provided (input).
nrObs  The number of valid elements set in the array (output).

Definition at line 1976 of file novatel.c.

BOOL NOVATELOEM4_DecodeRANGECMPB ( const unsigned char *  message,
const unsigned short  messageLength,
NOVATELOEM4_structBinaryHeader header,
NOVATELOEM4_structObservation obsArray,
const unsigned char  maxNrObs,
unsigned *  nrObs 
)

Decode a NovAtel OEM4 RANGEBCMPB message.

Given a message buffer with a complete NovAtel OEM4 RANGECMPB binary message, and a user provided array of observation structs, this function will decode the compressed binary message into the user provided array.

Author:
Ossama Al-Fanek (OA-F)
Date:
March 17, 2007
Remarks:
Reviewed by GDM, March 17, 2007.
Returns:
TRUE(1) if successful, FALSE(0) otherwise.
Parameters:
message  The message buffer containing a complete RANGEB message (input).
messageLength  The length of the entire message (input).
header  A pointer to a NovAtel OEM4 header information struct (output).
obsArray  A pointer to a user provided array of struct_NOVATELOEM4_RANGE (output).
maxNrObs  The maximum number of elements in the array provided (input).
nrObs  The number of valid elements set in the array (output).

Definition at line 1760 of file novatel.c.

BOOL NOVATELOEM4_DecodeRAWEPHEMB ( const unsigned char *  message,
const unsigned short  messageLength,
NOVATELOEM4_structBinaryHeader header,
unsigned *  prn,
unsigned *  reference_week,
unsigned *  reference_time,
unsigned *  tow,
unsigned short *  iodc,
unsigned char *  iode,
unsigned *  toe,
unsigned *  toc,
unsigned short *  week,
unsigned char *  health,
unsigned char *  alert_flag,
unsigned char *  anti_spoof,
unsigned char *  code_on_L2,
unsigned char *  ura,
unsigned char *  L2_P_data_flag,
unsigned char *  fit_interval_flag,
unsigned short *  age_of_data_offset,
double *  tgd,
double *  af2,
double *  af1,
double *  af0,
double *  m0,
double *  delta_n,
double *  ecc,
double *  sqrta,
double *  omega0,
double *  i0,
double *  w,
double *  omegadot,
double *  idot,
double *  cuc,
double *  cus,
double *  crc,
double *  crs,
double *  cic,
double *  cis 
)

Decode a NovAtel OEM4 RAWEPHEMB message.

Given a message buffer with a complete NovAtel OEM4 RAWEPHEMB binary message, this function will decode the content into useable ephemeris information.

Author:
Glenn D. MacGougan (GDM)
Date:
2007-11-29
Since:
2006-11-10
Returns:
TRUE(1) if successful, FALSE(0) otherwise.
Parameters:
message  The message buffer containing a complete RANGEB message (input).
messageLength  The length of the entire message (input).
header  A pointer to a NovAtel OEM4 header information struct (output).
prn  The satellite PRN number.
reference_week  The reference GPS week (0-1024+) [weeks].
reference_time  The reference GPS time of week (0-604800) [s].
tow  The time of week in subframe1, the time of the leading bit edge of subframe 2 [s]
iodc  10 bit issue of data (clock), 8 LSB bits will match the iode []
iode  8 bit issue of data (ephemeris) []
toe  reference time ephemeris (0-604800) [s]
toc  reference time (clock) (0-604800) [s]
week  10 bit gps week 0-1023 (user must account for week rollover ) [week]
health  6 bit health parameter, 0 if healthy, unhealth othersize [0=healthy]
alert_flag  1 = URA may be worse than indicated [0,1]
anti_spoof  anti-spoof flag from 0=off, 1=on [0,1]
code_on_L2  0=reserved, 1=P code on L2, 2=C/A on L2 [0,1,2]
ura  User Range Accuracy lookup code, 0 is excellent, 15 is use at own risk [0-15], see p. 83 GPSICD200C
L2_P_data_flag  flag indicating if P is on L2 1=true [0,1]
fit_interval_flag  fit interval flag (four hour interval or longer) 0=4 fours, 1=greater [0,1]
age_of_data_offset  age of data offset [s]
tgd  group delay [s]
af2  polynomial clock correction coefficient (rate of clock drift) [s/s^2]
af1  polynomial clock correction coefficient (clock drift) [s/s]
af0  polynomial clock correction coefficient (clock bias) [s]
m0  mean anomaly at reference time [rad]
delta_n  mean motion difference from computed value [rad/s]
ecc  eccentricity []
sqrta  square root of the semi-major axis [m^(1/2)]
omega0  longitude of ascending node of orbit plane at weekly epoch [rad]
i0  inclination angle at reference time [rad]
w  argument of perigee [rad]
omegadot  rate of right ascension [rad/s]
idot  rate of inclination angle [rad/s]
cuc  amplitude of the cosine harmonic correction term to the argument of latitude [rad]
cus  amplitude of the sine harmonic correction term to the argument of latitude [rad]
crc  amplitude of the cosine harmonic correction term to the orbit radius [m]
crs  amplitude of the sine harmonic correction term to the orbit radius [m]
cic  amplitude of the cosine harmonic correction term to the angle of inclination [rad]
cis  amplitude of the sine harmonic correction term to the angle of inclination [rad]

Definition at line 2429 of file novatel.c.

BOOL NOVATELOEM4_DecodeTIMEB ( const unsigned char *  message,
const unsigned short  messageLength,
NOVATELOEM4_structBinaryHeader header,
NOVATELOEM4_structTime time_data 
)

Decode a NovAtel OEM4 TIMEB message.

Given a message buffer with a complete NovAtel OEM4 TIMEB binary message, and a user provided array of observation structs, this function will decode the binary message.

Author:
Glenn D. MacGougan (GDM)
Date:
2008-12-18
Since:
2008-12-18
Returns:
TRUE(1) if successful, FALSE(0) otherwise.
Parameters:
message  The message buffer containing a complete RANGEB message (input).
messageLength  The length of the entire message (input).
header  A pointer to a NovAtel OEM4 header information struct (output).
time_data  A pointer to a NovAtel OEM4 best position information struct (output).

Definition at line 2259 of file novatel.c.

BOOL NOVATELOEM4_DecodeTrackingStatus ( const unsigned  rawTrackingStatus,
NOVATELOEM4_structTrackingStatus trackingStatus 
)

Decode the raw 32 bit value that contains tracking status information.

Author:
Glenn D. MacGougan (GDM)
Date:
2007-11-29
Since:
2006-11-10
Returns:
TRUE(1) if successful, FALSE(0) otherwise.
Parameters:
rawTrackingStatus  The raw 32 bit tracking status value (input).
trackingStatus  The decoded tracking status information (output).

Definition at line 2371 of file novatel.c.

BOOL NOVATELOEM4_FindNextMessageInBuffer ( unsigned char *  buffer,
const unsigned  bufferLength,
unsigned char *  message,
const unsigned  maxMessageLength,
BOOL wasEndOfBufferReached,
BOOL wasMessageFound,
unsigned *  startPosition,
unsigned short *  messageLength,
unsigned short *  messageID,
unsigned *  numberBadCRC 
)

Find the next NovAtel OEM4 message in a buffer.

Search a valid buffer for the next NovAtel OEM4 message. The user must provide a message buffer with an associated maximum length (8192 bytes recommended ).

Author:
Glenn D. MacGougan (GDM)
Date:
2008-12-19
Since:
2008-12-19
Returns:
TRUE(1) if successful, FALSE(0) otherwise.
Parameters:
buffer  A pointer to a buffer containing input data.
bufferLength  The length of the valid data contained in the buffer.
message  A message buffer in which to place the message found (input/output).
maxMessageLength  The maximum size of the message buffer (input).
wasEndOfBufferReached  Has the end of the buffer been reached (output).
wasMessageFound  Was a valid message found (output).
startPosition  The index into the buffer for the start of the message found (output).
messageLength  The length of the entire message found and stored in the message buffer (output).
messageID  The message ID of the message found.
numberBadCRC  The number of bad crc values found. (crc fails or mistaken messages).

Definition at line 1479 of file novatel.c.

BOOL NOVATELOEM4_FindNextMessageInFile ( FILE *  fid,
unsigned char *  message,
const unsigned  maxMessageLength,
BOOL wasEndOfFileReached,
BOOL wasMessageFound,
unsigned *  filePosition,
unsigned short *  messageLength,
unsigned short *  messageID,
unsigned *  numberBadCRC 
)

Find the next NovAtel OEM4 message in an open file.

Search a file (FILE*), that is already open, for the next NovAtel OEM4 message. The user must provide a message buffer with an associated maximum length (8192 bytes recommended ).

Author:
Glenn D. MacGougan (GDM)
Date:
2007-11-29
Since:
2006-11-09
Returns:
TRUE(1) if successful, FALSE(0) otherwise.
Parameters:
fid  A file pointer to an open file (input).
message  A message buffer in which to place the message found (input/output).
maxMessageLength  The maximum size of the message buffer (input).
wasEndOfFileReached  Has the end of the file been reached (output).
wasMessageFound  Was a valid message found (output).
filePosition  The file position for the start of the message found (output).
messageLength  The length of the entire message found and stored in the message buffer (output).
messageID  The message ID of the message found.
numberBadCRC  The number of bad crc values found. (crc fails or mistaken messages).

Definition at line 1253 of file novatel.c.

SourceForge.net Logo