-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add XTE-GC to produce XTE w.r.t great circle
- Loading branch information
Showing
2 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
Cross-track error: | ||
$IIXTE,A,A,x.x,a,N,A*hh | ||
I_Cross-track error in miles, L= left, R= right | ||
*/ | ||
// to verify | ||
const nmea = require('../nmea.js') | ||
module.exports = function (app) { | ||
return { | ||
title: 'XTE - Cross-track error (w.r.t. Great Circle)', | ||
keys: ['navigation.courseGreatCircle.crossTrackError'], | ||
f: function (crossTrackError) { | ||
return nmea.toSentence([ | ||
'$IIXTE', | ||
'A', | ||
'A', | ||
nmea.mToNm(crossTrackError).toFixed(3), | ||
crossTrackError < 0 ? 'R' : 'L', | ||
'N' | ||
]) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters