isce3  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
EulerAngles.h
1 //-*- C++ -*-
2 //-*- coding: utf-8 -*-
3 //
4 // Author: Bryan V. Riel
5 // Copyright 2018
6 //
7 
8 #pragma once
9 
10 #include "forward.h"
11 
12 #include "Attitude.h"
13 
18 
19  public:
21  EulerAngles(const std::string yaw_orientation="normal");
22 
24  EulerAngles(const std::vector<double> & time,
25  const std::vector<double> & yaw,
26  const std::vector<double> & pitch,
27  const std::vector<double> & roll,
28  const std::string yaw_orientation="normal");
29 
31  EulerAngles(const EulerAngles &);
32 
34  bool operator==(const EulerAngles &) const;
35 
38 
40  void data(const std::vector<double> & time,
41  const std::vector<double> & yaw,
42  const std::vector<double> & pitch,
43  const std::vector<double> & roll);
44 
46  inline const std::vector<double> & time() const { return _time; }
47 
49  inline const std::vector<double> & yaw() const { return _yaw; }
50 
52  inline const std::vector<double> & pitch() const { return _pitch; }
53 
55  inline const std::vector<double> & roll() const { return _roll; }
56 
58  void ypr(double tintp, double & yaw, double & pitch, double & roll);
59 
61  cartmat_t rotmat(double tintp, const std::string,
62  double dyaw = 0.0, double dpitch = 0.0,
63  double d2 = 0.0, double d3 = 0.0);
64 
66  std::vector<double> toQuaternionElements(double tintp);
67 
70 
72  cartmat_t T3(double);
73 
75  cartmat_t T2(double);
76 
78  cartmat_t T1(double);
79 
81  static cartesian_t rotmat2ypr(const cartmat_t &);
82 
84  inline const isce3::core::DateTime & refEpoch() const { return _refEpoch; }
86  inline void refEpoch(const isce3::core::DateTime & epoch) { _refEpoch = epoch; }
87 
89  inline size_t nVectors() const { return _yaw.size(); }
90 
91  // Private data members
92  private:
93  // Vectors of time and attitude angles
94  std::vector<double> _time;
95  std::vector<double> _yaw;
96  std::vector<double> _pitch;
97  std::vector<double> _roll;
98 
99  // Reference epoch
100  isce3::core::DateTime _refEpoch;
101 };
void refEpoch(const isce3::core::DateTime &epoch)
Set reference epoch.
Definition: EulerAngles.h:86
static cartesian_t rotmat2ypr(const cartmat_t &)
Utility method to convert rotation matrix to Euler angles.
Definition: EulerAngles.cpp:265
Base class for attitude data representation.
Definition: Attitude.h:18
const std::vector< double > & roll() const
Return data vector of roll.
Definition: EulerAngles.h:55
Data structure to store date time to nano-sec precision.
Definition: DateTime.h:18
bool operator==(const EulerAngles &) const
Comparison operator.
Definition: EulerAngles.cpp:67
Quaternion toQuaternion()
Return equivalent quaternion data structure.
Definition: EulerAngles.cpp:315
EulerAngles & operator=(const EulerAngles &)
Assignment operator.
Definition: EulerAngles.cpp:88
Definition: DenseMatrix.h:13
Quaternion representation of attitude information.
Definition: Quaternion.h:17
cartmat_t T2(double)
Return T2 rotation matrix around Y-axis.
Definition: EulerAngles.cpp:240
void data(const std::vector< double > &time, const std::vector< double > &yaw, const std::vector< double > &pitch, const std::vector< double > &roll)
Set data after construction.
Definition: EulerAngles.cpp:105
cartmat_t rotmat(double tintp, const std::string, double dyaw=0.0, double dpitch=0.0, double d2=0.0, double d3=0.0)
Return rotation matrix at a given time with optional angle perturbations.
Definition: EulerAngles.cpp:209
void ypr(double tintp, double &yaw, double &pitch, double &roll)
Interpolate yaw, pitch and roll at a given time.
Definition: EulerAngles.cpp:130
const isce3::core::DateTime & refEpoch() const
Get reference epoch.
Definition: EulerAngles.h:84
cartmat_t T1(double)
Return T1 rotation matrix around X-axis.
Definition: EulerAngles.cpp:252
size_t nVectors() const
Return number of epochs.
Definition: EulerAngles.h:89
std::vector< double > toQuaternionElements(double tintp)
Return equivalent quaternion elements at a given time.
Definition: EulerAngles.cpp:288
const std::vector< double > & yaw() const
Return data vector of yaw.
Definition: EulerAngles.h:49
cartmat_t T3(double)
Return T3 rotation matrix around Z-axis.
Definition: EulerAngles.cpp:228
EulerAngles(const std::string yaw_orientation="normal")
Default constructor.
Definition: EulerAngles.cpp:28
Data structure for Euler Angle representation of attitude information.
Definition: EulerAngles.h:17
const std::vector< double > & time() const
Return data vector of time.
Definition: EulerAngles.h:46
const std::vector< double > & pitch() const
Return data vector of pitch.
Definition: EulerAngles.h:52

Generated for ISCE3.0 by doxygen 1.8.5.