I am using python and I am having trouble making a script converting an angle with the degree,minutes,seconds given in radiant.
I already tried a few things but I am pretty new so I need help
I am using python and I am having trouble making a script converting an angle with the degree,minutes,seconds given in radiant.
I already tried a few things but I am pretty new so I need help
I think this is what OP is looking for:
import Math as math
radians = "whatever number you want to use in here"
totalSeconds = int(round(radians * 360 * 60 * 60 / (2 * (math.pi)));
seconds = totalSeconds % 60;
minutes = (totalSeconds / 60) % 60;
degrees = totalSeconds / (60 * 60);
Asin returns the arc sine of x, in radians. We also know that there is 2pi radians in a circle. There are 360 degrees in a circle, 60 minutes in a degree, and 60 seconds in a minute.Thus we have 360*60*60 seconds in a circle divided 2 pi to get us the total seconds. After that we can build backwards to get the total minutes and degrees.