182 |
|
|
183 |
Delta_Long = DEST_Long - QTH_Long; |
Delta_Long = DEST_Long - QTH_Long; |
184 |
|
|
185 |
tmp = (sin (QTH_Lat) * sin (DEST_Lat)) + (cos (QTH_Lat) * cos (DEST_Lat) * cos (Delta_Long)); |
tmp = (sin (QTH_Lat) * sin (DEST_Lat)) + |
186 |
|
(cos (QTH_Lat) * cos (DEST_Lat) * cos (Delta_Long)); |
187 |
|
|
188 |
if (tmp > .999999) |
if (tmp > .999999) |
189 |
{ |
{ |
216 |
distlp = ((Units[units].miles) * 360.0) - distsp; |
distlp = ((Units[units].miles) * 360.0) - distsp; |
217 |
} |
} |
218 |
|
|
219 |
cosaz = (sin (DEST_Lat) - (sin (QTH_Lat) * cos (arc))) / (sin (arc) * cos (QTH_Lat)); |
cosaz = (sin (DEST_Lat) - |
220 |
|
(sin (QTH_Lat) * cos (arc))) / (sin (arc) * cos (QTH_Lat)); |
221 |
|
|
222 |
if (cosaz > .999999) |
if (cosaz > .999999) |
223 |
az = 0.0; |
az = 0.0; |
240 |
} |
} |
241 |
|
|
242 |
/* Computations complete, show answer */ |
/* Computations complete, show answer */ |
243 |
result = g_strdup_printf (_("\nShort Path: %03.0f deg, %.0f %s\nLong Path: %03.0f deg, %.0f %s\n"), |
result = g_strdup_printf |
244 |
|
(_("\nShort Path: %03.0f deg, %.0f %s\nLong Path: %03.0f deg, %.0f %s\n"), |
245 |
azsp, distsp, Units[units].text, azlp, distlp, Units[units].text); |
azsp, distsp, Units[units].text, azlp, distlp, Units[units].text); |
246 |
return (result); |
return (result); |
247 |
} |
} |