Class: Ephem::Segments::OrientationGroup
- Inherits:
-
SegmentGroup
- Object
- SegmentGroup
- Ephem::Segments::OrientationGroup
- Includes:
- OrientationSource
- Defined in:
- lib/ephem/segments/orientation_group.rb
Overview
The orientation segments for one PCK body frame. Routes each query to the segment covering the requested time. Returned by PCK#[].
Instance Attribute Summary
Attributes inherited from SegmentGroup
Instance Method Summary collapse
-
#angles_at(tdb, tdb2 = 0.0) ⇒ Core::Orientation+
Euler angles at the given time, without rates.
-
#body ⇒ Integer
NAIF frame ID of the oriented body frame.
-
#matrix_at(tdb, tdb2 = 0.0) ⇒ Array<Array<Float>>+
The reference-frame to body-fixed rotation matrix at the given time.
-
#orientation_at(tdb, tdb2 = 0.0) ⇒ Core::Orientation+
Euler angles and their rates at the given time.
-
#reference_frame ⇒ Integer
NAIF ID of the inertial reference frame.
Methods included from OrientationSource
#compute, #compute_and_differentiate
Methods inherited from SegmentGroup
#clear_data, #initialize, #to_s, wrap
Constructor Details
This class inherits a constructor from Ephem::Segments::SegmentGroup
Instance Method Details
#angles_at(tdb, tdb2 = 0.0) ⇒ Core::Orientation+
Euler angles at the given time, without rates. See Ephem::Segments::OrientationSegment#angles_at.
28 29 30 31 32 |
# File 'lib/ephem/segments/orientation_group.rb', line 28 def angles_at(tdb, tdb2 = 0.0) query(tdb, tdb2) do |segment, time, fraction| segment.angles_at(time, fraction) end end |
#body ⇒ Integer
Returns NAIF frame ID of the oriented body frame.
13 14 15 |
# File 'lib/ephem/segments/orientation_group.rb', line 13 def body @segments.first.body end |
#matrix_at(tdb, tdb2 = 0.0) ⇒ Array<Array<Float>>+
The reference-frame to body-fixed rotation matrix at the given time. See Ephem::Segments::OrientationSegment#matrix_at.
52 53 54 55 56 |
# File 'lib/ephem/segments/orientation_group.rb', line 52 def matrix_at(tdb, tdb2 = 0.0) query(tdb, tdb2) do |segment, time, fraction| segment.matrix_at(time, fraction) end end |
#orientation_at(tdb, tdb2 = 0.0) ⇒ Core::Orientation+
Euler angles and their rates at the given time. See Ephem::Segments::OrientationSegment#orientation_at.
40 41 42 43 44 |
# File 'lib/ephem/segments/orientation_group.rb', line 40 def orientation_at(tdb, tdb2 = 0.0) query(tdb, tdb2) do |segment, time, fraction| segment.orientation_at(time, fraction) end end |
#reference_frame ⇒ Integer
Returns NAIF ID of the inertial reference frame.
18 19 20 |
# File 'lib/ephem/segments/orientation_group.rb', line 18 def reference_frame @segments.first.reference_frame end |