Class: KerbalDyn::OrbitalManeuver::Bielliptic
- Defined in:
- lib/kerbaldyn/orbital_maneuver/bielliptic.rb
Instance Attribute Summary collapse
-
#transfer_radius ⇒ Object
readonly
Returns the value of attribute transfer_radius.
Attributes inherited from Base
Instance Method Summary collapse
- #burn_events ⇒ Object
- #final_transfer_orbit ⇒ Object
- #initial_transfer_orbit ⇒ Object
-
#initialize(initial_orbit, final_orbit, options = {}) ⇒ Bielliptic
constructor
A special 3-burn orbital maneuver between two circular orbits through the transfer_radius options.
- #orbits ⇒ Object
Methods inherited from Base
#delta_mean_anomaly, #delta_t, #delta_time, #delta_velocities, #delta_velocity, #mean_anomalies, #mean_lead_angle, #mean_lead_time, #moving_to_higher_orbit?, #orbital_radii, #relative_anomaly_delta, #times, #velocities
Methods included from Mixin::ParameterAttributes
Constructor Details
#initialize(initial_orbit, final_orbit, options = {}) ⇒ Bielliptic
A special 3-burn orbital maneuver between two circular orbits through the transfer_radius options.
Note that all orbits are circularized before being used.
The first burn moves from the initial orbit to the transfer radius, the second burn (at the transfer radius) moves the periapsis of the transfer orbit to the final orbit. The thrid burn circularizes to the final orbit.
14 15 16 17 |
# File 'lib/kerbaldyn/orbital_maneuver/bielliptic.rb', line 14 def initialize(initial_orbit, final_orbit, ={}) = {:transfer_radius => final_orbit.semimajor_axis}.merge() super(initial_orbit.circularize, final_orbit.circularize, ) end |
Instance Attribute Details
#transfer_radius ⇒ Object
Returns the value of attribute transfer_radius.
19 20 21 |
# File 'lib/kerbaldyn/orbital_maneuver/bielliptic.rb', line 19 def transfer_radius @transfer_radius end |
Instance Method Details
#burn_events ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/kerbaldyn/orbital_maneuver/bielliptic.rb', line 38 def burn_events r1 = self.initial_orbit.periapsis r2 = self.final_orbit.periapsis rt = self.transfer_radius ito = self.initial_transfer_orbit v11, v12 = (rt >= r1) ? [ito.periapsis_velocity, ito.apoapsis_velocity] : [ito.apoapsis_velocity, ito.periapsis_velocity] fto = self.final_transfer_orbit v21, v22 = (rt < r2) ? [fto.periapsis_velocity, fto.apoapsis_velocity] : [fto.apoapsis_velocity, fto.periapsis_velocity] t1 = self.initial_transfer_orbit.period / 2.0 t2 = self.final_transfer_orbit.period / 2.0 return [ BurnEvent.new(:initial_velocity => self.initial_orbit.mean_velocity, :final_velocity => v11, :time => 0.0, :orbital_radius => self.initial_orbit.semimajor_axis, :mean_anomaly => 0.0), BurnEvent.new(:initial_velocity => v12, :final_velocity => v21, :time => t1, :orbital_radius => self.transfer_radius, :mean_anomaly => Math::PI), BurnEvent.new(:initial_velocity => v22, :final_velocity => self.final_orbit.mean_velocity, :time => t1+t2, :mean_anomaly => 2.0 * Math::PI) ] end |
#final_transfer_orbit ⇒ Object
28 29 30 31 32 |
# File 'lib/kerbaldyn/orbital_maneuver/bielliptic.rb', line 28 def final_transfer_orbit r2 = self.final_orbit.periapsis rt = self.transfer_radius return Orbit.new(self.initial_orbit.primary_body, :periapsis => [r2,rt].min, :apoapsis => [r2,rt].max) end |
#initial_transfer_orbit ⇒ Object
22 23 24 25 26 |
# File 'lib/kerbaldyn/orbital_maneuver/bielliptic.rb', line 22 def initial_transfer_orbit r1 = self.initial_orbit.periapsis rt = self.transfer_radius return Orbit.new(self.initial_orbit.primary_body, :periapsis => [r1,rt].min, :apoapsis => [r1,rt].max) end |
#orbits ⇒ Object
34 35 36 |
# File 'lib/kerbaldyn/orbital_maneuver/bielliptic.rb', line 34 def orbits return [self.initial_orbit, self.initial_transfer_orbit, self.final_transfer_orbit.second, self.final_orbit] end |