Interface PerceivedObject.Kinematics
- All Known Implementing Classes:
PerceivedObject.Kinematics.Record
- Enclosing interface:
- PerceivedObject
public static interface PerceivedObject.Kinematics
Information on the kinematics of the perceived object.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceDescription of overlap information.static final recordRecord storing kinematics information. -
Method Summary
Modifier and TypeMethodDescriptionstatic PerceivedObject.KinematicsdynamicAhead(Length distance, Speed objectSpeed, Acceleration objectAcceleration, boolean facingSameDirection, Length objectLength, Length referenceLength) Return kinematics for a dynamic object ahead.static PerceivedObject.KinematicsdynamicBehind(Length distance, Speed objectSpeed, Acceleration objectAcceleration, boolean facingSameDirection, Length objectLength, Length referenceLength) Return kinematics for a dynamic object behind.Returns acceleration.Retrieve the strongly typed distance to the other object.Returns information on the overlap for parallel objects.getSpeed()Returns speed.booleanReturns whether the object is facing the same direction.static PerceivedObject.KinematicsstaticAhead(Length distance) Return kinematics for a static object at given distance ahead.static PerceivedObject.KinematicsstaticBehind(Length distance) Return kinematics for a static object at given distance behind.
-
Method Details
-
getDistance
Length getDistance()Retrieve the strongly typed distance to the other object.- Returns:
- the distance to the object
-
getSpeed
Speed getSpeed()Returns speed.- Returns:
- the (perceived) speed of the other object
-
getAcceleration
Acceleration getAcceleration()Returns acceleration.- Returns:
- the (perceived) acceleration of the other object
-
isFacingSameDirection
boolean isFacingSameDirection()Returns whether the object is facing the same direction.- Returns:
- whether the object is facing the same direction
-
getOverlap
PerceivedObject.Kinematics.Overlap getOverlap()Returns information on the overlap for parallel objects. For objects fully ahead or behind that fact is provided, withnulloverlap values.- Returns:
- information on the overlap for parallel objects
-
staticAhead
Return kinematics for a static object at given distance ahead. Overlap is considered non-existent. The object is considered to face the same direction, which might not mean much for a static object.- Parameters:
distance- distance to object- Returns:
- kinematics for a static object at given distance
-
staticBehind
Return kinematics for a static object at given distance behind. Overlap is considered non-existent. The object is considered to face the same direction, which might not mean much for a static object.- Parameters:
distance- distance to object- Returns:
- kinematics for a static object at given distance
-
dynamicAhead
static PerceivedObject.Kinematics dynamicAhead(Length distance, Speed objectSpeed, Acceleration objectAcceleration, boolean facingSameDirection, Length objectLength, Length referenceLength) Return kinematics for a dynamic object ahead. The distance may be negative up to an absolute value equal to the object length plus the ego length.- Parameters:
distance- distance from ego front to object rear (or front when not facing the same direction)objectSpeed- speed of perceived objectobjectAcceleration- acceleration of perceived objectfacingSameDirection- whether the object is facing the same directionobjectLength- object lengthreferenceLength- length of reference object, usually the perceiving GTU- Returns:
- kinematic for a dynamic object
- Throws:
IllegalArgumentException- when the distance beyond the extent of object length plus reference length
-
dynamicBehind
static PerceivedObject.Kinematics dynamicBehind(Length distance, Speed objectSpeed, Acceleration objectAcceleration, boolean facingSameDirection, Length objectLength, Length referenceLength) Return kinematics for a dynamic object behind. The distance may be negative up to an absolute value equal to the object length plus the ego length.- Parameters:
distance- distance from ego front to object rear (or front when not facing the same direction)objectSpeed- speed of perceived objectobjectAcceleration- acceleration of perceived objectfacingSameDirection- whether the object is facing the same directionobjectLength- object lengthreferenceLength- length of reference object, usually the perceiving GTU- Returns:
- kinematic for a dynamic object
- Throws:
IllegalArgumentException- when the distance beyond the extent of object length plus reference length
-