azimuth angle now counts from north, fixed ray calculation