@meri-imperiumi/signalk-aprs 0.1.0 → 0.1.1

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.
package/README.md CHANGED
@@ -31,5 +31,7 @@ Very early stages, being tested with the [LoRa APRS iGate](https://github.com/ri
31
31
 
32
32
  ## Changes
33
33
 
34
+ * 0.1.1 (2025-10-29)
35
+ - Fix position precision
34
36
  * 0.1.0 (2025-10-29)
35
37
  - Initial release, can beacon vessel position
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meri-imperiumi/signalk-aprs",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Signal K plugin for interacting with the Automatic Packet Reporting System for radio amateurs",
5
5
  "main": "plugin/index.js",
6
6
  "scripts": {
package/plugin/aprs.js CHANGED
@@ -3,7 +3,7 @@ function formatLatitude(coord) {
3
3
  const deg = String(Math.floor(degFloat)).padStart(2, '0');
4
4
  const minFloat = 60 * (degFloat - Math.floor(degFloat));
5
5
  const min = String(Math.floor(minFloat)).padStart(2, '0');
6
- const secFloat = 60 * (minFloat - Math.floor(minFloat));
6
+ const secFloat = 100 * (minFloat - Math.floor(minFloat));
7
7
  const sec = String(Math.floor(secFloat)).padStart(2, '0');
8
8
  const sign = coord > 0 ? 'N' : 'S';
9
9
  return `${deg}${min}.${sec}${sign}`;
@@ -14,7 +14,7 @@ function formatLongitude(coord) {
14
14
  const deg = String(Math.floor(degFloat)).padStart(3, '0');
15
15
  const minFloat = 60 * (degFloat - Math.floor(degFloat));
16
16
  const min = String(Math.floor(minFloat)).padStart(2, '0');
17
- const secFloat = 60 * (minFloat - Math.floor(minFloat));
17
+ const secFloat = 100 * (minFloat - Math.floor(minFloat));
18
18
  const sec = String(Math.floor(secFloat)).padStart(2, '0');
19
19
  const sign = coord > 0 ? 'E' : 'W';
20
20
  return `${deg}${min}.${sec}${sign}`;