mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 01:24:17 +00:00
pybricks.common.Accelerometer: Use mm/s/s units.
Fixes https://github.com/pybricks/pybricks-api/issues/94 For Move Hub, this is a breaking change since Move Hub IMU support was already released. For the other hubs, the IMU API has not been released yet, so we can do this silently.
This commit is contained in:
@@ -27,6 +27,10 @@ Move Hub
|
||||
|
||||
.. automethod:: pybricks.hubs::MoveHub.imu.acceleration
|
||||
|
||||
.. versionchanged:: 3.2
|
||||
|
||||
Changed acceleration units from m/s/s to mm/s/s.
|
||||
|
||||
.. rubric:: Using the battery
|
||||
|
||||
.. automethod:: pybricks.hubs::MoveHub.battery.voltage
|
||||
|
||||
@@ -118,22 +118,13 @@ linear acceleration: mm/s/s
|
||||
--------------------------------
|
||||
|
||||
Linear acceleration describes how fast the speed changes. This is expressed as
|
||||
the change of the millimeters per second, during one second (deg/s/s).
|
||||
the change of the millimeters per second, during one second (mm/s/s).
|
||||
This is also commonly written as :math:`mm/s^2`.
|
||||
|
||||
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
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@@ -761,7 +761,7 @@ class SimpleAccelerometer:
|
||||
"""Gets the acceleration of the device.
|
||||
|
||||
Returns:
|
||||
tuple of :ref:`linacceleration_m`: Acceleration along all three
|
||||
tuple of :ref:`linacceleration`: Acceleration along all three
|
||||
axes.
|
||||
"""
|
||||
pass
|
||||
@@ -807,7 +807,7 @@ class Accelerometer(SimpleAccelerometer):
|
||||
axis (Axis): Axis along which the acceleration is
|
||||
measured.
|
||||
Returns:
|
||||
:ref:`linacceleration_m`: Acceleration along the
|
||||
:ref:`linacceleration`: Acceleration along the
|
||||
specified axis. If you specify no axis, this returns a vector
|
||||
of accelerations along all axes.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user