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

Diff of /xlog/src/wwl.c

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

revision 1.10 by pa4tu, Sun Apr 18 14:17:33 2004 UTC revision 1.11 by pa4tu, Sat Oct 30 08:51:12 2004 UTC
# Line 218  wwl (gchar * my, gchar * dx) Line 218  wwl (gchar * my, gchar * dx)
218    
219          p = (gint) (atan (sqrt (d) / c) * 6371.33) + .5;          p = (gint) (atan (sqrt (d) / c) * 6371.33) + .5;
220          if (p < 0) p = 20002 + p;          if (p < 0) p = 20002 + p;
221          m = (gint) (p * 1.609);          if (p < 1) p = 0;
222            m = (gint) (p / 1.609);
223    
224          if (preferences.units == 1)          if (p != 0)
225                  result = g_strdup_printf (_("Distance: %d km, azimuth: %d deg"), p, l);          {
226          else                  if (preferences.units == 1)
227                  result = g_strdup_printf (_("Distance: %d m, azimuth: %d deg"), m, l);                          result = g_strdup_printf (_("Distance: %d km, azimuth: %d deg"), p, l);
228                    else
229                            result = g_strdup_printf (_("Distance: %d m, azimuth: %d deg"), m, l);
230            }
231            else result = g_strdup ("");
232          return (result);          return (result);
233  }  }
234    

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

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