Skip to content

Commit

Permalink
Merge branch 'master' into delta-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sbender9 authored Jul 16, 2024
2 parents 1b2a878 + 7e38320 commit fc90753
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions conversions/ais.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ module.exports = (app, plugin) => {
{"path":"navigation.state","value":"motoring"},
{"path":"navigation.destination.commonName","value":"BALTIMORE"},
{"path":"sensors.ais.fromBow","value":9},
{"path":"sensors.ais.fromCenter","value":0},
{"path": "design.draft", "value": { "maximum": 4.2 }},
{"path": "design.length","value": {"overall": 30}},
{"path": "design.aisShipType", "value": {"id": 52, "name": "Tug"}},
Expand Down Expand Up @@ -147,6 +148,7 @@ module.exports = (app, plugin) => {
"Length": 30,
"Beam": 7,
"Position reference from Bow": 9,
"Position reference from Starboard": 3.5,
"Draft": 4.2,
"Destination": "BALTIMORE",
"AIS version indicator": "ITU-R M.1371-1",
Expand Down Expand Up @@ -242,7 +244,7 @@ function generateStatic(vessel, mmsi, delta) {
}

var fromStarboard
if ( beam && !_.isUndefined(fromCenter) ) {
if ( !_.isUndefined(beam) && !_.isUndefined(fromCenter) ) {
fromStarboard = (beam / 2 + fromCenter)
}
fromBow = fromBow ? fromBow : undefined
Expand Down Expand Up @@ -412,7 +414,7 @@ function generateAtoN(vessel, mmsi, delta) {
*/

var fromStarboard
if ( beam && fromCenter ) {
if ( !_.isUndefined(beam) && !_.isUndefined(fromCenter) ) {
fromStarboard = (beam / 2 + fromCenter)
}
fromBow = fromBow ? fromBow * 10 : undefined
Expand Down

0 comments on commit fc90753

Please sign in to comment.