public final class KinematicsCalculations
extends java.lang.Object
Constructor and Description |
---|
KinematicsCalculations() |
Modifier and Type | Method and Description |
---|---|
static Movement |
configureMovement(Movement movement,
double totalDistance,
double initialSpeed,
double maxSpeed,
double acc,
double dec)
Configures the Movement object of an object's movement based on the track, the initial speed, the maximum speed, the acceleration and the
deceleration of the object.
|
static Movement |
configureMovement(Movement movement,
double totalDistance,
double initialSpeed,
double maxSpeed,
double acc,
double dec,
TimeSpan totalSimDuration)
Configures the Movement object based on the track length, the start speed, the maximum speed, the acceleration,
the deceleration and a given total duration.
|
static Movement |
configureMovement(Movement movement,
double totalDistance,
double initialSpeed,
double acc,
double dec,
TimeSpan totalSimDuration)
Configures the Movement object based on the track length, the start speed, the acceleration,
the deceleration and a given total duration.
|
static double |
getAcceleration(double initialSpeed,
double endSpeed,
TimeSpan duration)
Gets the acceleration value based on the initial, the end speed and the acceleration duration.
|
static double |
getCurrentSpeed(Movement movement,
TimeInstant movingStartTime,
TimeInstant now)
Gets the current speed based on the elapsed time and the movement object.
|
static double |
getDistanceOfSpeedBoundedAcceleration(double initialSpeed,
double endSpeed,
double acc)
Gets the distance of the acceleration or deceleration from an initial speed to an end speed with a given acceleration or
deceleration value.
|
static double |
getDistanceOfTimedAcceleration(double duration,
double initialSpeed,
double acc)
Gets the distance moved based on the acceleration and the duration.
|
static double |
getDurationOfDistanceBoundedMovement(double distance,
double initialSpeed,
double endSpeed)
Gets the duration of a simple movement based of its moving distance, initial speed and the end speed.
|
static double |
getDurationOfSpeedBoundedAcceleration(double initialSpeed,
double endSpeed,
double acc)
Gets the duration of the acceleration or the deceleration from an initial speed to a end speed with a given acceleration
or deceleration value.
|
static double |
getMaxAcceleratedSpeed(double distance,
double initialSpeed,
double endSpeed,
double acc,
double dec)
Gets the maximum speed if the movement only consist of an acceleration from a start speed followed by a deceleration
to the end speed for a certain distance.
|
static double |
getSpeedOfDistanceBoundedAcceleration(double distance,
double initialSpeed,
double acc)
Gets the speed based on the acceleration, initial speed and the moved distance.
|
static double |
getSpeedOfTimedAcceleration(double duration,
double initialSpeed,
double acc)
Gets the speed based on the acceleration and the duration.
|
public static Movement configureMovement(Movement movement, double totalDistance, double initialSpeed, double maxSpeed, double acc, double dec, TimeSpan totalSimDuration)
movement
- The movement to be configured.totalDistance
- The total length for the movement.initialSpeed
- The initial speed.maxSpeed
- The maximum speed.acc
- The acceleration.dec
- The deceleration.totalSimDuration
- The given duration in SimTime.public static Movement configureMovement(Movement movement, double totalDistance, double initialSpeed, double acc, double dec, TimeSpan totalSimDuration)
movement
- The movement to be configured.totalDistance
- The total length for the movement.initialSpeed
- The initial speed.acc
- The acceleration.dec
- The deceleration.totalSimDuration
- The given duration in SimTime.public static Movement configureMovement(Movement movement, double totalDistance, double initialSpeed, double maxSpeed, double acc, double dec)
movement
- The movement to be configured.totalDistance
- The total length of the movement.initialSpeed
- The initial Speed.maxSpeed
- The maximum speed of the moving object.acc
- The acceleration of the moving object.dec
- The deceleration of the moving object. It's normally a negative value.public static double getAcceleration(double initialSpeed, double endSpeed, TimeSpan duration)
initialSpeed
- The initial speed.endSpeed
- The end speed.duration
- The duration of the acceleration.public static double getCurrentSpeed(Movement movement, TimeInstant movingStartTime, TimeInstant now)
movement
- The movement within the current speed should be calculated.movingStartTime
- The SimTime, when the movement has started.now
- The current SimTime.public static double getDistanceOfSpeedBoundedAcceleration(double initialSpeed, double endSpeed, double acc)
initialSpeed
- The initial speed.endSpeed
- The end speed.acc
- The acceleration or deceleration.public static double getDistanceOfTimedAcceleration(double duration, double initialSpeed, double acc)
duration
- The duration of the movement.initialSpeed
- The speed offset.acc
- The acceleration.public static double getDurationOfDistanceBoundedMovement(double distance, double initialSpeed, double endSpeed)
distance
- The distance of the movement.initialSpeed
- The initial speed.endSpeed
- The end speed.public static double getDurationOfSpeedBoundedAcceleration(double initialSpeed, double endSpeed, double acc)
initialSpeed
- The initial speed.endSpeed
- The end speed.acc
- the acceleration or deceleration value.public static double getMaxAcceleratedSpeed(double distance, double initialSpeed, double endSpeed, double acc, double dec)
distance
- The total distance of the movement.initialSpeed
- The start speed.endSpeed
- The end speed.acc
- The acceleration.dec
- The deceleration. Normally a negative value.public static double getSpeedOfDistanceBoundedAcceleration(double distance, double initialSpeed, double acc)
distance
- The distance which the movement shouldn't exceed.initialSpeed
- The initial speed.acc
- The accelerationpublic static double getSpeedOfTimedAcceleration(double duration, double initialSpeed, double acc)
duration
- The duration of the movement.initialSpeed
- The speed offset.acc
- The acceleration.