Skip to content

Commit

Permalink
Adding new converion that supports true heading messages (PGN 127250).
Browse files Browse the repository at this point in the history
Reference is set to "True" and the Variation is set to "undefined".
The navigation.headingTrue path is used as source by default.
  • Loading branch information
bjornjm committed Aug 15, 2024
1 parent 09014f6 commit fcff1c5
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions conversions/trueheading.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

module.exports = (app, plugin) => {
return {
pgn: 127250,
title: 'TrueHeading (127250)',
optionKey: 'TRUE_HEADING',
keys: [
"navigation.headingTrue"
],
callback: (heading) => {
return [{
pgn: 127250,
SID: 87,
Heading: heading,
"Variation": undefined,
Reference: "True"
}]
},
tests: [{
input: [ 1.35, undefined ],
expected: [{
"prio": 2,
"pgn": 127250,
"dst": 255,
"fields": {
"SID": 87,
"Heading": 1.35,
"Variation": undefined,
"Reference": "True"
}
}]
}]
}
}

0 comments on commit fcff1c5

Please sign in to comment.