Reputation: 3797
What is a generic formula for converting azimuth(from -180 to 180) to degrees(from 0 to 360)?
double azimuth = (Math.toDegrees(matrixValues[0]));
if(azimuth < 0){
azimuth += 360;
}
azimuth -= 90;
if(azimuth < 0){
azimuth += 360;
}
That's what I have tried but it doesn't seemed to work.
Upvotes: 0
Views: 5057
Reputation: 573
There are several conventions for azimuths ("geological", "geohraphical" - clockwise, anticlockwise). What´s wrong with
double azimuth = (Math.toDegrees(matrixValues[0])) + 180.0;
? Seems to do what you request.
Upvotes: 1