isce3  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Quaternion.h
1 //-*- C++ -*-
2 //-*- coding: utf-8 -*-
3 //
4 // Author: Bryan V. Riel
5 // Copyright 2018
6 //
7 
8 #pragma once
9 #define EIGEN_MPL2_ONLY
10 #include <Eigen/Geometry>
11 
12 #include "forward.h"
13 
14 #include "Attitude.h"
15 
18 
19  public:
21  Quaternion();
22 
31  Quaternion(const std::vector<double> & time, const std::vector<double> & quaternions);
32 
34  void data(const std::vector<double> & time,
35  const std::vector<double> & quaternions);
36 
38  void ypr(double tintp, double & yaw, double & pitch, double & roll);
39 
41  cartmat_t rotmat(double tintp, const std::string, double dq0 = 0.0, double dq1 = 0.0,
42  double dq2 = 0.0, double dq3 = 0.0);
43 
45  cartesian_t factoredYPR(double time,
46  const cartesian_t &,
47  const cartesian_t &,
48  Ellipsoid *);
49 
51  inline const std::vector<double> & time() const { return _time; }
52 
54  inline const std::vector<double> & qvec() const { return _qvec; };
55 
57  inline size_t nVectors() const { return _time.size(); }
58 
59  // Private data members
60  private:
61  std::vector<double> _time;
62  std::vector<double> _qvec;
63  Eigen::Quaternion<double> _interp(double t) const;
64 };
cartesian_t factoredYPR(double time, const cartesian_t &, const cartesian_t &, Ellipsoid *)
Return factored Yaw, Pitch, Roll.
Definition: Quaternion.cpp:119
Data structure to store Ellipsoid information.
Definition: Ellipsoid.h:20
const std::vector< double > & qvec() const
Get the quaternion elements (packed in size N*4 vector)
Definition: Quaternion.h:54
Base class for attitude data representation.
Definition: Attitude.h:18
cartmat_t rotmat(double tintp, const std::string, double dq0=0.0, double dq1=0.0, double dq2=0.0, double dq3=0.0)
Return rotation matrix with optional perturbations.
Definition: Quaternion.cpp:89
const std::vector< double > & time() const
Return data vector of time.
Definition: Quaternion.h:51
void data(const std::vector< double > &time, const std::vector< double > &quaternions)
Set all quaternion elements from a vector.
Definition: Quaternion.cpp:156
Quaternion()
Default constructor.
Definition: Quaternion.cpp:26
Definition: DenseMatrix.h:13
Quaternion representation of attitude information.
Definition: Quaternion.h:17
size_t nVectors() const
Return number of epochs.
Definition: Quaternion.h:57
void ypr(double tintp, double &yaw, double &pitch, double &roll)
Return yaw, pitch, roll.
Definition: Quaternion.cpp:69

Generated for ISCE3.0 by doxygen 1.8.5.