javax.robotics.ode
Class RungeKutta4th2
java.lang.Object
javax.robotics.ode.Euler2
javax.robotics.ode.RungeKutta4th2
All Implemented Interfaces: DerivableFunction2 , Solver2
public class RungeKutta4th2 extends Euler2
This class implements forward RungeKutta4th integration method for systems of
two first order differential equations.
x''=f(x, x') with x(0)=x0 , x'(0)= y0 , is equivalent to system of two first order of differential equation:
y' = f(x, y)
x' = y
with x(0)=x0 , y(0)= y0
Since:
1.0.3
Version:
09/11/2005
Author:
Carmine Lia
Constructor Summary
RungeKutta4th2 (double dt,
RVector initialConditionPosition,
RVector initialConditionVelocity)
Defines RungeKutta4th numerical integration for x'' = f(x, x') as system
of two first order differential equation.
RungeKutta4th2 (double dt,
RVector initialConditionPosition,
RVector initialConditionVelocity,
DerivableFunction2 target)
Defines RungeKutta4th numerical integration for x'' = f(x, x') as system
of two first order differential equation.
Method Summary
void
step (RVector position,
RVector velocity)
Computes step integration from time t to t+dt of x'' = f(x, x').
Methods inherited from class javax.robotics.ode.Euler2
getInitialConditionPosition , getInitialConditionVelocity , getLastValuePosition , getLastValueVelocity , getSampleTime , getTime , resetTime , setInitialConditionPosition , setInitialConditionVelocity , setSampleTime , setTargetFunction , xDot2
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
RungeKutta4th2
public RungeKutta4th2 (double dt,
RVector initialConditionPosition,
RVector initialConditionVelocity)
Defines RungeKutta4th numerical integration for x'' = f(x, x') as system
of two first order differential equation.
Parameters: dt
- time interval of integration [sec]initialConditionPosition
- position at time zero x(0).initialConditionVelocity
- velocity at time zero x'(0).
RungeKutta4th2
public RungeKutta4th2 (double dt,
RVector initialConditionPosition,
RVector initialConditionVelocity,
DerivableFunction2 target)
Defines RungeKutta4th numerical integration for x'' = f(x, x') as system
of two first order differential equation.
Parameters: dt
- time interval of integration [sec]initialConditionPosition
- position at time zero x(0).initialConditionVelocity
- velocity at time zero x'(0).target
- differential equation to be integrated
step
public void step (RVector position,
RVector velocity)
Description copied from interface: Solver2
Computes step integration from time t to t+dt of x'' = f(x, x').
The params last value position and velocity are modified.
Specified by: step
in interface Solver2
Overrides: step
in class Euler2
Parameters: position
- x argument of f(x, x')velocity
- x' argument of f(x, x')