signalk-to-noforeignland 0.1.19 → 0.1.20

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 +2 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -221,6 +221,7 @@ module.exports = function(app) {
221
221
  return;
222
222
  }
223
223
  lastPosition = { pos: value.value, timestamp, currentTime: new Date().getTime() };
224
+ app.debug('Updated lastPosition:', lastPosition);
224
225
 
225
226
  const distance = equirectangularDistance(lastPosition.pos, value.value)
226
227
  if (options.minMove && distance < options.minMove) {
@@ -394,7 +395,7 @@ module.exports = function(app) {
394
395
  return;
395
396
  }
396
397
  const url = options.apiUrl || "https://www.noforeignland.com/home/api/v1/boat/tracking/track";
397
- const timestamp = new Date(lastPosition.timestamp).getTime();
398
+ const timestamp = Date.now();//we want to trigger a refresh on NFL even if we didn't get a delta
398
399
  const lat = lastPosition.pos.latitude;
399
400
  const lon = lastPosition.pos.longitude;
400
401
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signalk-to-noforeignland",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "description": "SignalK track logger to noforeignland.com ",
5
5
  "main": "index.js",
6
6
  "keywords": [