Position data from GPS is provided by either the radio or your paired phone. While it is not required to use Meshtastic, time calculations need at least one device on the mesh to have either a GPS, RTC, or an internet connection for NTP.
The position config utilizes an admin message to send a Config.Position protobuf. The position config options include: 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/EN Pins.
Position Config Values
-
GPS Mode: Configures whether the GPS functionality is enabled, disabled, or not present on the node. Acceptable values: DISABLED, ENABLED, and NOT_PRESENT. Generally, this value will default to either ENABLED or NOT_PRESENT, depending on the device and its configuration.
-
GPS Update Interval: Specifies how often we should attempt to get the GPS position (in seconds), or set to zero for the default of once every 2 minutes, or a very large value (maxint) to update only once at boot.
-
Fixed Position: Acceptable values: true or false (default is false). If set to true, this node is at a fixed position. The device will generate GPS updates at the regular GPS update interval but will use the last saved lat/lon/alt for the node. The lat/lon/alt can be set by an internal GPS or with assistance from the mobile device's GPS.
-
Smart Broadcast: Acceptable values: true or false (default is true). Smart broadcast will send out your position at an increased frequency only if your location has changed sufficiently for a position update to be useful. It complements the broadcast interval (doesn't override that setting) and applies an algorithm to more frequently update your mesh network while you're in motion, then throttles down when you are stationary. If you utilize this feature, it's best to keep the broadcast interval at the default. Smart broadcast will calculate an ideal position update interval based on the data rate of your selected channel configuration.
-
Smart Broadcast Minimum Distance: The default of 0 is 100 meters. This parameter specifies the minimum distance in meters traveled (since the last send) before a position can be sent to the mesh if smart broadcast is enabled.
-
Smart Broadcast Minimum Interval: The default of 0 is 30 seconds. This parameter defines the minimum number of seconds (since the last send) before a position can be sent to the mesh if smart broadcast is enabled.
-
Broadcast Interval: The default of 0 is 15 minutes. If smart broadcast is off, the position should be sent this often. The GPS updates will be sent out at every broadcast interval, either with the actual GPS location or an empty location if no GPS fix has been achieved.
-
Position Flags: Defines which options are included in POSITION messages. The values are stored as a bit field of boolean configuration options (bitwise OR of PositionFlags).
| 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) |
-
GPIO RX/TX/EN for GPS Module
If your device does not have a fixed GPS chip, you can define the GPIO pins for the RX, TX, and EN pins of a GPS module.
Position Configuration Client Availability
Android
Position config options are available for Android.
To access them, open the Meshtastic App and navigate to: Vertical Ellipsis (3 dots in the top right) > Radio Configuration > Position.
Apple
All position config values are available on iOS, iPadOS, and macOS at Settings > Device Configuration > Position.
CLI
All Position config commands are available in the Python CLI. Example commands are provided below:
| Setting | Acceptable Values | Default |
| position.gps_mode | ENABLED, DISABLED, NOT_PRESENT | ENABLED or NOT_PRESENT |
| 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 |
| position.position_broadcast_secs | integer (seconds) | Default of 0 is 15 minutes |
| 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 |
-
Set GPS update interval (Default of 0 is 2 Minutes)
| meshtastic --set position.gps_update_interval 0 meshtastic --set position.gps_update_interval 45 |
-
Set Fixed Position - Current Location
| meshtastic --set position.fixed_position true |
NOTE1: 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.
-
Set and Enable Fixed Position - User Defined
| meshtastic --setlat 37.8651 --setlon -119.5383 |
-
Remove and Unset Fixed Position
| meshtastic --remove-position |
-
Enable / Disable Smart position broadcast (Enabled by default)
| meshtastic --set position.position_broadcast_smart_enabled true meshtastic --set position.position_broadcast_smart_enabled false |
-
Set Position Broadcast Interval (Default of 0 is 15 minutes)
| meshtastic --set position.broadcast_secs 0 meshtastic --set position.broadcast_secs 60 |
NOTE2: It may take some time to observe that the change has taken effect. The GPS location is updated according to the value specified for gps_update_interval, and the mesh will be notified of the new position in relation to the position_broadcast_secs value.
-
Set / Unset Position Flags
| meshtastic --pos-fields ALTITUDE ALTITUDE_MSL meshtastic --pos-fields UNSET |
NOTE3: Since the device will reboot after each command is sent via CLI, it is recommended to chain together commands as one when setting multiple values in a config section. This is especially important for position values to ensure they are set at the same time and to avoid being overwritten by subsequent commands. For example:
| meshtastic --set position.fixed_position true --setlat 37.8651 --setlon -119.5383 |
Web
All position configuration options are available in the Web UI.
