Subversion Repositories FlightCtrl

Rev

Blame | Last modification | View Log | RSS feed

//------------------------------------------------------------------------------
//                                  _            _    
//                                 | |          | |    
//      ___ _ __ ___  ___ _   _ ___| |_ ___  ___| |__  
//     / _ \ '_ ` _ \/ __| | | / __| __/ _ \/ __| '_ \.
//    |  __/ | | | | \__ \ |_| \__ \ ||  __/ (__| | | |
//     \___|_| |_| |_|___/\__, |___/\__\___|\___|_| |_|
//                         __/ |                      
//                        |___/    Engineering
//
// Filename:    gps_ubx.h
// Description:
//              
// Author:      Martin Steppuhn
// History:     08.06.2007 Initial version
//              
//------------------------------------------------------------------------------

#ifndef GPS_UBX_H
#define GPS_UBX_H

/**** Includes ****************************************************************/

#include "std_c.h"

/**** Preprocessing directives (#define) **************************************/

/**** Type definitions (typedef) **********************************************/

typedef struct ubx_struct
{
  bool  update;

  uint8 msg_class;
  uint8 msg_id;
  uint8 length;
  uint8 data[256];
};

typedef struct  nav_sol_struct
{
  uint8  update;

  uint32 itow;      // Time
  uint8  gpsfix;    // GPSfix
  int32  ecef_x;    // cm ECEF X coordinate
  int32  ecef_y;    // cm ECEF Y coordinate  
  int32  ecef_z;    // cm ECEF Z coordinate  
  uint32 pacc;      // cm 3D Position Accuracy Estimate  
  int32  ecefvx;    // cm/s ECEF X velocity  
  int32  ecefvy;    // cm/s ECEF Y velocity  
  int32  ecefvz;    // cm/s ECEF Z velocity  
  uint32 sacc;      // cm/s Speed Accuracy Estimate  
  uint16 pdop;      // Position DOP

  uint8  numsv;     // Number of SVs used in Nav Solution
};

/**** Global constants (extern) ***********************************************/

/**** Global variables (extern) ***********************************************/

struct ubx_struct         ubx;
struct nav_sol_struct     nav_sol;

/**** Global function prototypes **********************************************/

extern void ubx_push(uint8 c);
extern void ubx_decode(struct ubx_struct *ubx);

#endif