From 07f3be0d26e309ccdf0721fc5c4b26a422679d40 Mon Sep 17 00:00:00 2001 From: Philip Abbey Date: Tue, 10 Mar 2026 21:55:06 +0000 Subject: [PATCH 1/4] Update BackgroundServiceDelegate.mc Changes to location sending and accuracy. --- source/BackgroundServiceDelegate.mc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/BackgroundServiceDelegate.mc b/source/BackgroundServiceDelegate.mc index 2e0d63b..2b58323 100644 --- a/source/BackgroundServiceDelegate.mc +++ b/source/BackgroundServiceDelegate.mc @@ -115,15 +115,17 @@ class BackgroundServiceDelegate extends System.ServiceDelegate { // System.println("BackgroundServiceDelegate onTemporalEvent(): Activity : " + Activity.getProfileInfo().name); // Don't use Settings.* here as the object lasts < 30 secs and is recreated each time the background service is run - - if (position.accuracy != Position.QUALITY_NOT_AVAILABLE && position.accuracy != Position.QUALITY_LAST_KNOWN) { + if (position.accuracy != Position.QUALITY_NOT_AVAILABLE) { var accuracy = 0; switch (position.accuracy) { + case Position.QUALITY_LAST_KNOWN: + accuracy = 100; + break; case Position.QUALITY_POOR: - accuracy = 500; + accuracy = 100; break; case Position.QUALITY_USABLE: - accuracy = 100; + accuracy = 50; break; case Position.QUALITY_GOOD: accuracy = 10; From 6d0f449904ec05659ec6d31726dc52a10adbdd78 Mon Sep 17 00:00:00 2001 From: Philip Abbey Date: Wed, 11 Mar 2026 14:34:50 +0000 Subject: [PATCH 2/4] Update BackgroundServiceDelegate.mc Amended accuracy for QUALITY_LAST_KNOWN. --- source/BackgroundServiceDelegate.mc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/BackgroundServiceDelegate.mc b/source/BackgroundServiceDelegate.mc index 2b58323..132ac6f 100644 --- a/source/BackgroundServiceDelegate.mc +++ b/source/BackgroundServiceDelegate.mc @@ -119,7 +119,7 @@ class BackgroundServiceDelegate extends System.ServiceDelegate { var accuracy = 0; switch (position.accuracy) { case Position.QUALITY_LAST_KNOWN: - accuracy = 100; + accuracy = 200; break; case Position.QUALITY_POOR: accuracy = 100; From 5ddcc14c54dc09456cb0ce50521ef4ef20ffb235 Mon Sep 17 00:00:00 2001 From: Philip Abbey Date: Wed, 11 Mar 2026 14:39:36 +0000 Subject: [PATCH 3/4] Update BackgroundServiceDelegate.mc Added comment about reasoning for accuracy. --- source/BackgroundServiceDelegate.mc | 1 + 1 file changed, 1 insertion(+) diff --git a/source/BackgroundServiceDelegate.mc b/source/BackgroundServiceDelegate.mc index 132ac6f..ce09312 100644 --- a/source/BackgroundServiceDelegate.mc +++ b/source/BackgroundServiceDelegate.mc @@ -119,6 +119,7 @@ class BackgroundServiceDelegate extends System.ServiceDelegate { var accuracy = 0; switch (position.accuracy) { case Position.QUALITY_LAST_KNOWN: + // Location is no longer tied to the timestamp, hence the larger inaccuracy. accuracy = 200; break; case Position.QUALITY_POOR: From c8953021e3f68b6e74537033f32c038ba58a7f66 Mon Sep 17 00:00:00 2001 From: Philip Abbey Date: Wed, 11 Mar 2026 18:08:50 +0000 Subject: [PATCH 4/4] Commentry and documentation --- BackgroundService.md | 8 +++++--- HISTORY.md | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/BackgroundService.md b/BackgroundService.md index 96115be..8465d46 100644 --- a/BackgroundService.md +++ b/BackgroundService.md @@ -33,11 +33,13 @@ From version 2.6 the application includes reporting your location. The location You get whatever your device provides at the moment, i.e. at the accuracy the device currently provides. If your watch is not calibrated you get poor data. It might mean that you get more accurate location data when you are in a location tracking activity (i.e. not swimming pool lengths). The device [indicates an accuracy](https://developer.garmin.com/connect-iq/api-docs/Toybox/Position.html#Quality-module) in units of: - `Position.QUALITY_NOT_AVAILABLE` - No update provided -- `Position.QUALITY_LAST_KNOWN` - No update provided -- `Position.QUALITY_POOR` - We translate that to 500 m arbitrarily -- `Position.QUALITY_USABLE` - We translate that to 100 m arbitrarily +- `Position.QUALITY_LAST_KNOWN` - We translate that to 200 m arbitrarily +- `Position.QUALITY_POOR` - We translate that to 100 m arbitrarily +- `Position.QUALITY_USABLE` - We translate that to 50 m arbitrarily - `Position.QUALITY_GOOD` - We translate that to 10 m arbitrarily +NB. These values have been revised as of Ver 3.12. + **You cannot rely on the radius of the circle of accuracy in any resulting maps as any meaningful indication of error.** ## Activity Reporting diff --git a/HISTORY.md b/HISTORY.md index fe4a107..46bd7c6 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -57,3 +57,4 @@ | 3.9 | Small update to warn users with empty menu definitions to read the instructions! | | 3.10 | Bug avoidance for a fatal _"Error: Out Of Memory Error"_ in the glance when caching the menu to [`Storage`](https://developer.garmin.com/connect-iq/api-docs/Toybox/Application/Storage.html). This is now delayed until the main application is opened. Added support for two new devices, D2 Mach 2 and eTrex Touch. | | 3.11 |
Better handling of menus larger than the Glance view can handle. As a result the Glance can no longer verify the availability of the JSON menu as fetching it might cause an _"Error: Out Of Memory Error"_. Provide two user supplied HTTP Headers. Bug fix for the numeric picker. | +| 3.12 | Amended GPS accuracy values used by the background service. |