Transformer.hpp
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 // This software was developed by Applied Research Laboratories at the
28 // University of Texas at Austin, under contract to an agency or agencies
29 // within the U.S. Department of Defense. The U.S. Government retains all
30 // rights to use, duplicate, distribute, disclose, or release this software.
31 //
32 // Pursuant to DoD Directive 523024
33 //
34 // DISTRIBUTION STATEMENT A: This software has been approved for public
35 // release, distribution is unlimited.
36 //
37 //==============================================================================
38 
39 #ifndef GNSSTK_TRANSFORMER_HPP
40 #define GNSSTK_TRANSFORMER_HPP
41 
42 #include <memory>
43 #include <map>
44 #include "Position.hpp"
45 #include "Xvt.hpp"
46 #include "Vector.hpp"
47 #include "RefFrame.hpp"
48 #include "CommonTime.hpp"
49 
50 namespace gnsstk
51 {
53 
54 
58  {
59  public:
60  // Initialize start and end time to min and max values.
63  {}
64 
76  virtual bool transform(const Position& fromPos, Position& toPos)
77  const noexcept = 0;
78 
90  virtual bool transform(const Xvt& fromPos, Xvt& toPos)
91  const noexcept = 0;
92 
103  virtual bool transform(const Vector<double>& fromPos,
104  const RefFrame& srcFrame,
105  Vector<double>& toPos)
106  const noexcept = 0;
107 
118  virtual bool transform(const Triple& fromPos,
119  const RefFrame& srcFrame,
120  Triple& toPos)
121  const noexcept = 0;
122 
137  virtual bool transform(double fx, double fy, double fz,
138  const RefFrame& srcFrame,
139  double& tx, double& ty, double& tz)
140  const noexcept = 0;
141 
143  const RefFrame& getFromFrame() const noexcept
144  { return fromFrame; }
146  const RefFrame& getToFrame() const noexcept
147  { return toFrame; }
153  const CommonTime& getEpoch() const noexcept
154  { return epoch; }
155 
156  protected:
160  }; // class Transformer
161 
163  using TransformerPtr = std::shared_ptr<Transformer>;
165  using TransformerHist = std::map<CommonTime, TransformerPtr>;
167  using TransformerMap = std::map<RefFramePair, TransformerHist>;
168 
170 
171 } // namespace gnsstk
172 
173 #endif // GNSSTK_TRANSFORMER_HPP
Xvt.hpp
gnsstk::Transformer::getFromFrame
const RefFrame & getFromFrame() const noexcept
Return the RefFrame this Transformer will convert from.
Definition: Transformer.hpp:143
gnsstk::BEGINNING_OF_TIME
const Epoch BEGINNING_OF_TIME(CommonTime::BEGINNING_OF_TIME)
Earliest representable Epoch.
const
#define const
Definition: getopt.c:43
gnsstk::Transformer::Transformer
Transformer()
Definition: Transformer.hpp:61
Position.hpp
gnsstk::RefFrame
Definition: RefFrame.hpp:53
gnsstk::Triple
Definition: Triple.hpp:68
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::Transformer::epoch
CommonTime epoch
When this Transformer was first applicable.
Definition: Transformer.hpp:159
RefFrame.hpp
gnsstk::Transformer
Definition: Transformer.hpp:57
gnsstk::Transformer::toFrame
RefFrame toFrame
The reference frame we can transform to.
Definition: Transformer.hpp:158
gnsstk::CommonTime
Definition: CommonTime.hpp:84
gnsstk::Xvt
Definition: Xvt.hpp:60
gnsstk::Vector< double >
gnsstk::Transformer::getToFrame
const RefFrame & getToFrame() const noexcept
Return the RefFrame this Transformer will convert to.
Definition: Transformer.hpp:146
gnsstk::TransformerHist
std::map< CommonTime, TransformerPtr > TransformerHist
Transformers may change over time while maintaining the same RefFrames.
Definition: Transformer.hpp:165
CommonTime.hpp
gnsstk::Position
Definition: Position.hpp:136
gnsstk::Transformer::transform
virtual bool transform(const Position &fromPos, Position &toPos) const noexcept=0
gnsstk::TransformerMap
std::map< RefFramePair, TransformerHist > TransformerMap
Container of transformers for management.
Definition: Transformer.hpp:167
gnsstk::TransformerPtr
std::shared_ptr< Transformer > TransformerPtr
Shared pointer to Transformer object.
Definition: Transformer.hpp:163
gnsstk::Transformer::fromFrame
RefFrame fromFrame
The reference frame we can transform from.
Definition: Transformer.hpp:157
Vector.hpp
gnsstk::Transformer::getEpoch
const CommonTime & getEpoch() const noexcept
Definition: Transformer.hpp:153


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