AshtechMBEN.hpp
Go to the documentation of this file.
1 //==============================================================================
2 //
3 // This file is part of GNSSTk, the ARL:UT GNSS Toolkit.
4 //
5 // The GNSSTk is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published
7 // by the Free Software Foundation; either version 3.0 of the License, or
8 // any later version.
9 //
10 // The GNSSTk is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with GNSSTk; if not, write to the Free Software Foundation,
17 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
18 //
19 // This software was developed by Applied Research Laboratories at the
20 // University of Texas at Austin.
21 // Copyright 2004-2022, The Board of Regents of The University of Texas System
22 //
23 //==============================================================================
24 
25 //==============================================================================
26 //
27 // This software was developed by Applied Research Laboratories at the
28 // University of Texas at Austin, under contract to an agency or agencies
29 // within the U.S. Department of Defense. The U.S. Government retains all
30 // rights to use, duplicate, distribute, disclose, or release this software.
31 //
32 // Pursuant to DoD Directive 523024
33 //
34 // DISTRIBUTION STATEMENT A: This software has been approved for public
35 // release, distribution is unlimited.
36 //
37 //==============================================================================
38 
44 #ifndef ASHTECHMBEN_HPP
45 #define ASHTECHMBEN_HPP
46 
47 #include <map>
48 #include <iostream>
49 #include <cmath>
50 #include "gnsstk_export.h"
51 #include "AshtechData.hpp"
52 
53 #ifdef SWIG
56 #endif
57 
58 namespace gnsstk
59 {
60  class AshtechMBEN : public AshtechData
61  {
62  public:
63 
65 
66  std::string header; // 11 characters exactly
67  unsigned seq; // sow in units of 50 ms, modulo 36,000
68  // (36,000 * 50 ms = 30 minutes)
69  unsigned left;
70  unsigned svprn; // the PRN of the tracked satellite
71  unsigned el; // degrees
72  unsigned az; // degrees
73  unsigned chid; // 1..12
74 
75  struct code_block
76  {
77  // Warning flag, a bit packed field
78  // bits 1&2: 0 same as goodbad=22, 1 same as goodbad=23,
79  // 3 same as goodbad=24
80  // bit 3: carrier phase questionable
81  // bit 4: code phase questionable
82  // bit 5: code phase integration not stable
83  // bit 6: Z tracking mode
84  // bit 7: possible lock of lock
85  // bit 8: loss of lock counter reset
86  unsigned warning;
87  // Measurement quality
88  // 0: measurement not available
89  // 22: code and or carrier phase measured
90  // P mode tracking on Z(Y)-12 units
91  // 23: 22 + nav msg obtained + obs NOT used in PVT computation
92  // 24: 22 + nav msg obtained + obs used in PVT computation
93  // Y mode tracking on Z(Y)-12 units
94  // 25: Z mode tracking on Z(Y)-12 units
95  unsigned goodbad;
96  unsigned polarity_known; // 'spare' in the ashtech docs
97  unsigned ireg; // SNR in custom units
98  unsigned qa_phase; // phase quality 0..5 and 95..100 are good
99  double full_phase; // cycles
100  double raw_range; // seconds
101  double doppler; // Hz
102  double smoothing; // meters
103  unsigned smooth_cnt; //
104 
109  virtual void decodeASCII(std::stringstream& str);
114  virtual void decodeBIN(std::string& str);
130  float snr(float chipRate, float magnitude = 4.14) const noexcept;
131  void dump(std::ostream& out) const;
132  };
133 
134  // The remaining block is repeated repeated three times for an MPC but
135  // only appears once for an MCA
139 
140  GNSSTK_EXPORT static const char *mpcId, *mcaId;
141 
142  virtual std::string getName() const {return "mben";}
143 
144  virtual bool checkId(const std::string& hdrId) const
145  {return hdrId==mpcId || hdrId==mcaId;}
146 
147  void dump(std::ostream& out) const noexcept;
152  virtual void decode(const std::string& data) ;
153 
154  protected:
160  virtual void reallyGetRecord(FFStream& ffs);
161  };
162 } // namespace gnsstk
163 
164 #endif
gnsstk::AshtechMBEN::code_block::goodbad
unsigned goodbad
Definition: AshtechMBEN.hpp:95
gnsstk::AshtechMBEN::code_block::polarity_known
unsigned polarity_known
Definition: AshtechMBEN.hpp:96
gnsstk::AshtechMBEN::az
unsigned az
Definition: AshtechMBEN.hpp:72
gnsstk::AshtechMBEN::el
unsigned el
Definition: AshtechMBEN.hpp:71
AshtechData.hpp
gnsstk::FFStream
Definition: FFStream.hpp:119
const
#define const
Definition: getopt.c:43
gnsstk::AshtechMBEN::code_block::ireg
unsigned ireg
Definition: AshtechMBEN.hpp:97
gnsstk::AshtechMBEN::header
std::string header
Definition: AshtechMBEN.hpp:64
gnsstk::AshtechMBEN
Definition: AshtechMBEN.hpp:60
gnsstk::AshtechMBEN::getName
virtual std::string getName() const
Simple accessors for various static thangs.
Definition: AshtechMBEN.hpp:142
gnsstk::AshtechMBEN::svprn
unsigned svprn
Definition: AshtechMBEN.hpp:70
gnsstk::AshtechMBEN::code_block::dump
void dump(std::ostream &out) const
Definition: AshtechMBEN.cpp:201
gnsstk::AshtechMBEN::code_block::qa_phase
unsigned qa_phase
Definition: AshtechMBEN.hpp:98
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::AshtechMBEN::left
unsigned left
Definition: AshtechMBEN.hpp:69
gnsstk::AshtechMBEN::code_block::decodeASCII
virtual void decodeASCII(std::stringstream &str)
Definition: AshtechMBEN.cpp:158
gnsstk::AshtechMBEN::chid
unsigned chid
Definition: AshtechMBEN.hpp:73
gnsstk::AshtechMBEN::code_block::full_phase
double full_phase
Definition: AshtechMBEN.hpp:99
gnsstk::AshtechMBEN::p2
code_block p2
Definition: AshtechMBEN.hpp:138
gnsstk::AshtechMBEN::ca
code_block ca
Definition: AshtechMBEN.hpp:136
gnsstk::AshtechMBEN::code_block
Definition: AshtechMBEN.hpp:75
gnsstk::AshtechMBEN::code_block::raw_range
double raw_range
Definition: AshtechMBEN.hpp:100
gnsstk::AshtechMBEN::mpcId
static const GNSSTK_EXPORT char * mpcId
Definition: AshtechMBEN.hpp:140
gnsstk::AshtechMBEN::code_block::decodeBIN
virtual void decodeBIN(std::string &str)
Definition: AshtechMBEN.cpp:180
example3.data
data
Definition: example3.py:22
gnsstk::AshtechMBEN::code_block::smooth_cnt
unsigned smooth_cnt
Definition: AshtechMBEN.hpp:103
gnsstk::AshtechMBEN::AshtechMBEN
AshtechMBEN()
Definition: AshtechMBEN.hpp:64
gnsstk::AshtechMBEN::code_block::snr
float snr(float chipRate, float magnitude=4.14) const noexcept
Definition: AshtechMBEN.cpp:220
std
Definition: Angle.hpp:142
gnsstk::AshtechData
Definition: AshtechData.hpp:64
gnsstk::AshtechMBEN::mcaId
static const GNSSTK_EXPORT char * mcaId
Definition: AshtechMBEN.hpp:140
gnsstk::AshtechMBEN::checkId
virtual bool checkId(const std::string &hdrId) const
Definition: AshtechMBEN.hpp:144
gnsstk::AshtechMBEN::seq
unsigned seq
Definition: AshtechMBEN.hpp:67
gnsstk::AshtechMBEN::code_block::warning
unsigned warning
Definition: AshtechMBEN.hpp:86
gnsstk::AshtechMBEN::reallyGetRecord
virtual void reallyGetRecord(FFStream &ffs)
Definition: AshtechMBEN.cpp:52
gnsstk::AshtechMBEN::p1
code_block p1
Definition: AshtechMBEN.hpp:137
gnsstk::AshtechMBEN::decode
virtual void decode(const std::string &data)
Definition: AshtechMBEN.cpp:77
gnsstk::AshtechMBEN::code_block::smoothing
double smoothing
Definition: AshtechMBEN.hpp:102
gnsstk::AshtechMBEN::code_block::doppler
double doppler
Definition: AshtechMBEN.hpp:101


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:38