The GPS on board the ship or an internal sensor included in an AIS unit are used to determine your location and movements.