Click or drag to resize

CalculatorCalculateState Method

Calculates the state at time dt forward from the initial state.

Namespace:  Demo3D.Visuals.Motor
Assembly:  Demo3D.Core (in Demo3D.Core.dll) Version: 15.0.2.11458
Syntax
C#
public static State CalculateState(
	 in State initial,
	double vd,
	double amax,
	double dmax,
	double smin,
	double smax,
	double dt
)

Parameters

initial
Type: Demo3D.Visuals.MotorState
The initial state.
vd
Type: SystemDouble
The (signed) target velocity.
amax
Type: SystemDouble
The (unsigned) maximum acceleration (0 for infinite).
dmax
Type: SystemDouble
The (unsigned) maximum deceleration (0 for infinite).
smin
Type: SystemDouble
The (signed) minimum position (can be -Inf).
smax
Type: SystemDouble
The (signed) maximum position (can be +Inf).
dt
Type: SystemDouble
The time to step forward.

Return Value

Type: State
The state at time t0 + dt.
Remarks
This function makes the following assumptions, which the parameters must satisfy: 1. The initial time is positive (>= 0). 2. The time-step dt is positive (>= 0). 3. The maximum acceleration amax is finite and positive (>= 0). 4. The maximum deceleration dmax is finite and positive (>= 0). 5. The maximum position limit is greater than or equal to the minimum position limit. Failure to satisfy the assumptions will likely result in garbage being returned.
See Also