isce3  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Orbit.h
1 #pragma once
2 
3 #include <thrust/device_vector.h>
4 #include <vector>
5 
6 #include <isce3/core/DateTime.h>
7 #include <isce3/core/Linspace.h>
8 #include <isce3/core/Orbit.h>
9 #include <isce3/core/StateVector.h>
10 #include <isce3/core/TimeDelta.h>
11 #include <isce3/core/Vector.h>
12 
13 namespace isce3 { namespace cuda { namespace core {
14 
22 class Orbit {
23 public:
24 
25  Orbit() = default;
26 
28  Orbit(const isce3::core::Orbit &);
29 
38  Orbit(const std::vector<isce3::core::StateVector> & statevecs,
40 
48  Orbit(const std::vector<isce3::core::StateVector> & statevecs,
49  const isce3::core::DateTime & reference_epoch,
51 
53  std::vector<isce3::core::StateVector> getStateVectors() const;
54 
56  void setStateVectors(const std::vector<isce3::core::StateVector> &);
57 
59  const isce3::core::DateTime & referenceEpoch() const { return _reference_epoch; }
60 
63 
65  isce3::core::OrbitInterpMethod interpMethod() const { return _interp_method; }
66 
68  void interpMethod(isce3::core::OrbitInterpMethod interp_method) { _interp_method = interp_method; }
69 
71  double startTime() const { return _time[0]; }
72 
74  double midTime() const { return startTime() + 0.5 * (size() - 1) * spacing(); }
75 
77  double endTime() const { return _time[size()-1]; }
78 
80  isce3::core::DateTime startDateTime() const { return _reference_epoch + isce3::core::TimeDelta(startTime()); }
81 
83  isce3::core::DateTime midDateTime() const { return _reference_epoch + isce3::core::TimeDelta(midTime()); }
84 
86  isce3::core::DateTime endDateTime() const { return _reference_epoch + isce3::core::TimeDelta(endTime()); }
87 
89  double spacing() const { return _time.spacing(); }
90 
92  int size() const { return _time.size(); }
93 
95  const isce3::core::Linspace<double> & time() const { return _time; }
96 
98  const thrust::device_vector<isce3::core::Vec3> & position() const { return _position; }
99 
101  const thrust::device_vector<isce3::core::Vec3> & velocity() const { return _velocity; }
102 
104  double time(int idx) const { return _time[idx]; }
105 
107  isce3::core::Vec3 position(int idx) const { return _position[idx]; }
108 
110  isce3::core::Vec3 velocity(int idx) const { return _velocity[idx]; }
111 
125  isce3::error::ErrorCode
127  double t,
130 
131 private:
132  isce3::core::DateTime _reference_epoch;
134  thrust::device_vector<isce3::core::Vec3> _position;
135  thrust::device_vector<isce3::core::Vec3> _velocity;
137 };
138 
139 bool operator==(const Orbit &, const Orbit &);
140 bool operator!=(const Orbit &, const Orbit &);
141 
142 }}}
const thrust::device_vector< isce3::core::Vec3 > & position() const
Get state vector positions in ECEF coordinates (m)
Definition: Orbit.h:98
void interpMethod(isce3::core::OrbitInterpMethod interp_method)
Set interpolation method.
Definition: Orbit.h:68
isce3::core::Vec3 velocity(int idx) const
Get the specified state vector velocity in ECEF coordinates (m/s)
Definition: Orbit.h:110
Raise error if interpolation attempted outside orbit domain.
CUDA_HOSTDEV constexpr int size() const
Number of samples.
Definition: Linspace.h:86
const thrust::device_vector< isce3::core::Vec3 > & velocity() const
Get state vector velocities in ECEF coordinates (m/s)
Definition: Orbit.h:101
double startTime() const
Time of first state vector relative to reference epoch (s)
Definition: Orbit.h:71
void setStateVectors(const std::vector< isce3::core::StateVector > &)
Set orbit state vectors.
isce3::core::DateTime endDateTime() const
UTC time of last state vector.
Definition: Orbit.h:86
Data structure to store date time to nano-sec precision.
Definition: DateTime.h:18
isce3::core::Vec3 position(int idx) const
Get the specified state vector position in ECEF coordinates (m)
Definition: Orbit.h:107
OrbitInterpMethod
Orbit interpolation method.
Definition: Orbit.h:20
isce3::core::DateTime midDateTime() const
UTC time of center of orbit.
Definition: Orbit.h:83
CUDA_HOSTDEV constexpr T spacing() const
Sample spacing.
Definition: Linspace.h:76
Data structure to store TimeDelta to double precision seconds.
Definition: TimeDelta.h:16
CUDA counterpart of isce3::core::Orbit.
Definition: Orbit.h:22
double endTime() const
Time of last state vector relative to reference epoch (s)
Definition: Orbit.h:77
isce3::error::ErrorCode interpolate(isce3::core::Vec3 *position, isce3::core::Vec3 *velocity, double t, isce3::core::OrbitInterpBorderMode border_mode=isce3::core::OrbitInterpBorderMode::Error) const
Interpolate platform position and/or velocity.
double spacing() const
Time interval between state vectors (s)
Definition: Orbit.h:89
Third-order Hermite polynomial interpolation.
const isce3::core::Linspace< double > & time() const
Get state vector times relative to reference epoch (s)
Definition: Orbit.h:95
isce3::core::OrbitInterpMethod interpMethod() const
Interpolation method.
Definition: Orbit.h:65
OrbitInterpBorderMode
Mode determining how interpolation outside of orbit domain is handled.
Definition: Orbit.h:26
int size() const
Number of state vectors in orbit.
Definition: Orbit.h:92
double midTime() const
Time of center of orbit relative to reference epoch (s)
Definition: Orbit.h:74
std::vector< isce3::core::StateVector > getStateVectors() const
Export list of state vectors.
double time(int idx) const
Get the specified state vector time relative to reference epoch (s)
Definition: Orbit.h:104
Sequence of platform ephemeris samples (state vectors) with uniform temporal spacing, supporting efficient lookup and interpolation.
Definition: Orbit.h:43
const isce3::core::DateTime & referenceEpoch() const
Reference epoch (UTC)
Definition: Orbit.h:59
isce3::core::DateTime startDateTime() const
UTC time of first state vector.
Definition: Orbit.h:80

Generated for ISCE3.0 by doxygen 1.8.5.