From 47020eebe3e801c2120fe26af58509c313859e5d Mon Sep 17 00:00:00 2001 From: panaaj <38519157+panaaj@users.noreply.github.com> Date: Wed, 29 Jun 2022 10:46:43 +0930 Subject: [PATCH 1/4] 129285 update path navigation.course.activeRoute --- pgns/129285.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pgns/129285.js b/pgns/129285.js index 6a0e38d0..f6d4f4d7 100644 --- a/pgns/129285.js +++ b/pgns/129285.js @@ -3,11 +3,11 @@ const _ = require('lodash') module.exports = [ { - node: 'navigation.currentRoute.name', + node: 'navigation.course.activeRoute.name', source: 'Route Name' }, { - node: 'navigation.currentRoute.waypoints', + node: 'navigation.course.activeRoute.waypoints', filter: n2k => { return !_.isUndefined(n2k.fields.list) }, From 57a5d414e7f1987190ae25702d5583ec63270bfb Mon Sep 17 00:00:00 2001 From: panaaj <38519157+panaaj@users.noreply.github.com> Date: Wed, 29 Jun 2022 11:05:49 +0930 Subject: [PATCH 2/4] 129284 update path names --- pgns/129284.js | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/pgns/129284.js b/pgns/129284.js index b73b0056..41c2d4b5 100644 --- a/pgns/129284.js +++ b/pgns/129284.js @@ -16,9 +16,16 @@ module.exports = [ { node: function (n2k, state) { return ( - 'navigation.course' + - calculationType(n2k, state) + - '.bearingTrack' + + 'navigation.course.calcValues.calcMethod' + + calculationType(n2k, state) + ) + }, + source: 'Calculation Type' + }, + { + node: function (n2k, state) { + return ( + 'navigation.course.calcValues.bearingTrack' + n2k.fields['Course/Bearing reference'] ) }, @@ -27,9 +34,7 @@ module.exports = [ { node: function (n2k, state) { return ( - 'navigation.course' + - calculationType(n2k, state) + - '.nextPoint.distance' + 'navigation.course.calcValues.distance' ) }, source: 'Distance to Waypoint' @@ -37,9 +42,7 @@ module.exports = [ { node: function (n2k, state) { return ( - 'navigation.course' + - calculationType(n2k, state) + - '.nextPoint.velocityMadeGood' + 'navigation.course.calcValues.velocityMadeGood' ) }, source: 'Waypoint Closing Velocity' @@ -47,9 +50,7 @@ module.exports = [ { node: function (n2k, state) { return ( - 'navigation.course' + - calculationType(n2k, state) + - '.nextPoint.bearing' + + 'navigation.course.calcValues.bearing' + n2k.fields['Course/Bearing reference'] ) }, @@ -58,9 +59,7 @@ module.exports = [ { node: function (n2k, state) { return ( - 'navigation.course' + - calculationType(n2k, state) + - '.nextPoint.position' + 'navigation.course.nextPoint.position' ) }, value: function (n2k) { @@ -72,7 +71,7 @@ module.exports = [ }, { node: function (n2k) { - return 'navigation.course' + calculationType(n2k) + '.nextPoint.timeToGo' + return 'navigation.course.calcValues.timeToGo' }, filter: function (n2k) { return n2k.fields['ETA Date'] && n2k.fields['ETA Time'] From 1731ea186c29b5a2169ec8ad274bc0fa06c82095 Mon Sep 17 00:00:00 2001 From: panaaj <38519157+panaaj@users.noreply.github.com> Date: Wed, 29 Jun 2022 11:09:26 +0930 Subject: [PATCH 3/4] 129283 update XTE path --- pgns/129283.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pgns/129283.js b/pgns/129283.js index 7a6bd57a..b40af403 100644 --- a/pgns/129283.js +++ b/pgns/129283.js @@ -4,9 +4,7 @@ module.exports = [ { node: function (n2k, state) { return ( - 'navigation.course' + - state.lastCourseCalculationType + - '.crossTrackError' + 'navigation.course.calcValues.crossTrackError' ) }, filter: function (n2k, state) { From f65125d8ef92da6543f9f88c0c3d5afcf383ed8c Mon Sep 17 00:00:00 2001 From: panaaj <38519157+panaaj@users.noreply.github.com> Date: Wed, 29 Jun 2022 11:13:21 +0930 Subject: [PATCH 4/4] chore: update test paths --- test/129283_xte.js | 6 +++--- test/129284_navigation_data.js | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/test/129283_xte.js b/test/129283_xte.js index 75c14c1f..6dc742e7 100644 --- a/test/129283_xte.js +++ b/test/129283_xte.js @@ -23,7 +23,7 @@ describe('129283 cross track error', function () { ) tree.should.have.nested.property( - 'navigation.courseGreatCircle.crossTrackError.value', + 'navigation.course.calcValues.crossTrackError.value', -5.63 ) tree.should.be.validSignalKVesselIgnoringIdentity @@ -37,7 +37,7 @@ describe('129283 cross track error', function () { {} ) tree.should.not.have.nested.property( - 'navigation.courseGreatCircle.crossTrackError.value' + 'navigation.course.calcValues.crossTrackError.value' ) tree.should.be.validSignalKVesselIgnoringIdentity }) @@ -50,7 +50,7 @@ describe('129283 cross track error', function () { null ) tree.should.not.have.nested.property( - 'navigation.courseGreatCircle.crossTrackError.value' + 'navigation.course.calcValues.crossTrackError.value' ) tree.should.be.validSignalKVesselIgnoringIdentity }) diff --git a/test/129284_navigation_data.js b/test/129284_navigation_data.js index 56b2f319..d0253caf 100644 --- a/test/129284_navigation_data.js +++ b/test/129284_navigation_data.js @@ -12,31 +12,31 @@ describe('129284 Navigation Data', function () { ) var tree = mapper.toNested(msg) tree.should.have.nested.property( - 'navigation.courseGreatCircle.bearingTrackTrue.value', + 'navigation.course.calcValues.bearingTrackTrue.value', 2.6435 ) tree.should.have.nested.property( - 'navigation.courseGreatCircle.nextPoint.velocityMadeGood.value', + 'navigation.course.calcValues.velocityMadeGood.value', 0.06 ) tree.should.have.nested.property( - 'navigation.courseGreatCircle.nextPoint.distance.value', + 'navigation.course.calcValues.distance.value', 1910.38 ) tree.should.have.nested.property( - 'navigation.courseGreatCircle.nextPoint.bearingTrue.value', + 'navigation.course.calcValues.bearingTrue.value', 2.7651 ) tree.should.have.nested.property( - 'navigation.courseGreatCircle.nextPoint.position.value.latitude', + 'navigation.course.nextPoint.position.value.latitude', 60.1366607 ) tree.should.have.nested.property( - 'navigation.courseGreatCircle.nextPoint.position.value.longitude', + 'navigation.course.nextPoint.position.value.longitude', 24.9068518 ) tree.should.have.nested.property( - 'navigation.courseGreatCircle.nextPoint.timeToGo.value', + 'navigation.course.calcValues.timeToGo.value', 31360.412 ) tree.should.be.validSignalKVesselIgnoringIdentity