calculate relative direction to destination

i am just working on the ranges but not able to define it properly so i need help in defining the ranges if you can do me a favour