@@ -260,3 +260,36 @@ Fahrenheit (°F) or Kelvin (K), you can use the following conversion formulas:
260260hue: deg
261261--------------
262262Hue of a color (0-359 degrees).
263+
264+ .. _robotframe :
265+
266+ Reference frames
267+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
268+
269+ The Pybricks module and this documentation use the following conventions:
270+
271+ - X: Positive means forward. Negative means backward.
272+ - Y: Positive means to the left. Negative means to the right.
273+ - Z: Positive means upward. Negative means downward.
274+
275+ To make sure that all hub measurements (such as acceleration) have the correct
276+ value and sign, you can specify how the hub is mounted in your creation. This
277+ adjust the measurements so that it is easy to see how your *robot * is moving,
278+ rather than how the *hub * is moving.
279+
280+ For example, the hub may be mounted upside down in your design. If you
281+ configure the settings as shown in :numref: `fig_imuexamples `, the hub
282+ measurements will be adjusted accordingly. This way, a positive acceleration
283+ value in the X direction means that your *robot * accelerates forward, even
284+ though the *hub * accelerates backward.
285+
286+ .. _fig_imuexamples :
287+
288+ .. figure :: ../main/diagrams/imuexamples.png
289+ :width: 100 %
290+
291+ How to configure the ``top_side `` and ``front_side `` settings for three
292+ different robot designs. The same technique can be applied to other hubs
293+ and other creations, by noting which way the top and
294+ front :class: `Side <Side>` of the hub are pointing. The example
295+ on the left is the default configuration.
0 commit comments