meshtastic/docs/configuration/radio/position.mdx

209 lines
9.7 KiB
Plaintext
Raw Normal View History

2022-06-24 19:42:37 -07:00
---
2022-06-24 20:58:34 -07:00
id: position
2022-06-24 19:42:37 -07:00
title: Position Configuration
sidebar_label: Position
description: GPS position configuration settings for your Meshtastic device including update intervals, broadcast settings, and GPIO.
2022-06-24 19:42:37 -07:00
---
2023-01-19 05:01:57 -08:00
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
2022-06-24 19:42:37 -07:00
2024-05-07 07:42:43 -07:00
Position data from GPS is provided by either the radio or your paired phone. It is not required to use Meshtastic, but time calculations require at least one device on the mesh to have either a GPS, RTC, or internet connection for NTP.
2022-06-24 19:42:37 -07:00
2024-05-07 07:42:43 -07:00
The position config uses an admin message to send a `Config.Position` protobuf. The position config options are: GPS Mode, GPS Update Interval, Fixed Position, Smart Broadcast, Smart Broadcast Minimum Distance, Smart Broadcast Minimum Interval, Broadcast Interval, Position Packet Flags, and GPS RX/TX Pins.
2022-06-24 19:42:37 -07:00
## Position Config Values
2024-05-07 07:42:43 -07:00
### GPS Mode
2023-01-19 05:01:57 -08:00
2024-05-07 07:42:43 -07:00
Configures whether the GPS functionality is enabled, disabled, or not present on the node.
Acceptable values: `Disabled`, `Enabled`, and `Not_Present`.
2022-06-24 19:42:37 -07:00
2024-05-07 07:42:43 -07:00
Generally, depending on the device and its configuration, this value will default to either `Enabled` or `Not Present`.
2022-06-24 19:42:37 -07:00
### GPS Update Interval
2023-07-05 14:01:30 -07:00
How often we should try to get GPS position (in seconds), or zero for the default of once every 2 minutes, or a very large value (maxint) to update only once at boot.
2022-06-24 19:42:37 -07:00
### Fixed Position
2023-01-19 05:01:57 -08:00
Acceptable values: `true` or `false`
2022-06-24 19:42:37 -07:00
2023-08-05 22:55:59 -07:00
False by default
2022-06-24 19:42:37 -07:00
If set, this node is at a fixed position. The device will generate GPS updates at the regular GPS update interval, but use whatever the last lat/lon/alt it saved for the node. The lat/lon/alt can be set by an internal GPS or with the help of the mobile device's GPS.
### Smart Broadcast
2023-01-19 05:01:57 -08:00
Acceptable values: `true` or `false`
2022-06-24 19:42:37 -07:00
2023-07-05 14:01:30 -07:00
True by default
2022-06-24 19:42:37 -07:00
Smart broadcast will send out your position at an increased frequency only if your location has changed enough for a position update to be useful.
Smart broadcast complements broadcast interval (doesn't override that setting) but will apply an algorithm to more frequently update your mesh network if you are in motion and then throttle it down when you are standing still. If you use this feature, it's best to leave broadcast interval at the default.
Smart broadcast will calculate an ideal position update interval based on the data rate of your selected channel configuration.
2023-07-05 14:01:30 -07:00
### Smart Broadcast Minimum Distance
Default of `0` is 100 meters
The minimum distance in meters traveled (since the last send) before we can send a position to the mesh if smart broadcast is enabled.
### Smart Broadcast Minimum Interval
Default of `0` is 30 seconds
The minimum number of seconds (since the last send) before we can send a position to the mesh if smart broadcast is enabled.
2022-06-24 19:42:37 -07:00
### Broadcast Interval
Default of `0` is 15 minutes
2024-05-07 07:42:43 -07:00
If smart broadcast is off we should send our position this often.
2022-06-24 19:42:37 -07:00
2024-05-07 07:42:43 -07:00
The GPS updates will be sent out every broadcast interval, either with the actual GPS location or an empty location if no GPS fix was achieved.
2022-06-24 19:42:37 -07:00
2023-01-19 05:01:57 -08:00
### Position Flags
2022-06-24 19:42:37 -07:00
2023-07-05 14:01:30 -07:00
Defines which options are sent in POSITION messages. Values are stored as a bit field of boolean configuration options (bitwise OR of PositionFlags).
2022-06-24 19:42:37 -07:00
2023-01-19 05:01:57 -08:00
| Value | Description |
| :----------------: | :--------------------------------------------------------------: |
| UNSET | Required for compilation |
| ALTITUDE | Include an altitude value (if available) |
| ALTITUDE_MSL | Altitude value is MSL |
| GEOIDAL_SEPARATION | Include geoidal separation |
| DOP | Include the DOP value ; PDOP used by default, see below |
| HVDOP | If POS_DOP set, send separate HDOP / VDOP values instead of PDOP |
| SATINVIEW | Include number of "satellites in view" |
| SEQ_NO | Include a sequence number incremented per packet |
| TIMESTAMP | Include positional timestamp (from GPS solution) |
| HEADING | Include positional heading (from GPS solution) |
| SPEED | Include positional speed (from GPS solution) |
2022-06-24 19:42:37 -07:00
### GPIO RX/TX for GPS Module
If your device does not have a fixed GPS chip, you can define the GPIO pins for the RX and TX pins of a GPS module.
2023-01-19 05:01:57 -08:00
## Position Config Client Availability
2022-06-24 19:42:37 -07:00
<Tabs
groupId="settings"
defaultValue="apple"
2022-06-24 19:42:37 -07:00
values={[
{label: 'Android', value: 'android'},
{label: 'Apple', value: 'apple'},
2022-06-29 22:33:26 -07:00
{label: 'CLI', value: 'cli'},
2022-06-24 19:42:37 -07:00
{label: 'Web', value: 'web'},
]}>
<TabItem value="android">
2024-02-22 13:09:26 -08:00
#### Android
2022-06-24 19:42:37 -07:00
:::info
2022-12-04 13:12:04 -08:00
Position Config options are available for Android.
1. Open the Meshtastic App
2023-06-17 22:06:11 -07:00
2. Navigate to: **Vertical Ellipsis (3 dots top right) > Radio Configuration > Position**
2022-12-04 13:12:04 -08:00
2022-06-24 19:42:37 -07:00
:::
</TabItem>
<TabItem value="apple">
2024-02-22 13:09:26 -08:00
#### Apple
2022-06-24 19:42:37 -07:00
:::info
2024-03-07 13:14:03 -08:00
All position config values are available on iOS, iPadOS and macOS at Settings > Device Configuration > Position.
2022-06-24 19:42:37 -07:00
:::
</TabItem>
<TabItem value="cli">
2024-02-22 13:09:26 -08:00
#### CLI
2023-01-19 05:01:57 -08:00
:::info
2022-10-05 06:25:07 -07:00
All Position config commands are available in the python CLI. Example commands are below:
2022-06-24 19:42:37 -07:00
:::
2023-07-05 14:01:30 -07:00
| Setting | Acceptable Values | Default |
| :------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------: |
2024-05-07 13:57:10 -07:00
| position.gps_mode | `enabled`, `disabled`, `not_present` | `Enabled` or `Not Present` |
2023-07-05 14:01:30 -07:00
| position.gps_update_interval | `integer` (seconds) | Default `0` is 2 Minutes |
| position.fixed_position | `true`, `false` | `false` |
| position.position_broadcast_smart_enabled | `true`, `false` | `true` |
| position.broadcast_smart_minimum_distance | `integer` (meters) | Default of `0` is 100 Meters |
|position.broadcast_smart_minimum_interval_secs| `integer` (seconds) | Default of `0` is 15 Minutes |
2024-07-14 04:58:20 -07:00
| position.position_broadcast_secs | `integer` (seconds) | Default of `0` is 15 minutes |
2023-07-05 14:01:30 -07:00
| position.flags | `UNSET`, `ALTITUDE`, `ALTITUDE_MSL`, `GEOIDAL_SEPARATION`, `DOP`, `HVDOP`, `PDOP`, `SATINVIEW`, `SEQ_NO`, `TIMESTAMP`, `HEADING`, `SPEED` | `UNSET` |
| position.rx_gpio | `integer` (0-39) | `UNSET` |
| position.tx_gpio | `integer` (0-34) | `UNSET` |
2022-06-24 19:42:37 -07:00
:::tip
Because the device will reboot after each command is sent via CLI, it is recommended when setting multiple values in a config section that commands be chained together as one. **This is especially important for position values to ensure they are set at the same time and avoid being overwritten by subsequent commands.**
```shell title="Example:"
meshtastic --set position.fixed_position true --setlat 37.8651 --setlon -119.5383
```
:::
2022-06-24 19:42:37 -07:00
```shell title="Set GPS update interval (Default of 0 is 30 seconds)"
meshtastic --set position.gps_update_interval 0
meshtastic --set position.gps_update_interval 45
2022-06-24 19:42:37 -07:00
```
```shell title="Set Fixed Position - Current Location"
meshtastic --set position.fixed_position true
2022-06-24 19:42:37 -07:00
```
:::note
The device will continue to acquire GPS coordinates according to the `gps_update_interval`, but will use the last saved coordinates as its fixed point.
:::
```shell title="Set and Enable Fixed Position - User Defined"
2022-06-24 19:42:37 -07:00
meshtastic --setlat 37.8651 --setlon -119.5383
```
```shell title="Remove and Unset Fixed Position"
meshtastic --remove-position
2022-06-24 19:42:37 -07:00
```
```shell title="Enable / Disable Smart position broadcast (Enabled by default)"
2022-09-30 10:43:26 -07:00
meshtastic --set position.position_broadcast_smart_enabled true
meshtastic --set position.position_broadcast_smart_enabled false
2022-06-24 19:42:37 -07:00
```
```shell title="Set Position Broadcast Interval (Default of 0 is 15 minutes)"
meshtastic --set position.broadcast_secs 0
meshtastic --set position.broadcast_secs 60
2022-06-24 19:42:37 -07:00
```
:::note
It may take some time to see that the change has taken effect. The GPS location is updated according to the value specified on `gps_update_interval` and the mesh will be notified of the new position in relation to the `position_broadcast_secs` value.
:::
```shell title="Set / Unset Position Flags"
2022-09-30 09:58:28 -07:00
meshtastic --pos-fields ALTITUDE ALTITUDE_MSL
2022-09-22 15:41:33 -07:00
meshtastic --pos-fields UNSET
2022-06-24 19:42:37 -07:00
```
</TabItem>
<TabItem value="web">
2022-06-24 19:42:37 -07:00
2024-02-22 13:09:26 -08:00
#### Web
2022-06-24 19:42:37 -07:00
:::info
2022-08-03 08:14:18 -07:00
All position config options are available in the Web UI.
2022-06-24 19:42:37 -07:00
:::
2023-01-19 05:01:57 -08:00
</TabItem>
2022-06-24 19:42:37 -07:00
</Tabs>