# UI with selectable AIS ship target list

**URL:** <https://discourse.nodered.org/t/ui-with-selectable-ais-ship-target-list/46001>\
**Category:** Dashboard\
**Created:** [20 May 2021 20:03 UTC](https://discourse.nodered.org/t/ui-with-selectable-ais-ship-target-list/46001 "2021-05-20T20:03:11Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![AlbBue](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/albbue/32/42126_2.png) [@AlbBue](https://discourse.nodered.org/u/AlbBue)\
**Post date:** [20 May 2021 20:03 UTC](https://discourse.nodered.org/t/ui-with-selectable-ais-ship-target-list/46001/1 "2021-05-20T20:03:12Z")

</div>

Hello,  
I am trying to create a Dashboard, where I can pick a ship/target from a drop-down list and display it's data...  
So far I set up a tcp:port where I receive AIS-NMEA data constantly. The "ais"-node transforms the data into readable json format (Objects?). The AIS data is sent every few seconds from several vessels (each has a specific time slot). If I want to select the data from just one special ship, l need to filter the incoming data, e.g. by ships name (or "mmsi")...  
... additionally there might be new ships coming into range and might be added to the list and ships leaving the range should be deleted from the list... (the date and time of the entry could be a trigger...)

I was thinking I store the incoming data into a file. e.g.:

```auto
{"mmsi":211667760,"navigationStatus":"Under way using engine","rateOfTurn":0,"speedOverGround":0,"longitude":9.920658333333334,"latitude":53.54305333333333,"courseOverGround":290,"trueHeading":268,"timeStampSeconds":14,"date":1621533253342,"isoDate":"2021-05-20 17:54:13","source":"!AIVDM,1,1,,A,139o;<0000PeJLFN`kR;E8HL0@7h,0*7A\r\n"}
{"mmsi":211667590,"navigationStatus":"Under way using engine","rateOfTurn":0,"speedOverGround":0.5,"longitude":9.921221666666666,"latitude":53.543015,"courseOverGround":254.7,"trueHeading":275,"timeStampSeconds":17,"date":1621533256452,"isoDate":"2021-05-20 17:54:16","source":"!AIVDM,1,1,,A,139o:QP0000eJVrN`kLItpVR0H9T,0*17\r\n"}
{"mmsi":211626350,"navigationStatus":"Under way using engine","rateOfTurn":0,"speedOverGround":0.1,"longitude":9.921696666666667,"latitude":53.543083333333335,"courseOverGround":293.2,"trueHeading":271,"timeStampSeconds":20,"date":1621533260219,"isoDate":"2021-05-20 17:54:20","source":"!AIVDM,1,1,,A,139laKP0010eJglN`kVcM8N`0<52,0*0E\r\n"}

```

Is there a node, which can update one entry if e.g. the mmsi already exists in the list and adds a new entry if there is none yet? Or do I have to write a code for this (I am unfortunately not yet familiar with programming in java language)...

... then I was trying to extract the data from the file and was looking for filter-nodes. For example I would like to get the speedOverGround- Value displayed of one and the same ship... I tried some scripting in the function node e.g. "for string in file...." but was not very successful...  
... well... if the file would be updated constantly there would be on entry per mmsi only anyway...

---

_[View the full topic](https://discourse.nodered.org/t/ui-with-selectable-ais-ship-target-list/46001)._
