GalFNavEph.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 "GalFNavEph.hpp"
40 #include "GPSWeekSecond.hpp"
41 #include "TimeString.hpp"
42 
43 using namespace std;
44 
45 namespace gnsstk
46 {
47  GalFNavEph ::
48  GalFNavEph()
49  : bgdE5aE1(0.0),
50  sisaIndex(255),
51  svid(0),
52  iodnav1(0),
53  iodnav2(0),
54  iodnav3(0),
55  iodnav4(0),
56  hsE5a(GalHealthStatus::Unknown),
57  dvsE5a(GalDataValid::Unknown),
58  wn1(0), tow1(0), wn2(0), tow2(0), wn3(0), tow3(0), tow4(0)
59  {
61  weekFmt = "%4L(%4l)";
62  msgLenSec = 10.0;
64  }
65 
66 
67  bool GalFNavEph ::
68  validate() const
69  {
70  return true;
71  }
72 
73 
75  getUserTime() const
76  {
77  gnsstk::CommonTime unset;
79  // If any xmit time is unset, make a best guess at what it
80  // should be by adding 10 seconds (the transmit time of an
81  // F/NAV page) to the return value.
82  // This is mostly to handle formats like RINEX where we don't
83  // have the transmit time of each of the pages.
84  if (xmit2 != unset)
85  rv = std::max(rv, xmit2);
86  else
87  rv += 10.0;
88  if (xmit3 != unset)
89  rv = std::max(rv, xmit3);
90  else
91  rv += 10.0;
92  if (xmit4 != unset)
93  rv = std::max(rv, xmit4);
94  else
95  rv += 10.0;
96  // Galileo F/NAV nominal page transmit time is 10 seconds per
97  // OS-SIS-ICD figure 14.
98  return rv + 10.0;
99  }
100 
101 
102  void GalFNavEph ::
104  {
105  beginFit = xmitTime;
106  endFit = Toe + 14400; // four hours
107  }
108 
109 
110  void GalFNavEph ::
111  dumpSVStatus(std::ostream& s) const
112  {
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,"Page 1 "+poFmt)
130  << setw(13) << iodnav1 << endl
131  << printTime(xmit2,"Page 2 "+poFmt)
132  << setw(13) << iodnav2 << endl
133  << printTime(xmit3,"Page 3 "+poFmt)
134  << setw(13) << iodnav3 << endl
135  << printTime(xmit4,"Page 4 "+poFmt)
136  << setw(13) << iodnav4 << endl
137  << endl
138  << " SV STATUS" << endl
139  << endl
140  << "E5a_DVS : " << setw(9) << static_cast<int>(dvsE5a)
141  << " (" << gnsstk::StringUtils::asString(dvsE5a) << ")" << endl
142  << "E5a_HS : " << setw(9) << static_cast<int>(hsE5a)
143  << " (" << gnsstk::StringUtils::asString(hsE5a) << ")" << endl
144  << "SISA : " << setw(9) << (unsigned)sisaIndex << endl
145  << "Health : " << setw(9)
147  << setprecision(6)
148  << "Bgd(E1-E5a) : " << setw(13) << bgdE5aE1 << " sec" << endl;
149  s.flags(oldFlags);
150  }
151 }
example3.svid
svid
Definition: example3.py:19
gnsstk::GalFNavEph::iodnav2
uint16_t iodnav2
IODnav for page type 2.
Definition: GalFNavEph.hpp:92
gnsstk::GalFNavEph::getUserTime
CommonTime getUserTime() const override
Definition: GalFNavEph.cpp:75
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::GalFNavEph::dumpSVStatus
void dumpSVStatus(std::ostream &s) const override
Definition: GalFNavEph.cpp:111
gnsstk::OrbitDataKepler::frame
RefFrameSys frame
Definition: OrbitDataKepler.hpp:202
gnsstk::GalFNavEph::bgdE5aE1
double bgdE5aE1
Group delay in seconds between E5a and E1.
Definition: GalFNavEph.hpp:85
gnsstk::GalFNavEph::dvsE5a
GalDataValid dvsE5a
Data validity status for E5a.
Definition: GalFNavEph.hpp:96
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::GalFNavEph::sisaIndex
uint8_t sisaIndex
Signal in space accuracy index (OS-SIS-ICD tbl 76)
Definition: GalFNavEph.hpp:86
gnsstk::StringUtils::asString
std::string asString(IonexStoreStrategy e)
Convert a IonexStoreStrategy to a whitespace-free string name.
Definition: IonexStoreStrategy.cpp:46
GalFNavEph.hpp
gnsstk::GalFNavEph::iodnav4
uint16_t iodnav4
IODnav for page type 4.
Definition: GalFNavEph.hpp:94
gnsstk::GalFNavEph::xmit2
CommonTime xmit2
Transmit time for page type 2.
Definition: GalFNavEph.hpp:88
gnsstk::OrbitDataKepler::Toe
CommonTime Toe
Orbit epoch.
Definition: OrbitDataKepler.hpp:171
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::GalFNavEph::validate
bool validate() const override
Definition: GalFNavEph.cpp:68
gnsstk::GalFNavEph::xmit3
CommonTime xmit3
Transmit time for page type 3.
Definition: GalFNavEph.hpp:89
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::GalFNavEph::hsE5a
GalHealthStatus hsE5a
Health status for E5a.
Definition: GalFNavEph.hpp:95
gnsstk::GalFNavEph::xmit4
CommonTime xmit4
Transmit time for page type 4.
Definition: GalFNavEph.hpp:90
gnsstk::CommonTime
Definition: CommonTime.hpp:84
gnsstk::GalFNavEph::fixFit
void fixFit()
Definition: GalFNavEph.cpp:103
gnsstk::NavFit::beginFit
CommonTime beginFit
Time at beginning of fit interval.
Definition: NavFit.hpp:54
gnsstk::GalFNavEph::iodnav1
uint16_t iodnav1
IODnav for page type 1.
Definition: GalFNavEph.hpp:91
GPSWeekSecond.hpp
gnsstk::printTime
std::string printTime(const CommonTime &t, const std::string &fmt)
Definition: TimeString.cpp:64
std
Definition: Angle.hpp:142
gnsstk::NavMessageType::Ephemeris
@ Ephemeris
Precision orbits for the transmitting SV.
gnsstk::GalHealthStatus
GalHealthStatus
Identify different types of SV health states.
Definition: GalHealthStatus.hpp:51
gnsstk::OrbitDataKepler::health
SVHealth health
SV health status.
Definition: OrbitDataKepler.hpp:173
TimeString.hpp
gnsstk::GalFNavEph::iodnav3
uint16_t iodnav3
IODnav for page type 3.
Definition: GalFNavEph.hpp:93


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