OrbitDataSP3.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 "OrbitDataSP3.hpp"
40 
41 using namespace std;
42 
43 namespace gnsstk
44 {
45  OrbitDataSP3 ::
46  OrbitDataSP3()
47  : pos(0.0, 0.0, 0.0), posSig(0.0, 0.0, 0.0),
48  vel(0.0, 0.0, 0.0), velSig(0.0, 0.0, 0.0),
49  acc(0.0, 0.0, 0.0), accSig(0.0, 0.0, 0.0),
50  clkBias(0.0), biasSig(0.0), clkDrift(0.0), driftSig(0.0),
51  clkDrRate(0.0), drRateSig(0.0)
52  {
54  }
55 
56 
57  void OrbitDataSP3 ::
58  copyXV(const OrbitDataSP3& right)
59  {
60  pos = right.pos;
61  posSig = right.posSig;
62  vel = right.vel;
63  velSig = right.velSig;
64  acc = right.acc;
65  accSig = right.accSig;
66  }
67 
68 
69  void OrbitDataSP3 ::
70  copyT(const OrbitDataSP3& right)
71  {
72  clkBias = right.clkBias;
73  biasSig = right.biasSig;
74  clkDrift = right.clkDrift;
75  driftSig = right.driftSig;
76  clkDrRate = right.clkDrRate;
77  drRateSig = right.drRateSig;
78  }
79 
80 
81  bool OrbitDataSP3 ::
82  getXvt(const CommonTime& when, Xvt& xvt, const ObsID& oid)
83  {
84  // The OrbitDataSP3 object is generated on request and is
85  // specific to a given time since the data that must be used
86  // for interpolation is only available in the factory store.
87  // As such, we refuse to generate an XVT for anything other
88  // than the time that this OrbitDataSP3 object represents.
89  if (when != timeStamp)
90  return false;
91  for (unsigned i = 0; i < 3; i++)
92  {
93  xvt.x[i] = pos[i] * 1000.0;
94  xvt.v[i] = vel[i] * 0.1;
95  }
96  xvt.clkbias = clkBias * 1e-6; // microseconds to seconds
97  xvt.clkdrift = clkDrift * 1e-6;
98  xvt.health = Xvt::HealthStatus::Unused;
100  xvt.frame = frame;
101  return true;
102  }
103 
104 
105  void OrbitDataSP3 ::
106  dump(std::ostream& s, DumpDetail dl) const
107  {
108  NavData::dump(s,dl);
109  if (dl == DumpDetail::OneLine)
110  return;
111  const ios::fmtflags oldFlags = s.flags();
112  s << fixed << setprecision(6) << "P: {";
113  for (unsigned i = 0; i < pos.size(); i++)
114  s << " " << pos[i];
115  s << "} bias: " << clkBias << endl
116  << "V: {";
117  for (unsigned i = 0; i < vel.size(); i++)
118  s << " " << vel[i];
119  s << "} drift: " << clkDrift << endl;
120  if (dl == DumpDetail::Brief)
121  return;
122  s << "A: {";
123  for (unsigned i = 0; i < acc.size(); i++)
124  s << " " << acc[i];
125  s << "} drift rate: " << clkDrRate << endl
126  << "P sigma: {";
127  for (unsigned i = 0; i < posSig.size(); i++)
128  s << " " << posSig[i];
129  s << "} bias sigma: " << biasSig << endl
130  << "V sigma: {";
131  for (unsigned i = 0; i < velSig.size(); i++)
132  s << " " << velSig[i];
133  s << "} drift sigma: " << driftSig << endl
134  << "A sigma: {";
135  for (unsigned i = 0; i < accSig.size(); i++)
136  s << " " << accSig[i];
137  s << "} drift rate sigma: " << drRateSig << endl;
138  s.flags(oldFlags);
139  }
140 }
gnsstk::OrbitDataSP3::posSig
Triple posSig
Standard deviation of position.
Definition: OrbitDataSP3.hpp:91
gnsstk::OrbitDataSP3::driftSig
double driftSig
SV clock drift std deviation in microseconds/sec.
Definition: OrbitDataSP3.hpp:99
gnsstk::NavData::dump
virtual void dump(std::ostream &s, DumpDetail dl) const
Definition: NavData.cpp:79
gnsstk::Triple::size
size_t size(void) const
Return the size of this object.
Definition: Triple.hpp:240
gnsstk::OrbitDataSP3::vel
Triple vel
ECEF velocity (dm/s) of satellite at time.
Definition: OrbitDataSP3.hpp:92
gnsstk::NavMessageID::messageType
NavMessageType messageType
Definition: NavMessageID.hpp:97
gnsstk::OrbitDataSP3::copyXV
void copyXV(const OrbitDataSP3 &right)
Definition: OrbitDataSP3.cpp:58
gnsstk::OrbitDataSP3::velSig
Triple velSig
Standard deviation of velocity.
Definition: OrbitDataSP3.hpp:93
gnsstk::OrbitDataSP3::dump
void dump(std::ostream &s, DumpDetail dl) const override
Definition: OrbitDataSP3.cpp:106
example5.oid
oid
Definition: example5.py:29
gnsstk::Xvt::frame
RefFrame frame
reference frame of this data
Definition: Xvt.hpp:156
gnsstk::OrbitDataSP3::clkBias
double clkBias
SV clock bias in microseconds.
Definition: OrbitDataSP3.hpp:96
gnsstk::OrbitDataSP3::accSig
Triple accSig
Standard deviation of acceleration.
Definition: OrbitDataSP3.hpp:95
gnsstk::Xvt::v
Triple v
satellite velocity in ECEF Cartesian, meters/second
Definition: Xvt.hpp:152
gnsstk::NavData::signal
NavMessageID signal
Source signal identification for this navigation message data.
Definition: NavData.hpp:175
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::NavData::timeStamp
CommonTime timeStamp
Definition: NavData.hpp:173
gnsstk::Xvt::x
Triple x
Sat position ECEF Cartesian (X,Y,Z) meters.
Definition: Xvt.hpp:151
gnsstk::OrbitDataSP3::pos
Triple pos
ECEF position (km) of satellite at time.
Definition: OrbitDataSP3.hpp:90
gnsstk::ObsID
Definition: ObsID.hpp:82
gnsstk::CommonTime
Definition: CommonTime.hpp:84
gnsstk::Xvt::clkdrift
double clkdrift
satellite clock drift in seconds/second
Definition: Xvt.hpp:154
gnsstk::Xvt
Definition: Xvt.hpp:60
gnsstk::OrbitDataSP3::copyT
void copyT(const OrbitDataSP3 &right)
Definition: OrbitDataSP3.cpp:70
example4.pos
pos
Definition: example4.py:125
gnsstk::Xvt::health
HealthStatus health
Health status of satellite at ref time.
Definition: Xvt.hpp:157
gnsstk::OrbitDataSP3::clkDrift
double clkDrift
SV clock drift in s/s.
Definition: OrbitDataSP3.hpp:98
OrbitDataSP3.hpp
gnsstk::OrbitDataSP3::acc
Triple acc
Acceleration (m/s/s) of satellite at time.
Definition: OrbitDataSP3.hpp:94
gnsstk::OrbitDataSP3::getXvt
bool getXvt(const CommonTime &when, Xvt &xvt, const ObsID &oid=ObsID()) override
Definition: OrbitDataSP3.cpp:82
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::OrbitDataSP3::clkDrRate
double clkDrRate
SV clock drift rate in s/s**2.
Definition: OrbitDataSP3.hpp:100
gnsstk::NavMessageType::Ephemeris
@ Ephemeris
Precision orbits for the transmitting SV.
gnsstk::OrbitDataSP3::biasSig
double biasSig
SV clock bias std deviation in microseconds.
Definition: OrbitDataSP3.hpp:97
gnsstk::DumpDetail::OneLine
@ OneLine
Limit output to minimal information on a single line.
gnsstk::OrbitDataSP3
Class for orbit information using SP3 data tables.
Definition: OrbitDataSP3.hpp:51
gnsstk::Xvt::clkbias
double clkbias
Sat clock correction in seconds.
Definition: Xvt.hpp:153
gnsstk::Xvt::computeRelativityCorrection
virtual double computeRelativityCorrection(void)
Definition: Xvt.cpp:98
gnsstk::OrbitDataSP3::frame
RefFrame frame
Translation of coordSystem into an enum, if possible.
Definition: OrbitDataSP3.hpp:105
gnsstk::OrbitDataSP3::drRateSig
double drRateSig
Definition: OrbitDataSP3.hpp:101


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