From ac8325333c0be855cdf198a992ab3cc3a174741f Mon Sep 17 00:00:00 2001 From: Tom Fifield Date: Sun, 10 Nov 2024 17:16:25 +0800 Subject: [PATCH] Add dynamic usage mode selection for GPS Position. Most of the GPS chips we support have the ability to change their operating model "dynamics" based on the intended activities. We currently assume everyone is a pedestrian and configure as such. However, there are users out there on bikes, planes, balloons, and with fixed devices. Where GPS chips support it, we can configure for each of this circumstances and improve performance. For example, fixed nodes might no longer jump around on the map. Planes will have a more responsive and less filtered position. Balloons' GPS won't simply cut out because its gone over an altitude limit. Boats won't have altitudes that make them appear to be floating in the air. Additionally, this could provide the opportunity for a bit of fun in the apps - surface information about the use case so people know when they're connecting to a plane or baloon :) Related to: https://github.com/meshtastic/firmware/issues/3984 Related to: https://github.com/meshtastic/protobufs/pull/619 Related to: https://github.com/meshtastic/firmware/pull/5281 --- meshtastic/config.proto | 43 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/meshtastic/config.proto b/meshtastic/config.proto index aaf340bd..0e64f88e 100644 --- a/meshtastic/config.proto +++ b/meshtastic/config.proto @@ -293,6 +293,44 @@ message Config { NOT_PRESENT = 2; } + + enum GpsDynamicMode { + /* + * For pedestrian use and hiking (default) + */ + PEDESTRIAN = 0; + + /* + * For cycling. + */ + BIKE = 1; + + /* + * For use in a moving car. + */ + CAR = 2; + + /* + * For use in a boat at sea level. + */ + BOAT = 3; + + /* + * For use in a plane. + */ + PLANE = 4; + + /* + * For use in a high-altitude balloon. + */ + BALLOON = 5; + + /* + * For fixed-position use of GPS. + */ + STATIONARY = 6; + } + /* * We should send our position this often (but only if it has changed significantly) * Defaults to 15 minutes @@ -363,6 +401,11 @@ message Config { * Set where GPS is enabled, disabled, or not present */ GpsMode gps_mode = 13; + + /* + * Set what type of activity is expected for the GPS Usage. + */ + GpsMode gps_dynamic_mode = 14; } /*