Skip to content

Commit

Permalink
fix: force transducerToKeel DPT negative
Browse files Browse the repository at this point in the history
Signal K specification does not specify sign of transducerToKeel,
so one can interpret it to be an absolute value, or like in DPT
sign has a special meaning.

Change the conversion to force it to be negative in DPT.
  • Loading branch information
tkurki committed Dec 18, 2023
1 parent 913e5b2 commit 1480d55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sentences/DPT.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = function (app) {
return nmea.toSentence([
'$IIDPT',
belowTransducer.toFixed(2),
transducerToKeel.toFixed(3)
(-Math.abs(transducerToKeel)).toFixed(3)
])
}
}
Expand Down

0 comments on commit 1480d55

Please sign in to comment.