> For the complete documentation index, see [llms.txt](https://sryvkver.gitbook.io/cobi.bike/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sryvkver.gitbook.io/cobi.bike/namespaces/ride-service/speed.md).

# Speed

Speed provided by the intelligence library used in the app (in m/s)

{% tabs %}
{% tab title="Typescript" %}

```typescript
const onSpeedChange = (value: number, timestamp?: Date) => {
    console.log(value, timestamp);
};

COBI.rideService.speed.subscribe(onSpeedChange);
COBI.rideService.speed.unsubscribe(onSpeedChange);
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
const onSpeedChange = (value, timestamp) => {
    console.log(value, timestamp);
};

COBI.rideService.speed.subscribe(onSpeedChange);
COBI.rideService.speed.unsubscribe(onSpeedChange);
```

{% endtab %}
{% endtabs %}
