ran into a little problem with Automation's Navigate from file. Problem deals with calculating an offset heading to add to the sub's current heading so that the sub will head to the current/new waypoint. The waypoints are stored in a file as x,y meters from game origin (I added a new order to the nav officer's order bar that will show the sub's current position in the messagebox so that one can 'plot' a pattern/navigation). The code gets the sub's current fix as x,y meters from game origin. It then calculates the distance between the sub's fix and the current waypoint. That part is fine - distance shows perfect. The problem is this offset heading. When the sub is < 250m from the waypoint or when the half distance to the waypoint is reached it's supposed to calculate the offset to add to the current heading to keep it heading to the current/new waypoint. Something is wrong with my math and I'm not sure what it is. What would the formula be for calculating this offset given sub's current heading, current fix (x,y) and current waypoint (x,y)?? Using trig I tried using offset = atan2( fix.X - waypoint.X / fix.Y - waypoint.Y ) and adding this offset to the sub's current heading. Everything works fine as long as the waypoint is north of the sub. Any waypoints to the west or east are screwed up