meshtastic/docs/configuration/radio/position.mdx

212 lines
10 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
---
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
2023-07-05 14:01:30 -07:00
The position config options are: GPS Enabled, GPS Update Interval, GPS Attempt Time, Fixed Position, Smart Broadcast, Smart Broadcast Minimum Distance, Smart Broadcast Minimum Interval, Broadcast Interval, Position Packet Flags, and GPS RX/TX Pins. Position config uses an admin message sending a `Config.Position` protobuf.
2022-06-24 19:42:37 -07:00
2022-10-05 06:25:07 -07:00
Position data from GPS is provided by either the radio or your paired phone. Position data is not required to use Meshtastic but time calculations require at least one device on the mesh have either a GPS or internet connection for time.
2022-06-24 19:42:37 -07:00
## Position Config Values
2023-07-05 14:01:30 -07:00
### GPS Enabled
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
Defaults to true. Enables GPS on the node.
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
### GPS Attempt Time
2023-07-05 14:01:30 -07:00
How long should we try to get our position during each GPS update interval attempt? (in seconds) Or if zero, use the default of 15 minutes.
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
2023-07-05 14:01:30 -07:00
If smart broadcast is off we should send our position this often (but only if it has changed significantly)
2022-06-24 19:42:37 -07:00
2023-07-05 14:01:30 -07:00
The GPS updates will be sent out every Broadcast Interval, with either 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">
:::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">
:::info
2022-09-22 15:41:33 -07:00
All position config values are available on iOS, iPadOS and macOS at Settings > Radio Configuration > Position.
2022-06-24 19:42:37 -07:00
:::
</TabItem>
<TabItem value="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 |
| :------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------: |
| position.gps_enabled | `true`, `false` | `true` |
| position.gps_update_interval | `integer` (seconds) | Default `0` is 2 Minutes |
| position.gps_attempt_time | `integer` (seconds) | Default of `0` is 15 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 |
| position.position_broadcast_secs | `integer` (seconds) | Default of `0` is 30 Seconds |
| 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 GPS attempt time (Default of 0 is 30 seconds)"
meshtastic --set position.gps_attempt_time 0
meshtastic --set position.gps_attempt_time 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 Fixed Position - User Defined"
meshtastic --setlat 37.8651 --setlon -119.5383
```
```shell title="Unset Fixed Position"
meshtastic --set position.fixed_position false
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 --get 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
:::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>
:::caution
Altering/disabling the GPS functionality does not mean that you will be unable to be found. Via triangulation of your radio, location may be given up to someone if they are determined enough.
2022-10-27 10:55:43 -07:00
:::