diff --git a/doc/common/conf.py b/doc/common/conf.py index f121b60..099d86a 100644 --- a/doc/common/conf.py +++ b/doc/common/conf.py @@ -314,10 +314,10 @@ def on_missing_reference(app, env, node, contnode): for unit in [ "deg", "deg/s", - "deg/s/s", + "deg/s²", "mm", "mm/s", - "mm/s/s", + "mm/s²", "%", "mV", "mA", diff --git a/doc/main/hubs/movehub.rst b/doc/main/hubs/movehub.rst index 070afe7..6e6287e 100644 --- a/doc/main/hubs/movehub.rst +++ b/doc/main/hubs/movehub.rst @@ -29,7 +29,7 @@ Move Hub .. versionchanged:: 3.2 - Changed acceleration units from m/s/s to mm/s/s. + Changed acceleration units from m/s² to mm/s². .. rubric:: Using the battery diff --git a/doc/main/signaltypes.rst b/doc/main/signaltypes.rst index 1858949..3a2df76 100644 --- a/doc/main/signaltypes.rst +++ b/doc/main/signaltypes.rst @@ -76,12 +76,12 @@ use the following table to convert between commonly used units. .. _acceleration: -rotational acceleration: deg/s/s +rotational acceleration: deg/s² -------------------------------- Rotational acceleration, or *angular acceleration* describes how fast the rotational speed changes. This is expressed as the change of the number of -degrees per second, during one second (deg/s/s). This is also commonly written +degrees per second, during one second (deg/s²). This is also commonly written as :math:`deg/s^2`. For example, you can adjust the rotational acceleration setting of a ``Motor`` @@ -134,11 +134,11 @@ For example, the speed of a robotic vehicle is expressed in mm/s. .. _linacceleration: -linear acceleration: mm/s/s +linear acceleration: mm/s² -------------------------------- Linear acceleration describes how fast the speed changes. This is expressed as -the change of the millimeters per second, during one second (mm/s/s). +the change of the millimeters per second, during one second (mm/s²). This is also commonly written as :math:`mm/s^2`. For example, you can adjust the acceleration setting of a diff --git a/src/pybricks/_common.py b/src/pybricks/_common.py index 66d0f03..165333a 100644 --- a/src/pybricks/_common.py +++ b/src/pybricks/_common.py @@ -170,7 +170,7 @@ class Control: Arguments: speed (Number, deg/s or Number, mm/s): Maximum speed. All speed commands will be capped to this value. - acceleration (Number, deg/s/s or Number, mm/s/s): + acceleration (Number, deg/s² or Number, mm/s²): Slope of the speed curve when accelerating or decelerating. Use a tuple to set acceleration and deceleration separately. If one value is given, it is used for both. @@ -869,7 +869,7 @@ class SimpleAccelerometer: """Get measurements from an accelerometer.""" def acceleration(self) -> Tuple[int, int, int]: - """acceleration() -> Tuple[int, int, int]: mm/s/s + """acceleration() -> Tuple[int, int, int]: mm/s² Gets the acceleration of the device. @@ -903,8 +903,8 @@ class Accelerometer(SimpleAccelerometer): def acceleration(self, *args): """ - acceleration(axis) -> float: mm/s/s - acceleration() -> vector: mm/s/s + acceleration(axis) -> float: mm/s² + acceleration() -> vector: mm/s² Gets the acceleration of the device along a given axis in the