Class: VORuby::STC::V1_10::STC::CustomSpaceRefFrame

Inherits:
CustomSpaceRefFrameType show all
Includes:
SpaceRefFrame
Defined in:
lib/voruby/stc/1.10/stc.rb

Overview

Coordinate reference frame: a custom pole (positive Z-axis) and positive X-axis direction

Instance Attribute Summary

Attributes inherited from CustomSpaceRefFrameType

#frame, #pole_zaxis, #xaxis

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from CustomSpaceRefFrameType

#==, #initialize

Methods included from SerializableToXml

#element

Methods inherited from SpaceRefFrameType

#==

Constructor Details

This class inherits a constructor from VORuby::STC::V1_10::STC::CustomSpaceRefFrameType

Class Method Details

.element_nameObject



646
# File 'lib/voruby/stc/1.10/stc.rb', line 646

def self.element_name; 'CustomSpaceRefFrame' end

.from_xml(xml) ⇒ Object



652
653
654
655
656
657
658
659
660
661
662
# File 'lib/voruby/stc/1.10/stc.rb', line 652

def self.from_xml(xml)
  root = element_from(xml)
  
  options = {
    :frame => REXML::XPath.first(root, 'x:Frame', {'x' => obj_ns.uri}).text,
    :pole_zaxis => AstroCoords.from_xml(REXML::XPath.first(root, 'x:Pole_Zaxis', {'x' => obj_ns.uri})),
    :xaxis => AstroCoords.from_xml(REXML::XPath.first(root, 'x:Xaxis', {'x' => obj_ns.uri}))
  }
  
  CustomSpaceRefFrame.new(options)
end

Instance Method Details

#to_xmlObject



648
649
650
# File 'lib/voruby/stc/1.10/stc.rb', line 648

def to_xml
  super('CustomSpaceRefFrame')
end