Class: Korba::KeplerEquationFunction
- Inherits:
-
NewtonFunction
- Object
- NewtonFunction
- Korba::KeplerEquationFunction
- Includes:
- OrbitUtils
- Defined in:
- lib/korba/kepler_equation_fucntion.rb
Instance Attribute Summary collapse
-
#eccentricity ⇒ Object
readonly
Returns the value of attribute eccentricity.
-
#mean_anomaly ⇒ Object
readonly
Returns the value of attribute mean_anomaly.
Instance Method Summary collapse
-
#initialize(eccentricity:, mean_anomaly:) ⇒ KeplerEquationFunction
constructor
A new instance of KeplerEquationFunction.
- #values(x) ⇒ Object
Methods included from OrbitUtils
#deg_to_rad, #distance, #eccentric_anomaly, #height_at_apogee, #height_at_perigee, #normalize_deg, #normalize_rad, #path_angle, #rad_to_deg, #semi_major_axis, #true_anomaly, #velocity
Methods inherited from NewtonFunction
Constructor Details
#initialize(eccentricity:, mean_anomaly:) ⇒ KeplerEquationFunction
Returns a new instance of KeplerEquationFunction.
10 11 12 13 14 |
# File 'lib/korba/kepler_equation_fucntion.rb', line 10 def initialize(eccentricity:, mean_anomaly:) super() @eccentricity = eccentricity @mean_anomaly = mean_anomaly end |
Instance Attribute Details
#eccentricity ⇒ Object (readonly)
Returns the value of attribute eccentricity.
8 9 10 |
# File 'lib/korba/kepler_equation_fucntion.rb', line 8 def eccentricity @eccentricity end |
#mean_anomaly ⇒ Object (readonly)
Returns the value of attribute mean_anomaly.
8 9 10 |
# File 'lib/korba/kepler_equation_fucntion.rb', line 8 def mean_anomaly @mean_anomaly end |
Instance Method Details
#values(x) ⇒ Object
16 17 18 |
# File 'lib/korba/kepler_equation_fucntion.rb', line 16 def values(x) [x[0] - eccentricity * Math.sin(x[0]) - deg_to_rad(mean_anomaly)] end |