Beispiel #1
0
static void write_trk_waypt(const waypoint *wpt)
{
	fwrite_double(file_out, wpt->latitude);
	fwrite_double(file_out, wpt->longitude);
	fwrite_long(file_out, wpt->creation_time-EPOCH89DIFF);
	fwrite_byte(file_out, start_new);
	if (wpt->altitude == unknown_alt)
		fwrite_single(file_out, unknown_alt_gtm);
	else
		fwrite_single(file_out, wpt->altitude);
	start_new = 0;
}
Beispiel #2
0
void estim_report_event_t::print_byte_descr(FILE* f) {
  fwrite_int64 (f, (int64_t) estim);
  fwrite_int64 (f, (int64_t) comp);
  // TODO: fix double bits: fwrite_double (f, elapsed); 
  fwrite_int64 (f, (int64_t) (1000.0 * elapsed));
  fwrite_double (f, newcst);
}
Beispiel #3
0
static void write_rte_waypt(const waypoint *wpt)
{
	fwrite_double(file_out, wpt->latitude);
	fwrite_double(file_out, wpt->longitude);
	fwrite_fixedstring(file_out, wpt->shortname, 10);
	fwrite_string(file_out, wpt->description);
	fwrite_string(file_out, rte_active->rte_name);
	fwrite_integer(file_out, icon_from_descr(wpt->icon_descr));
	fwrite_byte(file_out, 3);
	fwrite_byte(file_out, start_new);
	fwrite_long(file_out, 0);
	fwrite_integer(file_out, 0);
	if (wpt->altitude == unknown_alt)
		fwrite_single(file_out, unknown_alt_gtm);
	else
		fwrite_single(file_out, wpt->altitude);
	fwrite_integer(file_out, 0);
	start_new = 0;
}
Beispiel #4
0
static void write_waypt(const waypoint *wpt)
{
	fwrite_double(file_out, wpt->latitude);
	fwrite_double(file_out, wpt->longitude);
	fwrite_fixedstring(file_out, wpt->shortname, 10);
	fwrite_string(file_out, wpt->description);
	fwrite_integer(file_out, icon_from_descr(wpt->icon_descr));
	fwrite_byte(file_out, 3);
	if (wpt->creation_time)
		fwrite_long(file_out, wpt->creation_time-EPOCH89DIFF);
	else
		fwrite_long(file_out, 0);
	fwrite_integer(file_out, 0);
	if (wpt->altitude == unknown_alt)
		fwrite_single(file_out, unknown_alt_gtm);
	else
		fwrite_single(file_out, wpt->altitude);
	fwrite_integer(file_out, 0);
}
Beispiel #5
0
void estim_predict_event_t::print_byte_descr(FILE* f) {
  fwrite_int64 (f, (int64_t) estim);
  fwrite_int64 (f, (int64_t) comp);
  fwrite_double (f, time);
}
Beispiel #6
0
void estim_update_event_t::print_byte_descr(FILE* f) {
  fwrite_int64 (f, (int64_t) estim);
  fwrite_double (f, newcst);
}
Beispiel #7
0
void interrupt_event_t::print_byte_descr(FILE* f) {
  fwrite_double (f, elapsed);
}