436 |
gtk_label_set_text(GTK_LABEL(context->gotoc.bearing_label), "-----"); |
gtk_label_set_text(GTK_LABEL(context->gotoc.bearing_label), "-----"); |
437 |
} |
} |
438 |
|
|
439 |
float epe = gps_get_epe(context->appdata); |
float eph = gps_get_eph(context->appdata); |
440 |
if(isnan(epe)) |
if(isnan(eph)) |
441 |
gtk_label_set_text(GTK_LABEL(context->gotoc.epe_label), "-----"); |
gtk_label_set_text(GTK_LABEL(context->gotoc.eph_label), "-----"); |
442 |
else { |
else { |
443 |
char str[16]; |
char str[16]; |
444 |
distance_str(str, sizeof(str), epe, context->appdata->imperial); |
/* distance needs to be given in km */ |
445 |
gtk_label_set_text(GTK_LABEL(context->gotoc.epe_label), str); |
if(context->appdata->imperial) |
446 |
|
eph /= (6371.0/3959.0); // km to miles |
447 |
|
|
448 |
|
distance_str(str, sizeof(str), eph/1000.0, context->appdata->imperial); |
449 |
|
gtk_label_set_text(GTK_LABEL(context->gotoc.eph_label), str); |
450 |
} |
} |
451 |
|
|
452 |
return TRUE; // fire again |
return TRUE; // fire again |
686 |
gtk_table_attach_defaults(GTK_TABLE(table), |
gtk_table_attach_defaults(GTK_TABLE(table), |
687 |
gtk_label_new(_("Est. error:")), 0,1,6,7); |
gtk_label_new(_("Est. error:")), 0,1,6,7); |
688 |
gtk_table_attach_defaults(GTK_TABLE(table), |
gtk_table_attach_defaults(GTK_TABLE(table), |
689 |
(context->gotoc.epe_label = gtk_label_new("-----")), 1,2,6,7); |
(context->gotoc.eph_label = gtk_label_new("-----")), 1,2,6,7); |
690 |
|
|
691 |
gtk_table_set_row_spacing(GTK_TABLE(table), 6, 16); |
gtk_table_set_row_spacing(GTK_TABLE(table), 6, 16); |
692 |
|
|