aisstream / issues

7 stars 3 forks source link

[Feature request] Add type filter #21

Open sgofferj opened 1 year ago

sgofferj commented 1 year ago

Hi!

I'm currently working on creating a middleware to feed aisstream.io data into TAK servers. I have implemented a type filter on the client side but I think it would be useful if it would be possible to add a type filter in the initial request. That would reduce load on the client as well as traffic on your servers. Your server would then only stream data of ships of the requested AIS type.

Example:

let subscriptionMessage = {
    Apikey: apiKey,
    BoundingBoxes: [[[-90, -180], [90, 180]]],
    TypeFilter: [35,55,59]
}
aisstream commented 1 year ago

We are looking to add this and a filter on mmsi in early summer.

Thank you for the suggestion. If there is anything else you would like to see please reach out again. We aim to release a more concrete roadmap soon.

aisstream commented 1 year ago

Hello we have added the following new features which should address this issue!

  1. Subscription MMSI filters. Users can now only receive messages from the vessels they choose by specifying a list of MMSIs in the FilterShipMMSI subscription property when setting their subscription.

  2. Subscription message type filters. Users can now only receive messages of the types they choose by specifying a list of aisstream.io message types in the FilterMessageTypes subscription property when setting their subscription.

You are now able to specify which message types you want to receive data for!

sgofferj commented 1 year ago

Cool! However, I was referring to the AIS vessel type, e.g. 35 for military, 36, for sailing, 37 for pleasure craft, etc.