math - to determine if an azimuth is between two given azimuths -


azimuth angle line makes between north pole/axis , itself. can vary 0 degree 360 if rotated in circular path. lets have 2 such azimuths, alpha , beta. wish determine of azimuth ,say gamma, falls between 2 azimuths alpha , beta.

can please me out simple algorithm or formula used in excel determine if line corresponding gamma between 2 lines corresponding alpha , beta. gamma can assume different values.

thanks

gamma between 2 lines corresponding alpha , beta when both expressions:

ag = atan2(cos(a)*sin(g)-sin(a)*cos(g), cos(a)*cos(g)+sin(a)*sin(g)) gb = atan2(cos(g)*sin(b)-sin(g)*cos(b), cos(g)*cos(b)+sin(g)*sin(b)) 

- have same sign,
- (probably important - both values lie in range [0..pi] or [-pi..0]),
- , sum equal to

ab = atan2(cos(a)*sin(b)-sin(a)*cos(b), cos(a)*cos(b)+sin(a)*sin(b)) 

these expressions angles between azimuths, taking account possible angle wrapping around 360


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -