@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 +2 -0
- package/package.json +1 -1
- package/plugin/aprs.js +2 -2
package/README.md
CHANGED
package/package.json
CHANGED
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 =
|
|
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 =
|
|
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}`;
|