I don't see magic caring if the ship moved or not, though a case could be made (rather easily) that a ship is not a location, but in fact a really big object (which is the case for people saying you end up in the sea).
So basically it comes down to is a ship an object or a location or both? Then another question becomes how big does a vehicle need to be to be considered a location? Does a sailing ship qualify? A war ship? A galley? How about a canoe? Or a raft?
Just for simplicities sake, I'd lean towards the ship being an object, which means some sort of divination would be required to find it before teleporting.
So basically it comes down to is a ship an object or a location or both? Then another question becomes how big does a vehicle need to be to be considered a location? Does a sailing ship qualify? A war ship? A galley? How about a canoe? Or a raft?
Just for simplicities sake, I'd lean towards the ship being an object, which means some sort of divination would be required to find it before teleporting.