signalk-to-noforeignland 0.1.13 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +9 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -179,10 +179,15 @@ module.exports = function (app) {
179
179
  let timestamp = update.timestamp;
180
180
  for (value of update.values) {
181
181
 
182
- if (value.value.latitude === 0 && value.value.longitude === 0) {
183
- // Skip saving point with latitude and longitude both equal to 0
184
- return;
185
- }
182
+
183
+ if (
184
+ Math.abs(value.value.latitude) <= 0.01 &&
185
+ Math.abs(value.value.longitude) <= 0.01
186
+ ) {
187
+ // Coordinates are within ±0.1 of (0,0)
188
+ return;
189
+ }
190
+
186
191
  // app.debug(`value:`, value);
187
192
 
188
193
  if (!shouldDoLog) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signalk-to-noforeignland",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "SignalK track logger to noforeignland.com ",
5
5
  "main": "index.js",
6
6
  "keywords": [