diff --git a/assets/components/movement-sensor/dual-gps-rtk-builder.png b/assets/components/movement-sensor/dual-gps-rtk-builder.png new file mode 100644 index 0000000000..9f3c7e0e73 Binary files /dev/null and b/assets/components/movement-sensor/dual-gps-rtk-builder.png differ diff --git a/assets/components/movement-sensor/movement-sensor-control-tab-dual.png b/assets/components/movement-sensor/movement-sensor-control-tab-dual.png new file mode 100644 index 0000000000..f9d00d57da Binary files /dev/null and b/assets/components/movement-sensor/movement-sensor-control-tab-dual.png differ diff --git a/assets/components/movement-sensor/offset_degrees.png b/assets/components/movement-sensor/offset_degrees.png new file mode 100644 index 0000000000..40e0b6966a Binary files /dev/null and b/assets/components/movement-sensor/offset_degrees.png differ diff --git a/docs/components/movement-sensor/_index.md b/docs/components/movement-sensor/_index.md index ff04f13947..11e1d8ad0f 100644 --- a/docs/components/movement-sensor/_index.md +++ b/docs/components/movement-sensor/_index.md @@ -48,6 +48,7 @@ Model | Description [`gps-nmea`](./gps/gps-nmea/) | [NMEA-based](https://en.wikipedia.org/wiki/NMEA_0183) GPS models [`gps-nmea-rtk-pmtk`](./gps/gps-nmea-rtk-pmtk/) | [NTRIP-based](https://en.wikipedia.org/wiki/Networked_Transport_of_RTCM_via_Internet_Protocol) [RTK](https://en.wikipedia.org/wiki/Real-time_kinematic_positioning) GPS models using I2C (**experimental**) [`gps-nmea-rtk-serial`](./gps/gps-nmea-rtk-serial/) | [NTRIP-based](https://en.wikipedia.org/wiki/Networked_Transport_of_RTCM_via_Internet_Protocol) [RTK](https://en.wikipedia.org/wiki/Real-time_kinematic_positioning) GPS models using serial communication (**experimental**) +[`dual-gps-rtk`](./gps/dual-gps-rtk/) | A movement sensor that calculates compass heading from two GPS movement sensors [`imu-wit`](./imu/imu-wit/) | IMUs manufactured by [WitMotion](https://www.wit-motion.com/) [`accel-adxl345`](./adxl345/) | The [Analog Devices ADXL345](https://www.analog.com/en/products/adxl345.html) digital accelerometer [`gyro-mpu6050`](./mpu6050/) | A gyroscope/accelerometer manufactured by TDK InvenSense diff --git a/docs/components/movement-sensor/gps/dual-gps-rtk.md b/docs/components/movement-sensor/gps/dual-gps-rtk.md new file mode 100644 index 0000000000..8e6b5e8629 --- /dev/null +++ b/docs/components/movement-sensor/gps/dual-gps-rtk.md @@ -0,0 +1,114 @@ +--- +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, and returns the midpoint position between the first and second GPS devices as its position. +In addition to [`GetCompassHeading()`](/components/movement-sensor/#getcompassheading), this model provides data for [`GetPosition()`](/components/movement-sensor/#getposition) and [`GetAccuracy()`](/components/movement-sensor/#getaccuracy). + +{{< 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**. + +![Creation of a `dual-gps-rtk` movement sensor in the Viam app config builder.](/components/movement-sensor/dual-gps-rtk-builder.png) + +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": "", + "second_gps": "", + "offset_degrees": +} +``` + +{{% /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": "", + "second_gps": "", + "offset_degrees": + }, + "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: + + +| 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. | +| `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 | The 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" >}}
Default: `90` | + +## Test the movement sensor + +After you configure your movement sensor, navigate to the [Control tab](/fleet/machines/#control) and select the dedicated movement sensor dropdown panel. +This panel presents the data collected by the movement sensor. +The sections in the panel include the position, compass heading, and accuracy. + +{{}}