OpenMarine
Data connetion from a OFNI - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1)
+--- Forum: How do I...? (https://forum.openmarine.net/forumdisplay.php?fid=3)
+--- Thread: Data connetion from a OFNI (/showthread.php?tid=4473)



Data connetion from a OFNI - fzamacolam@gmail.com - 2023-02-11

Hi all, and thank you so much for this project.

I'm trying to build a sensor that in case of MOB sends to the vessel its position. I'm receiving its position througt a NMEA0183 TCP Client Data Connection in my SignalK. 

The question is: how can I tell to SignalK that the position corresponds to other Vessel or flotant object? (in this case is a MOB).

Thanks a lot!


RE: Data connetion from a OFNI - Sailoog - 2023-02-14

you have to send this delta message to the signal k server:

Code:
{
  "context": "vessels.urn:mrn:signalk:uuid:c0d79334-4e25-4245-8892-54e8ccc8021d",
  "updates": [
    {
      "source": {...},
      "timestamp": "2017-08-15T16:00:05.200Z",
      "values": [
        {
          "path": "notifications.mob",
          "value": {
            "message": "MOB",
            "state": "emergency",
            "method": ["visual", "sound"]
          }
        }
      ]
    }
  ]
}

"context" is the unique identification of the floating object. You can also use the mmsi:

Code:
"context": "vessels.urn:mrn:imo:mmsi:234567890"

more info:

https://signalk.org/specification/1.7.0/doc/data_model.html

https://signalk.org/specification/1.7.0/doc/notifications.html