GLOCNavLTDMP_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 <math.h>
40 #include "TestUtil.hpp"
41 #include "GLOCNavLTDMP.hpp"
42 
43 
45 {
46 public:
47  unsigned constructorTest();
48  unsigned isSVIDTest();
49 };
50 
51 
52 unsigned GLOCNavLTDMP_T ::
54 {
55  TUDEF("GLOCNavLTDMP", "GLOCNavLTDMP");
57  TUASSERTE(int, 1, isnan(uut.dax0));
58  TUASSERTE(int, 1, isnan(uut.day0));
59  TUASSERTE(int, 1, isnan(uut.daz0));
60  TUASSERTE(int, 1, isnan(uut.ax1));
61  TUASSERTE(int, 1, isnan(uut.ay1));
62  TUASSERTE(int, 1, isnan(uut.az1));
63  TUASSERTE(int, 1, isnan(uut.ax2));
64  TUASSERTE(int, 1, isnan(uut.ay2));
65  TUASSERTE(int, 1, isnan(uut.az2));
66  TUASSERTE(int, 1, isnan(uut.ax3));
67  TUASSERTE(int, 1, isnan(uut.ay3));
68  TUASSERTE(int, 1, isnan(uut.az3));
69  TUASSERTE(int, 1, isnan(uut.ax4));
70  TUASSERTE(int, 1, isnan(uut.ay4));
71  TUASSERTE(int, 1, isnan(uut.az4));
72  TURETURN();
73 }
74 
75 
76 unsigned GLOCNavLTDMP_T ::
78 {
79  TUDEF("GLOCNavLTDMP", "isSVID");
81  TUASSERTE(bool, false, uut.isSVID(9));
82  uut.header31.svid = 9;
83  TUASSERTE(bool, false, uut.isSVID(9));
84  uut.header32.svid = 9;
85  TUASSERTE(bool, true, uut.isSVID(9));
86  TURETURN();
87 }
88 
89 
90 int main()
91 {
92  GLOCNavLTDMP_T testClass;
93  unsigned errorTotal = 0;
94 
95  errorTotal += testClass.constructorTest();
96  errorTotal += testClass.isSVIDTest();
97 
98  std::cout << "Total Failures for " << __FILE__ << ": " << errorTotal
99  << std::endl;
100 
101  return errorTotal;
102 }
gnsstk::GLOCNavHeader::svid
uint8_t svid
Subject SV ID (j).
Definition: GLOCNavHeader.hpp:86
gnsstk::GLOCNavLTDMP::header32
GLOCNavHeader header32
Header (incl xmit time) data from string 32.
Definition: GLOCNavLTDMP.hpp:79
TUASSERTE
#define TUASSERTE(TYPE, EXP, GOT)
Definition: TestUtil.hpp:81
gnsstk::GLOCNavLTDMP::day0
double day0
Definition: GLOCNavLTDMP.hpp:86
gnsstk::GLOCNavLTDMP::isSVID
bool isSVID(uint8_t sv) const
Definition: GLOCNavLTDMP.hpp:63
gnsstk::GLOCNavLTDMP::dax0
double dax0
Definition: GLOCNavLTDMP.hpp:85
gnsstk::GLOCNavLTDMP::ay4
double ay4
Definition: GLOCNavLTDMP.hpp:98
gnsstk::GLOCNavLTDMP::az4
double az4
Definition: GLOCNavLTDMP.hpp:99
gnsstk::GLOCNavLTDMP::ax3
double ax3
Definition: GLOCNavLTDMP.hpp:94
TestUtil.hpp
main
int main()
Definition: GLOCNavLTDMP_T.cpp:90
TURETURN
#define TURETURN()
Definition: TestUtil.hpp:232
gnsstk::GLOCNavLTDMP::ay3
double ay3
Definition: GLOCNavLTDMP.hpp:95
gnsstk::GLOCNavLTDMP::daz0
double daz0
Definition: GLOCNavLTDMP.hpp:87
gnsstk::GLOCNavLTDMP::ax1
double ax1
Definition: GLOCNavLTDMP.hpp:88
gnsstk::GLOCNavLTDMP::header31
GLOCNavHeader header31
Header (incl xmit time) data from string 31.
Definition: GLOCNavLTDMP.hpp:78
GLOCNavLTDMP_T::isSVIDTest
unsigned isSVIDTest()
Definition: GLOCNavLTDMP_T.cpp:77
TUDEF
#define TUDEF(CLASS, METHOD)
Definition: TestUtil.hpp:56
gnsstk::GLOCNavLTDMP::az2
double az2
Definition: GLOCNavLTDMP.hpp:93
gnsstk::GLOCNavLTDMP::ay1
double ay1
Definition: GLOCNavLTDMP.hpp:89
gnsstk::GLOCNavLTDMP::az3
double az3
Definition: GLOCNavLTDMP.hpp:96
gnsstk::GLOCNavLTDMP::ax4
double ax4
Definition: GLOCNavLTDMP.hpp:97
gnsstk::GLOCNavLTDMP
Definition: GLOCNavLTDMP.hpp:55
GLOCNavLTDMP.hpp
gnsstk::GLOCNavLTDMP::az1
double az1
Definition: GLOCNavLTDMP.hpp:90
GLOCNavLTDMP_T
Definition: GLOCNavLTDMP_T.cpp:44
gnsstk::GLOCNavLTDMP::ax2
double ax2
Definition: GLOCNavLTDMP.hpp:91
GLOCNavLTDMP_T::constructorTest
unsigned constructorTest()
Definition: GLOCNavLTDMP_T.cpp:53
gnsstk::GLOCNavLTDMP::ay2
double ay2
Definition: GLOCNavLTDMP.hpp:92


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