Added position angle calculation to plane fitting procedure