> For the complete documentation index, see [llms.txt](https://vrs-guidebook-2nd-edition.gitbook.io/vrs-guidebook-2nd-edition/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vrs-guidebook-2nd-edition.gitbook.io/vrs-guidebook-2nd-edition/programming/blocks/utilities/velocity.md).

# Velocity

Velocity describes the rate at which the robot's position changes over time, including both its speed and direction of motion. It's a crucial concept for understanding and controlling the robot's movement during matches. The blocks in this section allow you to create velocity objects, change distance units, and obtain information from these objects.

**DistanceUnit**

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXdNIM7sd713O0uedaJHGtCPIAJAsbYPTHarVBBsYe8aMP5UZN-_3Lb_bNxzcTilv5YmeTdkZIzsRPmCbXIAjNpQXPXNxUgSb-JlBvNbkmnp4dyM1RCcY-67FBnaiRpmnZ6_1ZzuUsehm3-oNMe46so5NUaZ?key=hRw9bBhBfp1lHBJ7rUAI2Q)

Returns the distance unit used in the velocity object. Values can be CM, INCH, METER, MM.

**XVeloc**

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeJOJvQNOC2t1cquuZAQbmSp4MgIx3524dRiDFnhJJljOsVGXf_hT0TdZ-mb5Cshp9iNLq5ZmxUf28zGmqPh25GS3oQSFmnoaVna2wt4ZGSrkoyRso0ursAwqyVVFMk52nz6xZP06kW31guuz2esT-SQY2o?key=hRw9bBhBfp1lHBJ7rUAI2Q)

Returns the X attribute of a given velocity object.

**YVeloc**

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXdKWzti0okAfmN9H2F2kAYs-0ozOSm9baTIMT3IpWvc7CTlb1EXfR-vxv73JZ8S-YYkBzhv_qvT2E1lg3yx625ZDVtDOUKNm_Nw7pVXCWOXw_qXsb79mOatsiss4jhjrssabzlhOGSHEqGqXGrAov292jvT?key=hRw9bBhBfp1lHBJ7rUAI2Q)

Returns the Y attribute of a given velocity object.

**ZVeloc**

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXd91Q9DdBstCBZRo8eB2pIMNJZgJFDEFTqVeW-nYoIq5XrWRkecZGq3Kq2wBxS2Y1i7tZQ4F_IzLbuFViZx4g76UW9RfT3m-FrMhEKW695CLbW3oJWVdqAcDPWQVB66ul3e5pCV08BpTEJBaSmyGKBSBJg?key=hRw9bBhBfp1lHBJ7rUAI2Q)

Returns the Z attribute of a given velocity object.

**AcquisitionTime**

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXfv9LbMtasmWKZhbIaiIAXJo3GJN2iB0P9a9EWuePqUudlegC9BXbSWHvg6HazdDUqKFELdpcbZ3dGMwGXHqQ306aKKddwDpk9n_E0JVZTig18xMeNoPIkOO4aJfli8CBjhmCZt9mPSCPDvH6hkpOypoksz?key=hRw9bBhBfp1lHBJ7rUAI2Q)

Returns the acquisition time of a given velocity object.

**toDistanceUnit**

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXfxnIVWsPe-RP1yhag1G--JR9-YafgDepQlFojiR8YN2SeXbOCnWRZaPh0UQhiCrHBiYtCWzd203_tQSvfcsuWSgO7d8i3JT2VG9ULr1Lfwxh1GKBzJmrEFphaqT-RQzFezluu4guy27UKrMRQv16E_HKQ?key=hRw9bBhBfp1lHBJ7rUAI2Q)

Returns a velocity object based on the given velocity object after converting to the indicated units.

**toText**

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXfapfwLRDs_wwCTiRUE5NlZ-jUINdRU1ViXfDlB5FEHNhI69EiCyYnmZG0NsvynsiIRGPrqTdgovPYSJe1fs8TJcMyWHRTtRW3ewBQP8GILhNyX_vtdhgCGoIwnssG437yUpzDZzYcOfDyQkOvwplGUgmYv?key=hRw9bBhBfp1lHBJ7rUAI2Q)

Returns the velocity attributes of the velocity object as a formatted string. The format of the string is “Velocity: (X Y Z)units/s” where X, Y, and Z are the attributes of the velocity in the indicated units per second. For example, when X=1.2cm/s, Y=3.4 cm/s, and Z=5.6 cm/s, the string is “(1.200 3.400 5.600)cm/s”.

**new Velocity**

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXe_Y6E6dQZbAM-snK0cXKZzEGF7TWbwEBVaXLbDQlBY64nnY0rIyiXHr5dPilHFFT8vqrVEAcezkaTseEZY8UAYvluTTiHdjXk6J3HyUFdAfs9biGzfhj0dxZDBA1UqswIN-UDivwdW9WP5AElRGHcctWUF?key=hRw9bBhBfp1lHBJ7rUAI2Q)

Returns a new velocity object with X=Y=Z=0. The default unit is CM.

**new Velocity (expanded)**

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXezaOTdJNQXj7nQttRbSn8FJI5t3delw5N3Y_gyz13XXg2iuzXvX3rC3TMb6Rp_D5XrloOO8g8A_mmhYu9q34C23S0hgLAyNm_2CzusoatckzF__uQC0B2k6-AFLFmVjIMP4tdQj3inZjkEYoj3seTVhWF1?key=hRw9bBhBfp1lHBJ7rUAI2Q)

Returns a new velocity using the x, y and z values measured in the given units and the current system time as the acquisition time.
