GPSCNavHealth.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 "GPSCNavHealth.hpp"
40 
41 using namespace std;
42 
43 namespace gnsstk
44 {
45  CommonTime GPSCNavHealth ::
46  getUserTime() const
47  {
48  if (signal.nav == NavType::GPSCNAVL2)
49  return timeStamp + 12.0;
50  return timeStamp + 6.0;
51  }
52 
53 
54  void GPSCNavHealth ::
55  dump(std::ostream& s, DumpDetail dl) const
56  {
57  const ios::fmtflags oldFlags = s.flags();
58  s.setf(ios::fixed, ios::floatfield);
59  s.setf(ios::right, ios::adjustfield);
60  s.setf(ios::uppercase);
61  s.precision(0);
62  s.fill(' ');
63  switch (dl)
64  {
65  case DumpDetail::OneLine:
66  NavData::dump(s,dl);
67  break;
68  case DumpDetail::Brief:
69  NavData::dump(s,dl);
70  s << "health = " << hex << (unsigned)health << dec << " "
71  << StringUtils::asString(getHealth()) << endl;
72  break;
73  case DumpDetail::Full:
74  // "header"
75  s << "*************************************************************"
76  << "***************" << endl
77  << "Satellite Health"
78  << endl
79  << endl
80  << getSignalString() << endl
81  << " TIMES OF INTEREST"
82  << endl << endl
83  << " " << getDumpTimeHdr(dl) << endl
84  << "Transmit: " << getDumpTime(dl, timeStamp) << endl
85  << endl
86  << " HEALTH DATA" << endl
87  << "Bits 0x" << hex << setw(1) << setfill('0')
88  << (unsigned)health << endl
89  << "Status " << StringUtils::asString(getHealth())
90  << endl;
91  break;
92  }
93  s.flags(oldFlags);
94  }
95 }
gnsstk::dump
void dump(vector< SatPass > &SatPassList, ostream &os, bool rev, bool dbug)
Definition: SatPassUtilities.cpp:59
gnsstk::StringUtils::asString
std::string asString(IonexStoreStrategy e)
Convert a IonexStoreStrategy to a whitespace-free string name.
Definition: IonexStoreStrategy.cpp:46
GPSCNavHealth.hpp
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::DumpDetail
DumpDetail
Specify level of detail for dump output.
Definition: DumpDetail.hpp:51
std
Definition: Angle.hpp:142


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