novatel.h

Go to the documentation of this file.
00001 /**
00002 \file    novatel.h
00003 \brief   GNSS core 'c' function library: decoding/encoding NovAtel data.
00004 \author  Glenn D. MacGougan (GDM)
00005 \date    2007-11-29
00006 \since   2006-08-04
00007 
00008 \b REFERENCES \n
00009 - NovAtel OEM4 Command and Log Reference. www.novatel.com.
00010 
00011 \b "LICENSE INFORMATION" \n
00012 Copyright (c) 2007, refer to 'author' doxygen tags \n
00013 All rights reserved. \n
00014 
00015 Redistribution and use in source and binary forms, with or without
00016 modification, are permitted provided the following conditions are met: \n
00017 
00018 - Redistributions of source code must retain the above copyright
00019   notice, this list of conditions and the following disclaimer. \n
00020 - Redistributions in binary form must reproduce the above copyright
00021   notice, this list of conditions and the following disclaimer in the
00022   documentation and/or other materials provided with the distribution. \n
00023 - The name(s) of the contributor(s) may not be used to endorse or promote 
00024   products derived from this software without specific prior written 
00025   permission. \n
00026 
00027 THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS 
00028 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
00029 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00030 DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
00031 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00032 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
00033 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
00034 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
00035 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
00036 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
00037 SUCH DAMAGE.
00038 */
00039 
00040 #ifndef _C_NOVATEL_H_
00041 #define _C_NOVATEL_H_
00042 
00043 #ifdef __cplusplus
00044 extern "C" {
00045 #endif
00046 
00047 #include "basictypes.h"
00048 
00049 /// \brief  This enumeration is for NovAtel OEM4 message types.
00050 typedef enum 
00051 {
00052   NOVATELOEM4_IONUTCB               = 8,
00053   NOVATELOEM4_CLOCKMODELB           = 16,
00054   NOVATELOEM4_RAWGPSSUBFRAMEB       = 25,
00055   NOVATELOEM4_CHANDEBUGB            = 32,
00056   NOVATELOEM4_VERSIONB              = 37,
00057   NOVATELOEM4_RAWEPHEMB             = 41,
00058   NOVATELOEM4_BESTPOSB              = 42,
00059   NOVATELOEM4_RANGEB                = 43,
00060   NOVATELOEM4_PSRPOSB               = 47,
00061   NOVATELOEM4_SATVISB               = 48,
00062   NOVATELOEM4_ALMANACB              = 73,
00063   NOVATELOEM4_RAWALMB               = 74,
00064   NOVATELOEM4_TRACKSTATB            = 83,
00065   NOVATELOEM4_SATSTATB              = 84,
00066   NOVATELOEM4_RXSTATUSB             = 93,
00067   NOVATELOEM4_RXSTATUSEVENTB        = 94,
00068   NOVATELOEM4_MATCHEDPOSB           = 96,
00069   NOVATELOEM4_BESTVELB              = 99,
00070   NOVATELOEM4_PSRVELB               = 100,
00071   NOVATELOEM4_TIMEB                 = 101,
00072   NOVATELOEM4_RANGEPNB              = 126,
00073   NOVATELOEM4_RXCONFIGB             = 128,
00074   NOVATELOEM4_RANGECMPB             = 140,
00075   NOVATELOEM4_RTKPOSB               = 141,
00076   NOVATELOEM4_NAVIGATEB             = 161,
00077   NOVATELOEM4_AVEPOSB               = 172,
00078   NOVATELOEM4_REFSTATIONB           = 175,
00079   NOVATELOEM4_PASSCOM1B             = 233,
00080   NOVATELOEM4_PASSCOM2B             = 234,
00081   NOVATELOEM4_PASSCOM3B             = 235,
00082   NOVATELOEM4_MESSAGETYPE_UNKNOWN
00083 
00084 } NOVATELOEM4_enumMessageType;
00085 
00086 /// \brief  This enumeration is for NovAtel OEM4 channel tracking state.
00087 typedef enum 
00088 {
00089   NOVATELOEM4_L1Idle                      = 0,
00090   NOVATELOEM4_L1SkySearch                 = 1,
00091   NOVATELOEM4_L1WideFrequencyBandPullIn   = 2,
00092   NOVATELOEM4_L1NarrorFrequencyBandPullIn = 3,
00093   NOVATELOEM4_L1PhaseLockLoop             = 4,
00094   NOVATELOEM4_L1ReAcquisition             = 5,
00095   NOVATELOEM4_L1Steerin                   = 6,
00096   NOVATELOEM4_L1FrequencyLockLoop         = 7,
00097   NOVATELOEM4_L2Idle                      = 8,
00098   NOVATELOEM4_L2PCodeAlignment            = 9,
00099   NOVATELOEM4_L2Search                    = 10,
00100   NOVATELOEM4_L2PhaseLockLoop             = 11
00101 
00102 } NOVATELOEM4_enumTrackingState;
00103 
00104 /// \brief  This enumeration is for NovAtel OEM4 correlator spacing.
00105 typedef enum 
00106 {
00107   NOVATELOEM4_ReservedSpacingA        = 0,
00108   NOVATELOEM4_OneChipSpacing          = 1,
00109   NOVATELOEM4_NarrowSpacing           = 2,
00110   NOVATELOEM4_ReservedSpacingB        = 3,
00111   NOVATELOEM4_PulseApertureCorrelator = 4,
00112 
00113 } NOVATELOEM4_enumCorrelatorSpacing;
00114 
00115 /// \brief  This enumeration is for NovAtel OEM4 satellite system.
00116 typedef enum
00117 {
00118   NOVATELOEM4_GPSSystem        = 0,
00119   NOVATELOEM4_GLONASSSystem    = 1,
00120   NOVATELOEM4_WAASSystem       = 2,
00121   NOVATELOEM4_PseudoliteSystem = 3,
00122   NOVATELOEM4_ReservedSystem 
00123 
00124 } NOVATELOEM4_enumSatelliteSystem;
00125 
00126 /// \brief  This enumeration is for NovAtel OEM4 code type.
00127 typedef enum 
00128 {
00129   NOVATELOEM4_CACode     = 0,
00130   NOVATELOEM4_PCode      = 1,
00131   NOVATELOEM4_PCodeless  = 2,  
00132   NOVATELOEM4_L2C        = 4,
00133   
00134   NOVATELOEM4_ReservedCodeType 
00135 } NOVATELOEM4_enumCodeType;
00136 
00137 /// \brief  This enumeration is for NovAtel OEM4 frequency.
00138 typedef enum 
00139 {
00140   NOVATELOEM4_L1 = 0,
00141   NOVATELOEM4_L2 = 1,         
00142   NOVATELOEM4_ReservedFrequency
00143 
00144 } NOVATELOEM4_enumFrequency;
00145 
00146 /// \brief  The NovAtel OEM4 tracking status.
00147 typedef struct 
00148 {
00149   NOVATELOEM4_enumTrackingState      eTrackingState;     //!< The channel tracking state. 
00150   unsigned                           channelNumber;      //!< The channel index.
00151   BOOL                               isPhaseLocked;      //!< Is the channel phase locked (TRUE/FALSE)?
00152   BOOL                               isParityKnown;      //!< Is the parity known (TRUE/FALSE)? if not there is a possible 1/2 cycle ambiguity. Do NOT use the adr measurement without valid parity!
00153   BOOL                               isCodeLocked;       //!< Is the channel code locked (TRUE/FALSE)? The pseudorange is invalid if FALSE.
00154   NOVATELOEM4_enumCorrelatorSpacing  eCorrelatorSpacing; //!< The correlator spacing.
00155   NOVATELOEM4_enumSatelliteSystem    eSatelliteSystem;   //!< The satellite sytem for this channel.
00156   BOOL                               isGrouped;          //!< Is this measurement grouped (TRUE/FALSE)? e.g. tracking L1 & L2 for a single satellite.
00157   NOVATELOEM4_enumFrequency          eFrequency;         //!< The frequency type for this channel.
00158   NOVATELOEM4_enumCodeType           eCodeType;          //!< The code type for this channel.
00159   BOOL                               isFECEnabled;       //!< Is forward error correction enable (TRUE/FALSE)?
00160   BOOL                               isPrimaryL1Channel; //!< Is this the primary L1 channel (TRUE/FALSE)?
00161   BOOL                               isHalfCycleAdded;   //!< Has a half cycle been added to the adr after the parity determination (TRUE/FALSE)?
00162   BOOL                               isForcedAssignment; //!< Is this channel forced to track this PRN by the user (TRUE/FALSE)?
00163 
00164 } NOVATELOEM4_structTrackingStatus;
00165 
00166 /// \brief  The NovAtel OEM4 time status enumeration.
00167 typedef enum
00168 {
00169   NOVATELOEM4_TIMESTATUS_UNKNOWN         = 20,  //!< Time validity is unknown.
00170   NOVATELOEM4_TIMESTATUS_APPROXIMATE     = 60,  //!< Time is set approximately.
00171   NOVATELOEM4_TIMESTATUS_COARSEADJUSTING = 80,  //!< Time is approaching coarse precision.
00172   NOVATELOEM4_TIMESTATUS_COARSE          = 100, //!< This time is valid to coarse precision.
00173   NOVATELOEM4_TIMESTATUS_COARSESTEERING  = 120, //!< Time is coarse set, and is being steered.
00174   NOVATELOEM4_TIMESTATUS_FREEWHEELING    = 130, //!< Position is lost, and the range bias cannot be calculated.
00175   NOVATELOEM4_TIMESTATUS_FINEADJUSTING   = 140, //!< Time is adjusting to fine precision.
00176   NOVATELOEM4_TIMESTATUS_FINE            = 160, //!< Time has fine precision.
00177   NOVATELOEM4_TIMESTATUS_FINESTEERING    = 180, //!< Time is fine, set and is being steered.
00178   NOVATELOEM4_TIMESTATUS_SATTIME         = 200  //!< Time from satellite. This is only used in logs containing satellite data such as ephemeris and almanac.
00179 
00180 } NOVATELOEM4_enumTimeStatus;
00181 
00182 /// \brief  The NovAtel OEM4 receiver status bitfield.
00183 typedef struct
00184 {
00185   unsigned isErrorIndicated:1;           //!< A boolean to indicate if any errors indicated by the receiver. Check the receiver status message if any error is indicated.
00186   unsigned isTemperatureBad:1;           //!< A boolean to indicate if there is a temperature status warning. 
00187   unsigned isVoltageBad:1;               //!< A boolean to indicate if there is a voltage supply status warngin.
00188   unsigned isAntennaNotPowered:1;        //!< A boolean to indicate if the antenna is NOT powered.
00189   unsigned reserved_a:1;                 //!< reserved
00190   unsigned isAntennaOpen:1;              //!< A boolean to indicate if the antenna is open.
00191   unsigned isAntennaShorted:1;           //!< A boolean to indicate if the antenna is shorted.
00192   unsigned isCPUOverloaded:1;            //!< A boolean to indicate if the CPU is overloaded.
00193   unsigned isCOM1BufferOverrun:1;        //!< A boolean to indicate if COM1 buffer is overrun.
00194   unsigned isCOM2BufferOverrun:1;        //!< A boolean to indicate if COM2 buffer is overrun.
00195   unsigned isCOM3BufferOverrun:1;        //!< A boolean to indicate if COM3 buffer is overrun.
00196   unsigned isUSBBufferOverrun:1;         //!< A boolean to indicate if USB buffer is overrun.
00197   unsigned reserved_b:3;                 //!< reserved.
00198   unsigned isRF1_AGC_StatusBad:1;        //!< A boolean to indicate if the RF1 AGC status is invalid.
00199   unsigned reserved_c:1;                 //!< reserved.
00200   unsigned isRF2_AGC_StatusBad:1;        //!< A boolean to indicate if the RF2 AGC status if invalid.
00201   unsigned isAlmanacInvalid:1;           //!< A boolean to indicate if the almanac is invalid.
00202   unsigned isPositionSolutionInvalid:1;  //!< A boolean to indicate if the position solution is invalid.
00203   unsigned isPositionFixed:1;            //!< A boolean to indicate if the user has fixed the receiver's antenna position.
00204   unsigned isClockSteeringDisabled:1;    //!< A boolean to indicate if clock steering is disabled.
00205   unsigned isClockModelInvalid:1;        //!< A boolean to indicate if the clock model is invalid.
00206   unsigned isExternalOcsillatorDriven:1; //!< A boolean to indicate if the receiver is driven by an external oscillator.
00207   unsigned isSoftwareResouceBad:1;       //!< A boolean to indicate if there is a software resource warning.
00208   unsigned reserved_d:4;                 //!< reserved.
00209   unsigned isAUX3StatusEvent:1;          //!< A boolean to indicate if an AUX3 status event has occurred.
00210   unsigned isAUX2StatusEvent:1;          //!< A boolean to indicate if an AUX2 status event has occurred.
00211   unsigned isAUX1StatusEvent:1;          //!< A boolean to indicate if an AUX1 status event has occurred.
00212 
00213 } NOVATELOEM4_structRxStatusBitField;
00214 
00215 
00216 /// \brief  The NovAtel OEM4 binary message header.
00217 typedef struct 
00218 {
00219   // 0xAA 0x44 0x12 sync bytes
00220   unsigned char                       headerLength;    //!< The header length [bytes].
00221   unsigned short                      messageID;       //!< The binary message ID.
00222   char                                messageType;     //!< The message type.
00223   char                                portAddress;     //!< The port address.
00224   unsigned short                      dataLength;      //!< The length of the data part of the message (length of entire mesage - header size - CRC size) [bytes].
00225   unsigned short                      sequenceNr;      //!< The sequence number.
00226   char                                idleTime;        //!< The processor idle time.
00227   NOVATELOEM4_enumTimeStatus          eTimeStatus;     //!< The quality status of the GPS time.
00228   unsigned short                      gpsWeek;         //!< The GPS week (0-1024+) [weeks].
00229   unsigned long                       gpsMilliSeconds; //!< The GPS time of week in milliseconds.
00230   NOVATELOEM4_structRxStatusBitField  receiverStatus;  //!< The receiver status bitfield.
00231   unsigned short                      reserved;        //!< A reserved value.
00232   unsigned short                      receiverVersion; //!< The receiver firmware version.
00233 
00234 } NOVATELOEM4_structBinaryHeader;
00235 
00236 
00237 
00238 /// \brief  A container for a NovAtel OEM4 observation.
00239 typedef struct
00240 {
00241   unsigned short prn;       //!< The PRN for this channel.
00242   unsigned short reserved;  //!< A 16 bit reserved value.
00243   double   psr;             //!< The pseudorange measurement [m].
00244   float    psrstd;          //!< The receiver estimated pseudorange measurement standard deviation [m].
00245   double   adr;             //!< The carrier phase or accumulated Doppler range measurement [cycles].
00246   float    adrstd;          //!< The receiver estimated accumulated Doppler range measurement standard deviation [cycles].
00247   float    doppler;         //!< The Doppler measurement for this channel [Hz].
00248   float    cno;             //!< The carrier to noise density ratio for this channel [dB-Hz]
00249   float    locktime;        //!< The number of seconds of continous phase tracking (no known cycle slips) [s].
00250 
00251   unsigned rawTrackingStatus;                      //!< The raw tracking status 32 bit value.
00252   NOVATELOEM4_structTrackingStatus trackingStatus; //!< The decoded channel tracking status information.
00253 
00254 } NOVATELOEM4_structObservation;
00255 
00256 
00257 /**
00258 \brief  Find the next NovAtel OEM4 message in an open file.
00259 
00260 Search a file (FILE*), that is already open, for the next
00261 NovAtel OEM4 message. The user must provide a message buffer
00262 with an associated maximum length (8192 bytes recommended ).
00263 
00264 \author   Glenn D. MacGougan (GDM)
00265 \date     2007-11-29
00266 \since    2006-11-09
00267 \return   TRUE(1) if successful, FALSE(0) otherwise.
00268 */
00269 BOOL NOVATELOEM4_FindNextMessageInFile(
00270   FILE *fid,                       //!< A file pointer to an open file (input).
00271   unsigned char *message,          //!< A message buffer in which to place the message found (input/output).
00272   const unsigned maxMessageLength, //!< The maximum size of the message buffer (input).
00273   BOOL *wasEndOfFileReached,       //!< Has the end of the file been reached (output).
00274   BOOL *wasMessageFound,           //!< Was a valid message found (output).
00275   unsigned *filePosition,          //!< The file position for the start of the message found (output).
00276   unsigned short *messageLength,   //!< The length of the entire message found and stored in the message buffer (output).
00277   unsigned short *messageID,       //!< The message ID of the message found.
00278   unsigned *numberBadCRC           //!< The number of bad crc values found. (crc fails or mistaken messages).
00279   );
00280 
00281 
00282 /**
00283 \brief    Decode a Novatel OEM4 binary message header given a complete binary message.
00284 \author   Glenn D. MacGougan (GDM)
00285 \date     2007-11-29
00286 \since    2006-11-10
00287 \return   TRUE(1) if successful, FALSE(0) otherwise.
00288 */
00289 BOOL NOVATELOEM4_DecodeBinaryMessageHeader(
00290   const unsigned char *message,            //!< The message buffer containing a complete NOVATEL OEM4 binary message (input).
00291   const unsigned short messageLength,      //!< The length of the entire message (input).
00292   NOVATELOEM4_structBinaryHeader *header   //!< A pointer to a NovAtel OEM4 header information struct (output).
00293   );
00294   
00295 
00296 
00297 /**
00298 \brief  Decode a NovAtel OEM4 RANGEB message.
00299 
00300 Given a message buffer with a complete NovAtel OEM4 RANGEB binary message,
00301 and a user provided array of observation structs, this function will 
00302 decode the binary message into the user provided array.
00303 
00304 \author   Glenn D. MacGougan (GDM)
00305 \date     2007-11-29
00306 \since    2006-11-10
00307 \return   TRUE(1) if successful, FALSE(0) otherwise.
00308 */
00309 BOOL NOVATELOEM4_DecodeRANGEB(
00310   const unsigned char *message,            //!< The message buffer containing a complete RANGEB message (input).
00311   const unsigned short messageLength,      //!< The length of the entire message (input).
00312   NOVATELOEM4_structBinaryHeader* header,  //!< A pointer to a NovAtel OEM4 header information struct (output).
00313   NOVATELOEM4_structObservation* obsArray, //!< A pointer to a user provided array of struct_NOVATELOEM4_RANGE (output).
00314   const unsigned char maxNrObs,            //!< The maximum number of elements in the array provided (input).
00315   unsigned *nrObs                          //!< The number of valid elements set in the array (output).
00316   );
00317 
00318 
00319 /**
00320 \brief    Decode the raw 32 bit value that contains tracking status information.
00321 
00322 \author   Glenn D. MacGougan (GDM)
00323 \date     2007-11-29
00324 \since    2006-11-10
00325 \return   TRUE(1) if successful, FALSE(0) otherwise.
00326 */
00327 BOOL NOVATELOEM4_DecodeTrackingStatus(
00328   const unsigned rawTrackingStatus,                 //!< The raw 32 bit tracking status value (input).
00329   NOVATELOEM4_structTrackingStatus *trackingStatus  //!< The decoded tracking status information (output).
00330   );
00331 
00332 
00333 /**
00334 \brief    Decode a NovAtel OEM4 RAWEPHEMB message.
00335 
00336 Given a message buffer with a complete NovAtel OEM4 RAWEPHEMB binary 
00337 message, this function will decode the content into useable ephemeris
00338 information.
00339 
00340 \author   Glenn D. MacGougan (GDM)
00341 \date     2007-11-29
00342 \since    2006-11-10
00343 \return   TRUE(1) if successful, FALSE(0) otherwise.
00344 */
00345 BOOL NOVATELOEM4_DecodeRAWEPHEMB(
00346   const unsigned char *message,           //!< The message buffer containing a complete RANGEB message (input).
00347   const unsigned short messageLength,     //!< The length of the entire message (input).
00348   NOVATELOEM4_structBinaryHeader* header, //!< A pointer to a NovAtel OEM4 header information struct (output).
00349   unsigned *prn,                          //!< The satellite PRN number.
00350   unsigned *reference_week,               //!< The reference GPS week (0-1024+) [weeks].
00351   unsigned *reference_time,               //!< The reference GPS time of week (0-604800) [s].
00352   unsigned       *tow,                    //!< The time of week in subframe1, the time of the leading bit edge of subframe 2 [s]
00353   unsigned short *iodc,                   //!< 10 bit issue of data (clock), 8 LSB bits will match the iode                  []    
00354   unsigned char  *iode,                   //!< 8 bit  issue of data (ephemeris)                                              []
00355   unsigned       *toe,                    //!< reference time ephemeris (0-604800)                                           [s]
00356   unsigned       *toc,                    //!< reference time (clock)   (0-604800)                                           [s]      
00357   unsigned short *week,                   //!< 10 bit gps week 0-1023 (user must account for week rollover )                 [week]    
00358   unsigned char  *health,                 //!< 6 bit health parameter, 0 if healthy, unhealth othersize                      [0=healthy]    
00359   unsigned char  *alert_flag,             //!< 1 = URA may be worse than indicated                                           [0,1]
00360   unsigned char  *anti_spoof,             //!< anti-spoof flag from 0=off, 1=on                                              [0,1]    
00361   unsigned char  *code_on_L2,             //!< 0=reserved, 1=P code on L2, 2=C/A on L2                                       [0,1,2]
00362   unsigned char  *ura,                    //!< User Range Accuracy lookup code, 0 is excellent, 15 is use at own risk        [0-15], see p. 83 GPSICD200C
00363   unsigned char  *L2_P_data_flag,         //!< flag indicating if P is on L2 1=true                                          [0,1]
00364   unsigned char  *fit_interval_flag,      //!< fit interval flag (four hour interval or longer) 0=4 fours, 1=greater         [0,1]
00365   unsigned short *age_of_data_offset,     //!< age of data offset                                                            [s]
00366   double *tgd,     //!< group delay                                                                   [s]
00367   double *af2,     //!< polynomial clock correction coefficient (rate of clock drift)                 [s/s^2]
00368   double *af1,     //!< polynomial clock correction coefficient (clock drift)                         [s/s]
00369   double *af0,     //!< polynomial clock correction coefficient (clock bias)                          [s]    
00370   double *m0,      //!< mean anomaly at reference time                                                [rad]
00371   double *delta_n, //!< mean motion difference from computed value                                    [rad/s]
00372   double *ecc,     //!< eccentricity                                                                  []
00373   double *sqrta,   //!< square root of the semi-major axis                                            [m^(1/2)]
00374   double *omega0,  //!< longitude of ascending node of orbit plane at weekly epoch                    [rad]
00375   double *i0,      //!< inclination angle at reference time                                           [rad]
00376   double *w,       //!< argument of perigee                                                           [rad]
00377   double *omegadot,//!< rate of right ascension                                                       [rad/s]
00378   double *idot,    //!< rate of inclination angle                                                     [rad/s]
00379   double *cuc,     //!< amplitude of the cosine harmonic correction term to the argument of latitude  [rad]
00380   double *cus,     //!< amplitude of the sine harmonic correction term to the argument of latitude    [rad]
00381   double *crc,     //!< amplitude of the cosine harmonic correction term to the orbit radius          [m]
00382   double *crs,     //!< amplitude of the sine harmonic correction term to the orbit radius            [m]
00383   double *cic,     //!< amplitude of the cosine harmonic correction term to the angle of inclination  [rad]
00384   double *cis      //!< amplitude of the sine harmonic correction term to the angle of inclination    [rad]
00385   );
00386    
00387 
00388 /**
00389 \brief  Decode a NovAtel OEM4 RANGEBCMPB message.
00390 
00391 Given a message buffer with a complete NovAtel OEM4 RANGECMPB binary message,
00392 and a user provided array of observation structs, this function will 
00393 decode the compressed binary message into the user provided array.
00394 
00395 \author   Ossama Al-Fanek (OA-F)
00396 \date     March 17, 2007
00397 \remarks  Reviewed by GDM, March 17, 2007.
00398 \return   TRUE(1) if successful, FALSE(0) otherwise.
00399 */
00400 BOOL NOVATELOEM4_DecodeRANGECMPB(
00401   const unsigned char *message,            //!< The message buffer containing a complete RANGEB message (input).
00402   const unsigned short messageLength,      //!< The length of the entire message (input).
00403   NOVATELOEM4_structBinaryHeader* header,  //!< A pointer to a NovAtel OEM4 header information struct (output).
00404   NOVATELOEM4_structObservation* obsArray, //!< A pointer to a user provided array of struct_NOVATELOEM4_RANGE (output).
00405   const unsigned char maxNrObs,            //!< The maximum number of elements in the array provided (input).
00406   unsigned *nrObs                          //!< The number of valid elements set in the array (output).
00407   );
00408                        
00409 
00410 #ifdef __cplusplus
00411 }
00412 #endif
00413 
00414 
00415 #endif // _C_NOVATEL_H_