NavHealthData_T.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 "NavHealthData.hpp"
40 #include "TestUtil.hpp"
41 #include "GPSWeekSecond.hpp"
42 
44 class TestClass : public gnsstk::NavHealthData
45 {
46 public:
47  gnsstk::SVHealth getHealth() const override
48  { return gnsstk::SVHealth::Unhealthy; }
49  bool validate() const override
50  { return false; }
53  gnsstk::NavDataPtr clone() const override
54  { return std::make_shared<TestClass>(*this); }
55 };
56 
57 
58 namespace gnsstk
59 {
60  std::ostream& operator<<(std::ostream& s, gnsstk::NavMessageType e)
61  {
62  s << StringUtils::asString(e);
63  return s;
64  }
65 }
66 
67 
69 {
70 public:
72  unsigned constructorTest();
73 };
74 
75 
76 unsigned NavHealthData_T ::
78 {
79  TUDEF("NavHealthData", "NavHealthData");
80  TestClass obj;
82  obj.signal.messageType);
83  TURETURN();
84 }
85 
86 
87 int main()
88 {
89  NavHealthData_T testClass;
90  unsigned errorTotal = 0;
91 
92  errorTotal += testClass.constructorTest();
93 
94  std::cout << "Total Failures for " << __FILE__ << ": " << errorTotal
95  << std::endl;
96 
97  return errorTotal;
98 }
gnsstk::NavDataPtr
std::shared_ptr< NavData > NavDataPtr
Factories instantiate these in response to find() requests.
Definition: NavData.hpp:62
TestClass::getUserTime
gnsstk::CommonTime getUserTime() const override
Definition: NavHealthData_T.cpp:51
NavHealthData.hpp
TUASSERTE
#define TUASSERTE(TYPE, EXP, GOT)
Definition: TestUtil.hpp:81
gnsstk::NavMessageType::Health
@ Health
SV health status information message.
gnsstk::StringUtils::asString
std::string asString(IonexStoreStrategy e)
Convert a IonexStoreStrategy to a whitespace-free string name.
Definition: IonexStoreStrategy.cpp:46
TestClass::clone
gnsstk::NavDataPtr clone() const override
Definition: NavHealthData_T.cpp:53
gnsstk::SVHealth
SVHealth
Identify different types of SV health states.
Definition: SVHealth.hpp:52
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
TestClass::validate
bool validate() const override
Definition: NavHealthData_T.cpp:49
gnsstk::CommonTime::END_OF_TIME
static const GNSSTK_EXPORT CommonTime END_OF_TIME
latest representable CommonTime
Definition: CommonTime.hpp:104
TestUtil.hpp
TURETURN
#define TURETURN()
Definition: TestUtil.hpp:232
NavHealthData_T::constructorTest
unsigned constructorTest()
Make sure constructor initializes data members correctly.
Definition: NavHealthData_T.cpp:77
gnsstk::operator<<
std::ostream & operator<<(std::ostream &s, const ObsEpoch &oe) noexcept
Definition: ObsEpochMap.cpp:54
gnsstk::CommonTime
Definition: CommonTime.hpp:84
main
int main()
Definition: NavHealthData_T.cpp:87
gnsstk::NavHealthData
Definition: NavHealthData.hpp:52
TestClass::getHealth
gnsstk::SVHealth getHealth() const override
Definition: NavHealthData_T.cpp:47
TUDEF
#define TUDEF(CLASS, METHOD)
Definition: TestUtil.hpp:56
GPSWeekSecond.hpp
gnsstk::NavMessageType
NavMessageType
Identify different types of navigation message data.
Definition: NavMessageType.hpp:59
TestClass
Make GroupPathCorrector instantiatable for testing.
Definition: GroupPathCorrector_T.cpp:56
gnsstk::SVHealth::Unhealthy
@ Unhealthy
Satellite is unhealthy and should not be used.
NavHealthData_T
Definition: NavHealthData_T.cpp:68


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