Least-squares technique for determining principal plane location and focal length