smarts.core.utils.kinematics module

smarts.core.utils.kinematics.distance_covered(time: float, speed: float, acc: float = 0.0) float[source]

Returns the amount of distance covered by an object moving at speed and accelerating with acc. Assumes that all units are consistent (for example, if distance is in meters, speed is in m/s).

smarts.core.utils.kinematics.stopping_distance(start_speed: float, deceleration: float) float[source]

Returns the distance it would take to stop from initial speed start_speed by decelerating at a constant rate of deceleration. Note that deceleration should be a non-negative value (not a negative acceleration).

smarts.core.utils.kinematics.stopping_time(start_speed: float, deceleration: float) float[source]

Returns the time it would take to stop from initial speed start_speed by decelerating at a constant rate of deceleration. Note that deceleration should be a non-negative value (not a negative acceleration).

smarts.core.utils.kinematics.time_to_cover(dist: float, speed: float, acc: float = 0.0) float[source]

Returns the time for a moving object traveling at speed and accelerating at acc to cover distance dist. Assumes that all units are consistent (for example, if distance is in meters, speed is in m/s). The returned value will be non-negative (but may be math.inf under some circumstances).