Answered You can hire a professional tutor to get the answer.
How would I enter this into Java? I cannot even get PI in there. Am I supposed to type it out?
How would I enter this into Java? I cannot even get PI in there. Am I supposed to type it out? I'm calculating the distance between a fixed point and any latitude and longitude in the world. The result has to show in degrees, not miles. PI= 3.14159 When I say OVER that means it's a quotient. I have NO CLUE how what atan2 is and cannot figure out for the life of me how to make sin and cos work.
/* Calculate latitude = (degrees + minutes OVER 60) PI OVER 180 */
/* Calculate direction = atan2( sin(longitude - gboroLong) * cos( latitude ) , cos(gboroLat) * sin( latitude ) - sin(gboroLat) * cos( latitude ) * cos( longitude - gboroLong) )*/
/* Convert the direction in radians to degrees by longitude = (degrees + minutes OVER 60) PI OVER 180 */
/* Display the direction in degrees */