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(org.djunits.value.vdouble.scalar.Length distance, org.djunits.value.vdouble.scalar.Speed objectSpeed, org.djunits.value.vdouble.scalar.Acceleration objectAcceleration, boolean facingSameDirection, org.djunits.value.vdouble.scalar.Length objectLength, org.djunits.value.vdouble.scalar.Length referenceLength) Return kinematics for a dynamic object ahead.static PerceivedObject.KinematicsdynamicBehind(org.djunits.value.vdouble.scalar.Length distance, org.djunits.value.vdouble.scalar.Speed objectSpeed, org.djunits.value.vdouble.scalar.Acceleration objectAcceleration, boolean facingSameDirection, org.djunits.value.vdouble.scalar.Length objectLength, org.djunits.value.vdouble.scalar.Length referenceLength) Return kinematics for a dynamic object behind.org.djunits.value.vdouble.scalar.AccelerationReturns acceleration.org.djunits.value.vdouble.scalar.LengthRetrieve the strongly typed distance to the other object.Returns information on the overlap for parallel objects.org.djunits.value.vdouble.scalar.SpeedgetSpeed()Returns speed.booleanReturns whether the object is facing the same direction.static PerceivedObject.KinematicsstaticAhead(org.djunits.value.vdouble.scalar.Length distance) Return kinematics for a static object at given distance ahead.static PerceivedObject.KinematicsstaticBehind(org.djunits.value.vdouble.scalar.Length distance) Return kinematics for a static object at given distance behind.
-
Method Details
-
getDistance
org.djunits.value.vdouble.scalar.Length getDistance()Retrieve the strongly typed distance to the other object.- Returns:
- the distance to the object
-
getSpeed
org.djunits.value.vdouble.scalar.Speed getSpeed()Returns speed.- Returns:
- the (perceived) speed of the other object
-
getAcceleration
org.djunits.value.vdouble.scalar.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(org.djunits.value.vdouble.scalar.Length distance, org.djunits.value.vdouble.scalar.Speed objectSpeed, org.djunits.value.vdouble.scalar.Acceleration objectAcceleration, boolean facingSameDirection, org.djunits.value.vdouble.scalar.Length objectLength, org.djunits.value.vdouble.scalar.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(org.djunits.value.vdouble.scalar.Length distance, org.djunits.value.vdouble.scalar.Speed objectSpeed, org.djunits.value.vdouble.scalar.Acceleration objectAcceleration, boolean facingSameDirection, org.djunits.value.vdouble.scalar.Length objectLength, org.djunits.value.vdouble.scalar.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
-