|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.robotics.ode.Euler2
public class Euler2
This class implements forward Euler 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
Field Summary |
---|
Fields inherited from interface javax.robotics.ode.Solver2 |
---|
startTime |
Constructor Summary | |
---|---|
Euler2(double dt,
RVector initialConditionPosition,
RVector initialConditionVelocity)
Defines numerical integration for x'' = f(x, x') as system of two first order differential equation. |
|
Euler2(double dt,
RVector initialConditionPosition,
RVector initialConditionVelocity,
DerivableFunction2 target)
Defines numerical integration for x'' = f(x, x') as system of two first order differential equation. |
Method Summary | |
---|---|
RVector |
getInitialConditionPosition()
Gets the initial condition for position x(0). |
RVector |
getInitialConditionVelocity()
Gets the initial condition for velocity x'(0). |
RVector |
getLastValuePosition()
Gets the current value of position x computed by step function. |
RVector |
getLastValueVelocity()
Gets the current value of velocity x'computed by step function. |
double |
getSampleTime()
Gets the interval of integration. |
double |
getTime()
Gets current time of integration. |
void |
resetTime()
Sets the current time to zero. |
void |
setInitialConditionPosition(RVector initialCondition)
Sets the initial condition for position x(0) = x0. |
void |
setInitialConditionVelocity(RVector initialCondition)
Sets the initial condition for velocity x'(0) = y0. |
void |
setSampleTime(double dt)
Sets the interval of integration. |
void |
setTargetFunction(DerivableFunction2 target)
Sets the target function to be integrated |
void |
step(RVector position,
RVector velocity)
Computes step integration from time t to t+dt of x'' = f(x, x'). |
RVector |
xDot2(RVector x,
RVector y)
Second order function x'' = f(x, x'). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Euler2(double dt, RVector initialConditionPosition, RVector initialConditionVelocity)
dt
- time interval of integration [sec]initialConditionPosition
- position at time zero x(0).initialConditionVelocity
- velocity at time zero x'(0).public Euler2(double dt, RVector initialConditionPosition, RVector initialConditionVelocity, DerivableFunction2 target)
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 integratedMethod Detail |
---|
public final void setSampleTime(double dt)
Solver2
setSampleTime
in interface Solver2
dt
- interval [sec]public final double getSampleTime()
Solver2
getSampleTime
in interface Solver2
public final void setInitialConditionPosition(RVector initialCondition)
Solver2
setInitialConditionPosition
in interface Solver2
public final void setInitialConditionVelocity(RVector initialCondition)
Solver2
setInitialConditionVelocity
in interface Solver2
public final RVector getInitialConditionPosition()
Solver2
getInitialConditionPosition
in interface Solver2
public final RVector getInitialConditionVelocity()
Solver2
getInitialConditionVelocity
in interface Solver2
public final RVector getLastValuePosition()
Solver2
step
function.
getLastValuePosition
in interface Solver2
public final RVector getLastValueVelocity()
Solver2
step
function.
getLastValueVelocity
in interface Solver2
public final double getTime()
Solver2
getTime
in interface Solver2
public final void resetTime()
Solver2
resetTime
in interface Solver2
public void setTargetFunction(DerivableFunction2 target)
Solver2
setTargetFunction
in interface Solver2
target
- the function.public void step(RVector position, RVector velocity)
Solver2
step
in interface Solver2
position
- x argument of f(x, x')velocity
- x' argument of f(x, x')public RVector xDot2(RVector x, RVector y)
DerivableFunction2
xDot2
in interface DerivableFunction2
x
- first indipendent variable (position)y
- second indipendent variable (velocity).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |