Element on canvas aligning with element in game

I have a top down scene with ships that controls in a similar manner to the classic Asteroids. I am drawing a vision cone which extends in front of the player controlled ship to mark the area in which they can get a lock-on bonus. The vision cone is being rendered in a canvas as a 2D element.

What is the best way to get the x/y positions of the canvas element to match up with those of the ship? I’m not sure whether I’m doing this in a completely naive way, any advice appreciated.