-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOCS-1499: Document dual-gps-rtk
model of movement sensor
#2594
Changes from 2 commits
f15d9ba
263b368
c0caf51
e145792
dce82f2
37cd64a
3781b81
67022a8
45c99fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,108 @@ | ||||||
--- | ||||||
title: "Configure a Dual GPS Movement Sensor" | ||||||
linkTitle: "dual-gps-rtk" | ||||||
weight: 10 | ||||||
type: "docs" | ||||||
description: "Configure a movement sensor that calculates compass heading from two gps movement sensors." | ||||||
images: ["/icons/components/imu.svg"] | ||||||
# SMEs: Rand | ||||||
--- | ||||||
|
||||||
The `dual-gps-rtk` model of movement sensor calculates compass heading from two gps movement sensors. | ||||||
sguequierre marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
In addition to [`CompassHeading()`](/components/movement-sensor/#getcompassheading), this model provides data for [`GetPosition()`](/components/movement-sensor/#getposition). | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Either use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good-- will use Get to match docs I think
sguequierre marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
{{< tabs >}} | ||||||
{{% tab name="Config Builder" %}} | ||||||
|
||||||
Navigate to the **Config** tab of your machine's page in [the Viam app](https://app.viam.com). | ||||||
Click on the **Components** subtab and click **Create component**. | ||||||
Select the `movement-sensor` type, then select the `dual-gps-rtk` model. | ||||||
Enter a name for your movement sensor and click **Create**. | ||||||
|
||||||
{{< imgproc src="/components/movement-sensor/dual-gps-rtk-builder.png" alt="Creation of a `dual-gps-rtk` movement sensor in the Viam app config builder." resize="600x" >}} | ||||||
|
||||||
Copy and paste the following attribute template into your movement sensor's **Attributes** box. | ||||||
Then remove and fill in the attributes as applicable to your movement sensor, according to the table below. | ||||||
|
||||||
{{< tabs >}} | ||||||
{{% tab name="Attributes template" %}} | ||||||
|
||||||
```json {class="line-numbers linkable-line-numbers"} | ||||||
{ | ||||||
"first_gps": "<name-of-your-first-gps-movement-sensor>", | ||||||
"second_gps": "<name-of-your-second-gps-movement-sensor>", | ||||||
"offset_degrees": <int> | ||||||
} | ||||||
``` | ||||||
|
||||||
{{% /tab %}} | ||||||
{{% tab name="Attributes example" %}} | ||||||
|
||||||
```json {class="line-numbers linkable-line-numbers"} | ||||||
{ | ||||||
"first_gps": "nmea-1", | ||||||
"second_gps": "nmea-2", | ||||||
"offset_degrees": 90 | ||||||
} | ||||||
``` | ||||||
|
||||||
{{% /tab %}} | ||||||
{{< /tabs >}} | ||||||
|
||||||
{{% /tab %}} | ||||||
{{% tab name="JSON Template" %}} | ||||||
|
||||||
```json {class="line-numbers linkable-line-numbers"} | ||||||
{ | ||||||
"components": [ | ||||||
{ | ||||||
"name": "your-dual-gps-rtk", | ||||||
"model": "dual-gps-rtk", | ||||||
"type": "movement_sensor", | ||||||
"namespace": "rdk", | ||||||
"attributes": { | ||||||
"first_gps": "<name-of-your-first-gps-movement-sensor>", | ||||||
"second_gps": "<name-of-your-second-gps-movement-sensor>", | ||||||
"offset_degrees": <int> | ||||||
}, | ||||||
"depends_on": [] | ||||||
} | ||||||
] | ||||||
} | ||||||
``` | ||||||
|
||||||
{{% /tab %}} | ||||||
{{% tab name="JSON Example" %}} | ||||||
|
||||||
```json {class="line-numbers linkable-line-numbers"} | ||||||
{ | ||||||
"components": [ | ||||||
{ | ||||||
"name": "your-dual-gps-rtk", | ||||||
"model": "dual-gps-rtk", | ||||||
"type": "movement_sensor", | ||||||
"namespace": "rdk", | ||||||
"attributes": { | ||||||
"first_gps": "nmea-1", | ||||||
"second_gps": "nmea-2", | ||||||
"offset_degrees": 90 | ||||||
}, | ||||||
"depends_on": [] | ||||||
} | ||||||
] | ||||||
} | ||||||
``` | ||||||
|
||||||
{{% /tab %}} | ||||||
{{< /tabs >}} | ||||||
|
||||||
The following attributes are available for a `dual-gps-rtk` movement sensor: | ||||||
|
||||||
<!-- prettier-ignore --> | ||||||
| Name | Type | Inclusion | Description | | ||||||
| ---- | ---- | --------- | ----------- | | ||||||
| `first_gps` | int | **Required** | The name you have configured for the first movement sensor you want to combine the measurements from. Must be a `GPS` model. | | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technically we're only checking if the movement sensor is position reporting in the code, but I doubt this model will be useful for non-GPS position reporting sensors such as wheeled odometry, SLAM algorithms or optical trackers. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should I specify position reporting then, or leave as is? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Leaving as is is more useful. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, thanks! |
||||||
| `second_gps` | string | **Required** | The name you have configured for the second movement sensor you want to combine the measurements from. Must be a `GPS` model. | | ||||||
| `offset_degrees` | int | Optional | Value to offset the compass heading calculation between the two GPS devices based on their positions on the base. Calculate this as the degrees between the vector from `first_gps` to `second_gps` and the vector from the vehicle's back to the vehicle's front, counterclockwise. {{< imgproc src="/components/movement-sensor/offset_degrees.png" alt="Rand's diagram of 3 offset degree calculations." resize="600x" >}} <br> Default: `90` | | ||||||
sguequierre marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
<!-- TODO: add control --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This image is rendering with a bit of a blur, but it's not intense at all.