title: how to get angle of any geo location from north in android?
body: <p>In my app i want to calculate the angle of the specific location(lat and longs are given) from the north.is there any way to calculate this.Actually i have find put the direction of the phone but i want to get angle of location from north.here is my code.please suggest any related solution.Thankx</p>
  
  <pre><code>   myAzimuth=Math.round(event.values[0]);
              myPitch=Math.round(event.values[1]);
              myRoll=Math.round(event.values[2]);
           Toast.makeText(this, "Value"+myAzimuth, Toast.LENGTH_SHORT).show();        
          if(myAzimuth&lt;22){
          Toast.makeText(this, "North Direction", Toast.LENGTH_SHORT).show();     
          }
  
            else if (myAzimuth &gt;= 22 &amp;&amp; myAzimuth &lt; 67)
                Toast.makeText(this, "North East", Toast.LENGTH_SHORT).show();        
            else if (myAzimuth &gt;= 67 &amp;&amp; myAzimuth &lt; 112)
                Toast.makeText(this, "East Direction", Toast.LENGTH_SHORT).show();        
            else if (myAzimuth &gt;= 112 &amp;&amp; myAzimuth &lt; 157)
                Toast.makeText(this, "South east Direction", Toast.LENGTH_SHORT).show();      
            else if (myAzimuth &gt;= 157 &amp;&amp; myAzimuth &lt; 202)
                Toast.makeText(this, "South Direction", Toast.LENGTH_SHORT).show();       
            else if (myAzimuth &gt;= 202 &amp;&amp; myAzimuth &lt; 247)
                Toast.makeText(this, "South west Direction", Toast.LENGTH_SHORT).show();      
            else if (myAzimuth &gt;= 247 &amp;&amp; myAzimuth &lt; 292)
                Toast.makeText(this, "west Direction", Toast.LENGTH_SHORT).show();        
            else if (myAzimuth &gt;= 292 &amp;&amp; myAzimuth &lt; 337)
                Toast.makeText(this, "North west Direction", Toast.LENGTH_SHORT).show();      
            else if (myAzimuth &gt;= 337)
                Toast.makeText(this, "North Direction", Toast.LENGTH_SHORT).show();       
  </code></pre>