Follow-me script for AIS boats?

I think the scripting section would be the right place for this question.

Anybody made an option for a follow-me - with a Copter on an AIS target? I would like to follow a ship on a it’s heading, speed and distance keeping same altitude? I would like to fly next to a ship, upwind/downwind, and follow the ship until next command like RTH.

I found the item AIS (for boats) so the dAISy2 is already connected to Ardupilot.