Class: Ephem::Segments::OrientationGroup

Inherits:
SegmentGroup show all
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#[].

See Also:

Instance Attribute Summary

Attributes inherited from SegmentGroup

#segments

Instance Method Summary collapse

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.

Parameters:

  • tdb (Numeric, Array<Numeric>)

    Time(s) in TDB Julian Date

  • tdb2 (Numeric) (defaults to: 0.0)

    Optional fractional part of TDB date

Returns:



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

#bodyInteger

Returns NAIF frame ID of the oriented body frame.

Returns:

  • (Integer)

    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.

Parameters:

  • tdb (Numeric, Array<Numeric>)

    Time(s) in TDB Julian Date

  • tdb2 (Numeric) (defaults to: 0.0)

    Optional fractional part of TDB date

Returns:

  • (Array<Array<Float>>, Array<Array<Array<Float>>>)


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.

Parameters:

  • tdb (Numeric, Array<Numeric>)

    Time(s) in TDB Julian Date

  • tdb2 (Numeric) (defaults to: 0.0)

    Optional fractional part of TDB date

Returns:



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_frameInteger

Returns NAIF ID of the inertial reference frame.

Returns:

  • (Integer)

    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