Skip to content

Commit f1c0d42

Browse files
authored
Add GPS Profile, deprecate Position Flags
This patch makes two major changes to address the current complexity of GPS Configuration. ## GPS Profile GpsProfile, a new enum in PositionConfig we will use to configure a pre-tuned selection of GPS settings. The aim is to replace the current 5 configuration options with a single user-friendly label that is tailored to real-world Meshtastic use cases. Based on a users selection of pedestrian, vehicle, or fixed position, we will apply different settings to GPS Update Interval, Position Broadcast Interval, Smart Broadcast Min Interval, Smart Broadcast Min Distance, and Position Flags in firmware. This should allow the apps to drastically simplify the position configuration shown to users. The profile will also allow us to support new features in firmware to improve the accuracy of our position information. For example, taking advantage of advanced features in GPS hardware specific to each case. We should also be able to discard some erroneous positions based on physically impossible movement. ENUM 0 corresponds to no profile, which should mean an easier transition, and also support the 'manual' use case for people like cynfab/gpsfan, and balloons/aircraft/boats. More information about the selections anticipated for each use case is available in this [google sheet](https://docs.google.com/spreadsheets/d/1-f9z5zx2VCYqE6ivYXm-XqtLeVZSGMKpC3G3wma6-vw/edit?gid=633840990#gid=633840990): ## PositionFlags This patch deprecates PositionFlags, which will now be selected in firmware based on the GPS Profile. PositionFlags has long been seen as a complicated and confusing burden in the apps. We determined that very few users use them, with the majority happy with the default set, and some of the 'advanced' flags don't even work.
1 parent 1ecf94d commit f1c0d42

File tree

1 file changed

+52
-12
lines changed

1 file changed

+52
-12
lines changed

meshtastic/config.proto

Lines changed: 52 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -266,66 +266,67 @@ message Config {
266266
* are always included (also time if GPS-synced)
267267
* NOTE: the more fields are included, the larger the message will be -
268268
* leading to longer airtime and a higher risk of packet loss
269+
* DEPRECATED in favor if GpsProfile
269270
*/
270271
enum PositionFlags {
271272
/*
272273
* Required for compilation
273274
*/
274-
UNSET = 0x0000;
275+
UNSET = 0x0000 [deprecated = true];
275276

276277
/*
277278
* Include an altitude value (if available)
278279
*/
279-
ALTITUDE = 0x0001;
280+
ALTITUDE = 0x0001 [deprecated = true];
280281

281282
/*
282283
* Altitude value is MSL
283284
*/
284-
ALTITUDE_MSL = 0x0002;
285+
ALTITUDE_MSL = 0x0002 [deprecated = true];
285286

286287
/*
287288
* Include geoidal separation
288289
*/
289-
GEOIDAL_SEPARATION = 0x0004;
290+
GEOIDAL_SEPARATION = 0x0004 [deprecated = true];
290291

291292
/*
292293
* Include the DOP value ; PDOP used by default, see below
293294
*/
294-
DOP = 0x0008;
295+
DOP = 0x0008 [deprecated = true];
295296

296297
/*
297298
* If POS_DOP set, send separate HDOP / VDOP values instead of PDOP
298299
*/
299-
HVDOP = 0x0010;
300+
HVDOP = 0x0010 [deprecated = true];
300301

301302
/*
302303
* Include number of "satellites in view"
303304
*/
304-
SATINVIEW = 0x0020;
305+
SATINVIEW = 0x0020 [deprecated = true];
305306

306307
/*
307308
* Include a sequence number incremented per packet
308309
*/
309-
SEQ_NO = 0x0040;
310+
SEQ_NO = 0x0040 [deprecated = true];
310311

311312
/*
312313
* Include positional timestamp (from GPS solution)
313314
*/
314-
TIMESTAMP = 0x0080;
315+
TIMESTAMP = 0x0080 [deprecated = true];
315316

316317
/*
317318
* Include positional heading
318319
* Intended for use with vehicle not walking speeds
319320
* walking speeds are likely to be error prone like the compass
320321
*/
321-
HEADING = 0x0100;
322+
HEADING = 0x0100 [deprecated = true];
322323

323324
/*
324325
* Include positional speed
325326
* Intended for use with vehicle not walking speeds
326327
* walking speeds are likely to be error prone like the compass
327328
*/
328-
SPEED = 0x0200;
329+
SPEED = 0x0200 [deprecated = true];
329330
}
330331

331332
enum GpsMode {
@@ -344,6 +345,39 @@ message Config {
344345
*/
345346
NOT_PRESENT = 2;
346347
}
348+
349+
/*
350+
* A plain language label that users of GPS select based on their intended activity.
351+
* We use this to make selections from the variety of GPS Settings, including:
352+
* GPS Update Interval, Position Broadcast Interval, Smart Broadcast Min Interval,
353+
* Smart Broadcast Min Distance, and Position Flags. The firmware also modifies the
354+
* GPS hardware configuration to take advantage of advanced features for each case.
355+
* The firmware may also discard erroneous positions based on movement determined to
356+
* be physically impossible.
357+
*/
358+
enum GpsProfile {
359+
/*
360+
* Profile not set, user will make their own decisions.
361+
*/
362+
MANUAL = 0;
363+
364+
/*
365+
* This node does not move.
366+
* We automatically apply this to all routers, router_lates,
367+
* and any node with manually set lat/lon.
368+
*/
369+
FIXED_POSITION = 1;
370+
371+
/*
372+
* Hikers, runners, walkers.
373+
*/
374+
PEDESTRIAN = 2;
375+
376+
/*
377+
* Cars, motorbikes.
378+
*/
379+
VEHICLE = 3;
380+
}
347381

348382
/*
349383
* We should send our position this often (but only if it has changed significantly)
@@ -383,8 +417,9 @@ message Config {
383417
/*
384418
* Bit field of boolean configuration options for POSITION messages
385419
* (bitwise OR of PositionFlags)
420+
* DEPRECATED in favour of GPS Profile
386421
*/
387-
uint32 position_flags = 7;
422+
uint32 position_flags = 7 [deprecated = true];
388423

389424
/*
390425
* (Re)define GPS_RX_PIN for your board.
@@ -415,6 +450,11 @@ message Config {
415450
* Set where GPS is enabled, disabled, or not present
416451
*/
417452
GpsMode gps_mode = 13;
453+
454+
/*
455+
* A pre-tuned mode of operation for the GPS based on use-case.
456+
*/
457+
GpsProfile gps_profile = 13;
418458
}
419459

420460
/*

0 commit comments

Comments
 (0)