This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Log substitute using the GPS from Moitisier HAT 2
#8
Niklun, this might be what you  are looking for, the derived data plugin calculates ground wind speed & direction based on sog & cog and sends it as environment.wind.angleTrueGround and environment.wind.speedOverGround. Then I have some node red which takes the values of thos and sends them as environment.wind.speedTrue and environment.wind.angleTrueWater.

Code:
[
   {
       "id": "566b4bb6.eac0a4",
       "type": "signalk-subscribe",
       "z": "750594de.8e494c",
       "name": "environment.wind.speedOverGround",
       "mode": "sendAll",
       "flatten": true,
       "context": "vessels.self",
       "path": "environment.wind.speedOverGround",
       "source": "",
       "period": 1000,
       "x": 240,
       "y": 1040,
       "wires": [
           [
               "f784a4c3.41c338"
           ]
       ]
   },
   {
       "id": "8334969e.d3b278",
       "type": "signalk-send-pathvalue",
       "z": "750594de.8e494c",
       "name": "",
       "source": "",
       "x": 990,
       "y": 1020,
       "wires": []
   },
   {
       "id": "f784a4c3.41c338",
       "type": "function",
       "z": "750594de.8e494c",
       "name": "environment.wind.speedTrue",
       "func": "msg.topic = \"environment.wind.speedTrue\";\nreturn msg;",
       "outputs": 1,
       "noerr": 0,
       "x": 620,
       "y": 1060,
       "wires": [
           [
               "8334969e.d3b278"
           ]
       ]
   },
   {
       "id": "76df8946.05b5e8",
       "type": "signalk-subscribe",
       "z": "750594de.8e494c",
       "name": "environment.wind.angleTrueGround",
       "mode": "sendAll",
       "flatten": true,
       "context": "vessels.self",
       "path": "environment.wind.angleTrueGround",
       "source": "",
       "period": 1000,
       "x": 240,
       "y": 1100,
       "wires": [
           [
               "c10abcac.64d97"
           ]
       ]
   },
   {
       "id": "c10abcac.64d97",
       "type": "function",
       "z": "750594de.8e494c",
       "name": "environment.wind.angleTrueWater",
       "func": "msg.topic = \"environment.wind.angleTrueWater\";\nreturn msg;",
       "outputs": 1,
       "noerr": 0,
       "x": 640,
       "y": 1100,
       "wires": [
           [
               "cd2581b1.513c6"
           ]
       ]
   },
   {
       "id": "cd2581b1.513c6",
       "type": "signalk-send-pathvalue",
       "z": "750594de.8e494c",
       "name": "",
       "source": "",
       "x": 990,
       "y": 1080,
       "wires": []
   }
]

Then set signalk to nmea plugin to create VWT sentence and opencpn recognizes that.
Reply


Messages In This Thread
RE: Log substitute using the GPS from Moitisier HAT 2 - by PaddyB - 2020-11-11, 07:38 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)