GalINavAlm.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 "GalINavAlm.hpp"
40 #include "TimeString.hpp"
41 
42 using namespace std;
43 
44 namespace gnsstk
45 {
46  const double GalINavAlm::refA = 29600000;
47  const double GalINavAlm::refioffset = (56.0 * PI / 180.0);
48 
49  GalINavAlm ::
50  GalINavAlm()
51  : dAhalf(0.0),
52  deltai(0.0),
53  wna(0),
54  t0a(0.0),
55  ioda1(0),
56  ioda2(0),
57  hsE5b(GalHealthStatus::Unknown),
58  hsE1B(GalHealthStatus::Unknown)
59  {
61  weekFmt = "%4L(%4l)";
62  // Not recommended for use - getUserTime() should be used
63  // instead as there is no guarantee that the two word types
64  // making up this almanac are consecutive.
65  msgLenSec = 2.0;
67  }
68 
69 
70  bool GalINavAlm ::
71  validate() const
72  {
73  return true;
74  }
75 
76 
78  getUserTime() const
79  {
80  // Galileo I/NAV nominal page transmit time is 2 seconds per
81  // OS-SIS-ICD figure 15.
82  return std::max(xmitTime, xmit2) + 2.0;
83  }
84 
85 
86  void GalINavAlm ::
88  {
90  // Set the fit times to transmit time through toa+74 hours.
92  endFit = Toe + (74.0 * 3600.0);
93  }
94 
95 
96  void GalINavAlm ::
98  {
102  {
104  }
105  else if ((hsE5b == GalHealthStatus::OutOfService) &&
107  {
109  }
110  else
111  {
113  }
114  }
115 
116 
117  void GalINavAlm ::
118  dumpSVStatus(std::ostream& s) const
119  {
120  const ios::fmtflags oldFlags = s.flags();
121  s.setf(ios::scientific, ios::floatfield);
122  s << " PAGE OVERHEAD" << endl
123  << endl
124  << " SOW DOW:HH:MM:SS IODa" << endl
125  << printTime(xmitTime,"Part 1 TOW : %6.0g %3a-%1w:%02H:%02M:%02S")
126  << setw(13) << (unsigned)ioda1 << endl
127  << printTime(xmit2,"Part 2 TOW : %6.0g %3a-%1w:%02H:%02M:%02S")
128  << setw(13) << (unsigned)ioda2 << endl
129  << endl
130  << " SV STATUS" << endl
131  << endl
132  << "E5b_HS : " << setw(9) << static_cast<int>(hsE5b)
133  << " (" << gnsstk::StringUtils::asString(hsE5b) << ")" << endl
134  << "E1B_HS : " << setw(9) << static_cast<int>(hsE1B)
135  << " (" << gnsstk::StringUtils::asString(hsE1B) << ")" << endl
136  << "Health : " << setw(9)
138  s.flags(oldFlags);
139  }
140 }
gnsstk::GalINavAlm::ioda2
uint8_t ioda2
IODa for the second word type (.
Definition: GalINavAlm.hpp:112
gnsstk::NavData::msgLenSec
double msgLenSec
Definition: NavData.hpp:199
gnsstk::GalINavAlm::ioda1
uint8_t ioda1
IODa for the first word type (.
Definition: GalINavAlm.hpp:111
gnsstk::RefFrameSys::ITRF
@ ITRF
The reference frame used by Galileo.
gnsstk::OrbitDataKepler::frame
RefFrameSys frame
Definition: OrbitDataKepler.hpp:202
GalINavAlm.hpp
gnsstk::GalINavAlm::xmit2
CommonTime xmit2
Definition: GalINavAlm.hpp:106
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::StringUtils::asString
std::string asString(IonexStoreStrategy e)
Convert a IonexStoreStrategy to a whitespace-free string name.
Definition: IonexStoreStrategy.cpp:46
gnsstk::PI
const double PI
GPS value of PI; also specified by GAL.
Definition: GNSSconstants.hpp:62
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::SVHealth::Degraded
@ Degraded
Satellite is in a degraded state. Use at your own risk.
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::IonexStoreStrategy::Unknown
@ Unknown
Unknown or uninitialized stategy value.
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::GalINavAlm::dumpSVStatus
void dumpSVStatus(std::ostream &s) const override
Definition: GalINavAlm.cpp:118
gnsstk::SVHealth::Healthy
@ Healthy
Satellite is in a healthy and useable state.
gnsstk::GalINavAlm::getUserTime
CommonTime getUserTime() const override
Definition: GalINavAlm.cpp:78
gnsstk::CommonTime
Definition: CommonTime.hpp:84
gnsstk::GalINavAlm::hsE5b
GalHealthStatus hsE5b
Health status for E5b.
Definition: GalINavAlm.hpp:113
gnsstk::GalHealthStatus::OK
@ OK
Signal OK.
gnsstk::NavFit::beginFit
CommonTime beginFit
Time at beginning of fit interval.
Definition: NavFit.hpp:54
gnsstk::GalINavAlm::validate
bool validate() const override
Definition: GalINavAlm.cpp:71
gnsstk::printTime
std::string printTime(const CommonTime &t, const std::string &fmt)
Definition: TimeString.cpp:64
std
Definition: Angle.hpp:142
gnsstk::GalINavAlm::fixHealth
void fixHealth()
Definition: GalINavAlm.cpp:97
gnsstk::GalHealthStatus
GalHealthStatus
Identify different types of SV health states.
Definition: GalHealthStatus.hpp:51
gnsstk::GalINavAlm::hsE1B
GalHealthStatus hsE1B
Health status for E1B.
Definition: GalINavAlm.hpp:114
gnsstk::GalHealthStatus::OutOfService
@ OutOfService
Signal out of service.
gnsstk::OrbitDataKepler::health
SVHealth health
SV health status.
Definition: OrbitDataKepler.hpp:173
gnsstk::SVHealth::Unhealthy
@ Unhealthy
Satellite is unhealthy and should not be used.
gnsstk::GalINavAlm::fixFit
void fixFit()
Fill the beginFit and endFit values for this object.
Definition: GalINavAlm.cpp:87
TimeString.hpp
gnsstk::NavMessageType::Almanac
@ Almanac
Low-precision orbits for other than the transmitting SV.


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