GPSLNavHealth.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 "GPSLNavHealth.hpp"
40 
41 using namespace std;
42 
43 namespace gnsstk
44 {
45  GPSLNavHealth ::
46  GPSLNavHealth()
47  : svHealth(0x80)
48  {
49  msgLenSec = 6.0;
50  }
51 
52 
53  void GPSLNavHealth ::
54  dump(std::ostream& s, DumpDetail dl) const
55  {
56  const ios::fmtflags oldFlags = s.flags();
57  s.setf(ios::fixed, ios::floatfield);
58  s.setf(ios::right, ios::adjustfield);
59  s.setf(ios::uppercase);
60  s.precision(0);
61  s.fill(' ');
62  switch (dl)
63  {
65  NavData::dump(s,dl);
66  break;
67  case DumpDetail::Brief:
68  NavData::dump(s,dl);
69  s << "svHealth = " << hex << (unsigned)svHealth << dec << " "
70  << StringUtils::asString(getHealth()) << endl;
71  break;
72  case DumpDetail::Full:
73  // "header"
74  s << "*************************************************************"
75  << "***************" << endl
76  << "Satellite Health"
77  << endl
78  << endl
79  << getSignalString() << endl
80  << " TIMES OF INTEREST"
81  << endl << endl
82  << " " << getDumpTimeHdr(dl) << endl
83  << "Transmit: " << getDumpTime(dl, timeStamp) << endl
84  << endl
85  << " HEALTH DATA" << endl
86  << "Bits 0x" << hex << setw(1) << setfill('0')
87  << (unsigned)svHealth << endl
88  << "Status " << StringUtils::asString(getHealth())
89  << endl;
90  break;
91  }
92  s.flags(oldFlags);
93  }
94 }
gnsstk::NavData::getSignalString
std::string getSignalString() const
Definition: NavData.cpp:86
gnsstk::NavData::msgLenSec
double msgLenSec
Definition: NavData.hpp:199
gnsstk::GPSLNavHealth::svHealth
uint8_t svHealth
6-bit or 8-bit health.
Definition: GPSLNavHealth.hpp:80
gnsstk::NavData::dump
virtual void dump(std::ostream &s, DumpDetail dl) const
Definition: NavData.cpp:79
gnsstk::NavData::getDumpTime
std::string getDumpTime(DumpDetail dl, const CommonTime &t) const
Definition: NavData.cpp:145
gnsstk::StringUtils::asString
std::string asString(IonexStoreStrategy e)
Convert a IonexStoreStrategy to a whitespace-free string name.
Definition: IonexStoreStrategy.cpp:46
GPSLNavHealth.hpp
gnsstk::NavData::getDumpTimeHdr
std::string getDumpTimeHdr(DumpDetail dl) const
Definition: NavData.cpp:127
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::NavData::timeStamp
CommonTime timeStamp
Definition: NavData.hpp:173
gnsstk::DumpDetail::Full
@ Full
Include all detailed information.
gnsstk::GPSLNavHealth::dump
void dump(std::ostream &s, DumpDetail dl) const override
Definition: GPSLNavHealth.cpp:54
gnsstk::GPSLNavHealth::getHealth
SVHealth getHealth() const override
Definition: GPSLNavHealth.hpp:76
gnsstk::DumpDetail
DumpDetail
Specify level of detail for dump output.
Definition: DumpDetail.hpp:51
gnsstk::DumpDetail::Brief
@ Brief
Limit output to <= 5 lines of minimal information.
std
Definition: Angle.hpp:142
gnsstk::DumpDetail::OneLine
@ OneLine
Limit output to minimal information on a single line.


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