From 1f991302e5302d0bcf08f3f521fe60b1fbf0b322 Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Tue, 5 Jan 2021 16:08:11 +0100 Subject: [PATCH] doc/common: fix unit of acceleration --- doc/api/signaltypes.rst | 9 +++++++++ pybricks/_common.py | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/doc/api/signaltypes.rst b/doc/api/signaltypes.rst index ee7c4a2..521bf57 100644 --- a/doc/api/signaltypes.rst +++ b/doc/api/signaltypes.rst @@ -125,6 +125,15 @@ For example, you can adjust the acceleration setting of a :class:`DriveBase <.robotics.DriveBase>` to change how smoothly or how quickly it reaches the constant speed set point. +.. _linacceleration_m: + +linear acceleration: m/s/s +-------------------------------- + +As above, but expressed in meters per second squared: :math:`m/s^2`. +This is a more practical unit for large values such as those given by an +accelerometer. + Approximate and relative units ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/pybricks/_common.py b/pybricks/_common.py index 12be5fc..b499023 100644 --- a/pybricks/_common.py +++ b/pybricks/_common.py @@ -725,7 +725,7 @@ class Accelerometer: axis (Axis): Axis along which the acceleration is measured. Returns: - :ref:`linacceleration`. Returns the acceleration along the + :ref:`linacceleration_m`: Acceleration along the specified axis. If you specify no axis, this returns a vector of accelerations along all axes. """ @@ -811,7 +811,7 @@ class IMU(Accelerometer): axis (Axis): Axis along which the angular velocity is measured. Returns: - :ref:`speed`. Returns the angular velocity along the + :ref:`speed`: Angular velocity along the specified axis. If you specify no axis, this returns a vector of accelerations along all axes. """