Interpolator3D.h
Go to the documentation of this file.
1 /*
2  * Interpolator3D.h
3  *
4  * Created on: Apr 17, 2015
5  * Author: leven
6  */
7 
8 #ifndef INTERPOLATOR3D_H_
9 #define INTERPOLATOR3D_H_
10 
11 
12 #include "Macros_Convenience.h"
13 #include "Math/Interpolator.h"
14 #include "utl/UTMPoint.h"
15 #include "utl/Vector.h"
16 #include "utl/CoordinateSystemPtr.h"
17 #include "utl/TimeStamp.h"
18 
19 #include "Math/Interpolator.h"
20 
21 #include <vector>
22 #include <string>
23 
24 namespace RdAirplane {
25 
26 class Flight;
27 
29  public:
31  const std::vector<const utl::TimeStamp*>& pTimes,
32  const std::vector<const utl::UTMPoint*>& pCoordinates,
33  Flight* pFlight);
34 
35 
36  utl::Point getCoordinates(const utl::TimeStamp& pTime) const;
37 
38  utl::Vector getDerivative(const utl::TimeStamp& pTime) const;
39 
40  bool isTimeInInterpolatedRange(const utl::TimeStamp& pTime) const;
41 
42  std::string getInformation() const;
43 
44  virtual ~Interpolator3D();
45 
46  private:
48  static double _timeFromTimeStamp(const utl::TimeStamp& pTime);
49  static std::vector<double> _timesFromTimeStamps(const std::vector<const utl::TimeStamp*>& pTimes);
50  static boost::tuple<double,double> _verySimpleLinearFit(const std::vector<double>& pX, const std::vector<double>& pY);
52  static void _getCoordinates(
53  const std::vector<const utl::UTMPoint*>& pCoordinates,
54  std::vector<double>* p_OUT_xs,
55  std::vector<double>* p_OUT_ys,
56  std::vector<double>* p_OUT_zs);
57  static void _getGeodeticCoordinates(
58  const std::vector<const utl::UTMPoint*>& pCoordinates,
59  std::vector<double>* p_OUT_latitudes,
60  std::vector<double>* p_OUT_longitudes,
61  std::vector<double>* p_OUT_altitudes);
65  ROOT::Math::Interpolator* _interpolatorX_;
66  ROOT::Math::Interpolator* _interpolatorY_;
67  ROOT::Math::Interpolator* _interpolatorZ_;
68 };
69 
70 } /* namespace RdAirplane */
71 #endif /* INTERPOLATOR3D_H_ */
static utl::CoordinateSystemPtr _coordinateSystem()
Point object.
Definition: Point.h:32
static double _timeFromTimeStamp(const utl::TimeStamp &pTime)
utl::Vector getDerivative(const utl::TimeStamp &pTime) const
A TimeStamp holds GPS second and nanosecond for some event.
Definition: TimeStamp.h:110
utl::TimeStamp _earliestTime_
static boost::tuple< double, double > _verySimpleLinearFit(const std::vector< double > &pX, const std::vector< double > &pY)
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
utl::Point getCoordinates(const utl::TimeStamp &pTime) const
bool isTimeInInterpolatedRange(const utl::TimeStamp &pTime) const
static void _getCoordinates(const std::vector< const utl::UTMPoint * > &pCoordinates, std::vector< double > *p_OUT_xs, std::vector< double > *p_OUT_ys, std::vector< double > *p_OUT_zs)
DISALLOW_COPY_AND_ASSIGN(Interpolator3D)
static void _getGeodeticCoordinates(const std::vector< const utl::UTMPoint * > &pCoordinates, std::vector< double > *p_OUT_latitudes, std::vector< double > *p_OUT_longitudes, std::vector< double > *p_OUT_altitudes)
std::string getInformation() const
ROOT::Math::Interpolator * _interpolatorZ_
ROOT::Math::Interpolator * _interpolatorX_
Vector object.
Definition: Vector.h:30
static std::vector< double > _timesFromTimeStamps(const std::vector< const utl::TimeStamp * > &pTimes)
Interpolator3D(const std::vector< const utl::TimeStamp * > &pTimes, const std::vector< const utl::UTMPoint * > &pCoordinates, Flight *pFlight)
ROOT::Math::Interpolator * _interpolatorY_

, generated on Tue Sep 26 2023.