GalINavEph.cpp
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 //
28 // This software was developed by Applied Research Laboratories at the
29 // University of Texas at Austin, under contract to an agency or agencies
30 // within the U.S. Department of Defense. The U.S. Government retains all
31 // rights to use, duplicate, distribute, disclose, or release this software.
32 //
33 // Pursuant to DoD Directive 523024
34 //
35 // DISTRIBUTION STATEMENT A: This software has been approved for public
36 // release, distribution is unlimited.
37 //
38 //==============================================================================
39 #include "GalINavEph.hpp"
40 #include "TimeString.hpp"
41 
42 using namespace std;
43 
44 namespace gnsstk
45 {
46  GalINavEph ::
47  GalINavEph()
48  : bgdE5aE1(0.0),
49  bgdE5bE1(0.0),
50  sisaIndex(255),
51  svid(0),
52  iodnav1(0),
53  iodnav2(0),
54  iodnav3(0),
55  iodnav4(0),
56  hsE5b(GalHealthStatus::Unknown),
57  hsE1B(GalHealthStatus::Unknown),
58  dvsE5b(GalDataValid::Unknown),
59  dvsE1B(GalDataValid::Unknown)
60  {
62  weekFmt = "%4L(%4l)";
63  // Not recommended for use - getUserTime() should be used
64  // instead as there is no guarantee that the two word types
65  // making up this ephemeris are consecutive.
66  msgLenSec = 2.0;
68  }
69 
70 
71  bool GalINavEph ::
72  validate() const
73  {
74  return true;
75  }
76 
77 
79  getUserTime() const
80  {
81  const gnsstk::CommonTime unset;
83  // If any xmit time is unset, make a best guess at what it
84  // should be by adding 2 seconds (the transmit time of an
85  // I/NAV page) to the return value.
86  // This is mostly to handle formats like RINEX where we don't
87  // have the transmit time of each of the pages.
88  if (xmit2 != unset)
89  rv = std::max(rv, xmit2);
90  else
91  rv += 2.0;
92  if (xmit3 != unset)
93  rv = std::max(rv, xmit3);
94  else
95  rv += 2.0;
96  if (xmit4 != unset)
97  rv = std::max(rv, xmit4);
98  else
99  rv += 2.0;
100  if (xmit5 != unset)
101  rv = std::max(rv, xmit5);
102  else
103  rv += 2.0;
104  // Galileo I/NAV nominal page transmit time is 2 seconds per
105  // OS-SIS-ICD figure 15.
106  return rv + 2.0;
107  }
108 
109 
110  void GalINavEph ::
112  {
113  beginFit = xmitTime;
114  endFit = Toe + (3600*4); // four hours
115  }
116 
117 
118  void GalINavEph ::
119  dumpSVStatus(std::ostream& s) const
120  {
121  const ios::fmtflags oldFlags = s.flags();
122  s.setf(ios::scientific, ios::floatfield);
123  const std::string poFmt("TOW : " + weekFmt +
124  " %6.0g %3a-%1w:%02H:%02M:%02S");
125  s << " PAGE OVERHEAD" << endl
126  << endl
127  << " Week(10bt) SOW DOW:HH:MM:SS IOD_NAV"
128  << endl
129  << printTime(xmitTime,"Word 1 "+poFmt) << setw(13) << iodnav1 << endl
130  << printTime(xmit2,"Word 2 "+poFmt) << setw(13) << iodnav2 << endl
131  << printTime(xmit3,"Word 3 "+poFmt) << setw(13) << iodnav3 << endl
132  << printTime(xmit4,"Word 4 "+poFmt) << setw(13) << iodnav4 << endl
133  << printTime(xmit5,"Word 5 "+poFmt)
134  << endl << endl
135  << " SV STATUS" << endl
136  << endl
137  << "E5b_DVS : " << setw(9) << static_cast<int>(dvsE5b)
138  << " (" << gnsstk::StringUtils::asString(dvsE5b) << ")" << endl
139  << "E5b_HS : " << setw(9) << static_cast<int>(hsE5b)
140  << " (" << gnsstk::StringUtils::asString(hsE5b) << ")" << endl
141  << "E1B_DVS : " << setw(9) << static_cast<int>(dvsE1B)
142  << " (" << gnsstk::StringUtils::asString(dvsE1B) << ")" << endl
143  << "E1B_HS : " << setw(9) << static_cast<int>(hsE1B)
144  << " (" << gnsstk::StringUtils::asString(hsE1B) << ")" << endl
145  << "SISA : " << setw(9) << (unsigned)sisaIndex << endl
146  << "Health : " << setw(9)
148  << setprecision(6)
149  << "Bgd(E1-E5a) : " << setw(13) << bgdE5aE1 << " sec" << endl
150  << "Bgd(E1-E5b) : " << setw(13) << bgdE5bE1 << " sec" << endl;
151  s.flags(oldFlags);
152  }
153 }
example3.svid
svid
Definition: example3.py:19
gnsstk::NavData::msgLenSec
double msgLenSec
Definition: NavData.hpp:199
gnsstk::GalDataValid
GalDataValid
Identify Galileo Data Validity Status (DVS) states.
Definition: GalDataValid.hpp:51
gnsstk::RefFrameSys::ITRF
@ ITRF
The reference frame used by Galileo.
gnsstk::OrbitDataKepler::frame
RefFrameSys frame
Definition: OrbitDataKepler.hpp:202
gnsstk::GalINavEph::bgdE5aE1
double bgdE5aE1
Group delay in seconds between E5a and E1.
Definition: GalINavEph.hpp:85
gnsstk::NavMessageID::messageType
NavMessageType messageType
Definition: NavMessageID.hpp:97
gnsstk::max
T max(const SparseMatrix< T > &SM)
Maximum element - return 0 if empty.
Definition: SparseMatrix.hpp:881
gnsstk::NavFit::endFit
CommonTime endFit
Time at end of fit interval.
Definition: NavFit.hpp:55
gnsstk::GalINavEph::getUserTime
CommonTime getUserTime() const override
Definition: GalINavEph.cpp:79
gnsstk::StringUtils::asString
std::string asString(IonexStoreStrategy e)
Convert a IonexStoreStrategy to a whitespace-free string name.
Definition: IonexStoreStrategy.cpp:46
gnsstk::GalINavEph::fixFit
void fixFit()
Definition: GalINavEph.cpp:111
gnsstk::OrbitDataKepler::Toe
CommonTime Toe
Orbit epoch.
Definition: OrbitDataKepler.hpp:171
gnsstk::GalINavEph::dvsE5b
GalDataValid dvsE5b
Data validity status for E5b.
Definition: GalINavEph.hpp:99
gnsstk::NavData::signal
NavMessageID signal
Source signal identification for this navigation message data.
Definition: NavData.hpp:175
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::IonexStoreStrategy::Unknown
@ Unknown
Unknown or uninitialized stategy value.
gnsstk::GalINavEph::iodnav3
uint16_t iodnav3
IODnav for word type 3.
Definition: GalINavEph.hpp:95
gnsstk::OrbitDataKepler::xmitTime
CommonTime xmitTime
Time of transmission of the start of the data.
Definition: OrbitDataKepler.hpp:170
gnsstk::NavData::weekFmt
std::string weekFmt
Definition: NavData.hpp:193
gnsstk::GalINavEph::iodnav4
uint16_t iodnav4
IODnav for word type 4.
Definition: GalINavEph.hpp:96
gnsstk::GalINavEph::hsE5b
GalHealthStatus hsE5b
Health status for E5b.
Definition: GalINavEph.hpp:97
gnsstk::CommonTime
Definition: CommonTime.hpp:84
gnsstk::GalINavEph::iodnav2
uint16_t iodnav2
IODnav for word type 2.
Definition: GalINavEph.hpp:94
gnsstk::NavFit::beginFit
CommonTime beginFit
Time at beginning of fit interval.
Definition: NavFit.hpp:54
gnsstk::GalINavEph::xmit5
CommonTime xmit5
Transmit time for word type 5.
Definition: GalINavEph.hpp:92
gnsstk::GalINavEph::hsE1B
GalHealthStatus hsE1B
Health status for E1B.
Definition: GalINavEph.hpp:98
gnsstk::GalINavEph::validate
bool validate() const override
Definition: GalINavEph.cpp:72
gnsstk::GalINavEph::iodnav1
uint16_t iodnav1
IODnav for word type 1.
Definition: GalINavEph.hpp:93
gnsstk::printTime
std::string printTime(const CommonTime &t, const std::string &fmt)
Definition: TimeString.cpp:64
gnsstk::GalINavEph::bgdE5bE1
double bgdE5bE1
Group delay in seconds between E5b and E1.
Definition: GalINavEph.hpp:86
GalINavEph.hpp
std
Definition: Angle.hpp:142
gnsstk::NavMessageType::Ephemeris
@ Ephemeris
Precision orbits for the transmitting SV.
gnsstk::GalINavEph::sisaIndex
uint8_t sisaIndex
Signal in space accuracy index (OS-SIS-ICD tbl 76)
Definition: GalINavEph.hpp:87
gnsstk::GalHealthStatus
GalHealthStatus
Identify different types of SV health states.
Definition: GalHealthStatus.hpp:51
gnsstk::GalINavEph::xmit4
CommonTime xmit4
Transmit time for word type 4.
Definition: GalINavEph.hpp:91
gnsstk::GalINavEph::xmit2
CommonTime xmit2
Transmit time for word type 2.
Definition: GalINavEph.hpp:89
gnsstk::GalINavEph::dumpSVStatus
void dumpSVStatus(std::ostream &s) const override
Definition: GalINavEph.cpp:119
gnsstk::OrbitDataKepler::health
SVHealth health
SV health status.
Definition: OrbitDataKepler.hpp:173
gnsstk::GalINavEph::xmit3
CommonTime xmit3
Transmit time for word type 3.
Definition: GalINavEph.hpp:90
gnsstk::GalINavEph::dvsE1B
GalDataValid dvsE1B
Data validity status for E1B.
Definition: GalINavEph.hpp:100
TimeString.hpp


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