Hey Sbmech. Are you getting the (X,Y) coordinates out of the sonar autonomously? if so it would seem relatively easy to setup a local coordinate system, just set the object as (0,0).
The hard part of this is getting the data out of the sonar. to tell you range and bearing, and processing it in real time. How are you accomplishing this? and if you can do this why would you use pixhawk? just tack controls on the computer thats giving you that data.