Position data from GPS can be provided either by the radio hardware or by your paired mobile phone. While Meshtastic does not strictly require GPS, accurate time synchronization across a LoRa mesh network requires at least one device in the mesh to have either a GPS module, a real-time clock (RTC), or an internet connection for NTP synchronization.
The position configuration system uses an administrative message to send a Config.Position protobuf. The available configuration 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: Determines whether GPS functionality is enabled, disabled, or not present on the node. Acceptable values are DISABLED, ENABLED, and NOT_PRESENT. Defaults depend on the device hardware and configuration.
- GPS Update Interval: Defines how frequently the device attempts to acquire a GPS position. The default is once every 2 minutes. Setting the interval to zero uses the default, while a very large value updates only once at boot.
- Fixed Position: Acceptable values are true or false. If set to true, the node is treated as stationary, using the last saved latitude, longitude, and altitude values. These values can be set by an internal GPS or by assistance from a paired mobile device.
- Smart Broadcast: Default is true. This feature increases broadcast frequency only when movement is detected, optimizing mesh network efficiency. It complements the broadcast interval and applies an algorithm to update the LoRa network more frequently while in motion, then reduces updates when stationary.
- Smart Broadcast Minimum Distance: Default is 100 meters. Defines the minimum distance traveled before a new position update is sent when smart broadcast is enabled.
- Smart Broadcast Minimum Interval: Default is 30 seconds. Defines the minimum time between updates when smart broadcast is enabled.
- Broadcast Interval: Default is 15 minutes. If smart broadcast is disabled, updates are sent at this fixed interval. GPS updates will be sent at every broadcast interval, either with the actual GPS location or an empty location if no GPS fix has been achieved.
- Position Flags: Determines which data fields are included in POSITION messages, such as altitude, heading, speed, or timestamp. These values are stored as a bit field of boolean configuration options.
| 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.
