/[xlog]/xlog/src/gc.c
ViewVC logotype

Diff of /xlog/src/gc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by pa4tu, Thu Jan 27 16:33:15 2005 UTC revision 1.10 by pa4tu, Mon May 16 19:20:09 2005 UTC
# Line 182  gc (gint units, gchar * qth, gdouble DES Line 182  gc (gint units, gchar * qth, gdouble DES
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          {          {
# Line 215  gc (gint units, gchar * qth, gdouble DES Line 216  gc (gint units, gchar * qth, gdouble DES
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;
# Line 238  gc (gint units, gchar * qth, gdouble DES Line 240  gc (gint units, gchar * qth, gdouble DES
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  }  }

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26