I have been wrestling with something similar. I have been trying to use SAS to calculate the angle formed by two flight segments, say Chicago to New York to Dallas. Have yet to be successful. Do you have an angle on the right direction?