pvt.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2010 Swift Navigation Inc.
00003  * Contact: Henry Hallam <henry@swift-nav.com>
00004  *          Matt Peddie <peddie@alum.mit.edu>
00005  *
00006  * This source is subject to the license found in the file 'LICENSE' which must
00007  * be be distributed together with this source. All other rights reserved.
00008  *
00009  * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
00010  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
00011  * WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
00012  */
00013 
00014 #ifndef LIBSWIFTNAV_PVT_H
00015 #define LIBSWIFTNAV_PVT_H
00016 
00017 #include "common.h"
00018 #include "track.h"
00019 
00020 #define PVT_MAX_ITERATIONS 20
00021 
00022 typedef struct {
00023   double pdop;
00024   double gdop;
00025   double tdop;
00026   double hdop;
00027   double vdop;
00028 } dops_t;
00029 
00030 typedef struct __attribute__((packed)) {
00031   /*
00032    * Be careful of stuct packing to avoid (very mild) slowness,
00033    * try to keep all the types aligned i.e. put the 64bit
00034    * things together at the top, then the 32bit ones etc.
00035    */
00037   double pos_llh[3];
00039   double pos_ecef[3];
00041   double vel_ned[3];
00043   double vel_ecef[3];
00044 
00045   /* This is the row-first upper diagonal matrix of error covariances
00046    * in x, y, z (all receiver clock covariance terms are ignored).  So
00047    * it goes like so:
00048    *
00049    *    0  1  2
00050    *    _  3  4
00051    *    _  _  5
00052    *
00053    *    Index 6 is the GDOP.
00054    */
00055   double err_cov[7];
00056 
00057   double clock_offset;
00058   double clock_bias;
00059 
00060   /* GPS time */
00061   gps_time_t time;
00062 
00063   /* 0 = invalid, 1 = code phase */
00064   u8 valid;
00065   /* Number of channels used in the soluton. */
00066   u8 n_used;
00067 } gnss_solution;
00068 
00069 s8 calc_PVT(const u8 n_used,
00070             const navigation_measurement_t nav_meas[n_used],
00071             gnss_solution *soln,
00072             dops_t *dops);
00073 
00074 #endif /* LIBSWIFTNAV_PVT_H */
00075 


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:55:56