Java Reference
In-Depth Information
You must convert these coordinates to radians before you can use them effectively in the formula. After conversion,
the coordinates become
• Nashville:
1
36.12°
0.6304 rad,
l
86.67°
1.5127 rad
1
• Los Angeles:
2
33.94°
0.5924 rad,
l
118.40°
2.0665 rad
2
Using these values in the angular distance equation, you get
r
¢ s =
6372.795
*
0.45306
=
2887.259
km
Thus, the distance between these cities is about 2887 km, or 1794 miles. (Note: To solve this problem, you will need
to use the Math.acos method, which returns an arccosine angle in radians.)
Search WWH ::




Custom Search