You may find the following educational with regards to this:
http://www.roborealm.com/tutorial/FIRST/
Yes, the height will change based on where the target is in the image. Ideally you'd measure right in the center where the distortion is the least ... but if not you'll have to apply some form of distortion to accommodate the border areas.
You should not need to change the focal length once its set. If you can't figure this out post some images with some known distances and we can help check what the issue may be.
STeven.