I want to make a function that calculate the angle between the user and one point of interest (POI) with reference to the true north.
I already have the longitude and latitude of my position and the POI position and now i need the angle between them.
Here is what i have:
private float calcAzimuth1(float lat0, float long0, float lat1, float long1)
{
//user's latitude and longitude
float userLat = (float) ((lat0 * ((float)Math.PI))/180);
float userLong = (float) ((long0 * ((float)Math.PI))/180);
//POI's latitude and longitude
float latT1 = (float) ((lat1 * ((float)Math.PI))/180);
float longT1 = (float) ((long1 * ((float)Math.PI))/180);
//angle between them
float angle=??}