Class RK4

Inheritance Relationships

Base Type

Class Documentation

class RK4 : public lupnt::Integrator

Classical 4th-order Runge-Kutta (RK4) fixed-step integrator.

default_integrator for NumericalOrbitDynamics and other numerical dynamics models; a simple, computationally cheap fixed-step method appropriate when dt is small relative to the dynamics’ time scales.

Public Functions

virtual State Step(const ODE &f, Real t, const State &x, Real dt)

One step of classical 4th-order Runge-Kutta integration: evaluates f at 4 stages spanning [t, t+dt] and averages the resulting derivatives.

One step of Runge-Kutta Integration.

Parameters:
  • f – Right-hand side dx/dt = f(t, x)

  • t – Current time [s]

  • x – Current state

  • dt – Step size [s]

  • f – The ODE function to propagate

  • tTime

  • x – The state to propagate

  • dt – Timestep

Returns:

State after stepping by dt