Class: KerbalDyn::OrbitalManeuver::BurnEvent
- Inherits:
-
Object
- Object
- KerbalDyn::OrbitalManeuver::BurnEvent
- Defined in:
- lib/kerbaldyn/orbital_maneuver/burn_event.rb
Overview
Encapsulates information about a burn event.
Instance Method Summary collapse
-
#delta_velocity ⇒ Object
(also: #delta_v)
Returns the change in velocity for this maneuver.
-
#epoch_time ⇒ Object
Gives the time of this event in epoch time if epoch was set.
-
#initialize(options = {}) ⇒ BurnEvent
constructor
Create a new burn event.
Methods included from Mixin::ParameterAttributes
Constructor Details
#initialize(options = {}) ⇒ BurnEvent
Create a new burn event.
The following parameters are expected to be given:
- initial_velocity
-
The velocity before the burn.
- final_velocity
-
The velocity after the burn.
- time
-
The time of the burn.
- orbital_radius
-
The orbital radius at the time of the burn.
- mean_anomaly
-
The mean anomaly at the time of the burn.
The following parameters are optional.
- epoch
-
Used to offset the time.
19 20 21 |
# File 'lib/kerbaldyn/orbital_maneuver/burn_event.rb', line 19 def initialize(={}) (, :epoch => 0.0) end |
Instance Method Details
#delta_velocity ⇒ Object Also known as: delta_v
Returns the change in velocity for this maneuver.
Note that the sign may be meaningful to the maneuver. For example, a retrograde burn is usually negative.
45 46 47 |
# File 'lib/kerbaldyn/orbital_maneuver/burn_event.rb', line 45 def delta_velocity return self.final_velocity - self.initial_velocity end |
#epoch_time ⇒ Object
Gives the time of this event in epoch time if epoch was set.
51 52 53 |
# File 'lib/kerbaldyn/orbital_maneuver/burn_event.rb', line 51 def epoch_time return time + epoch end |