void IGCWriter::header(const BrokenDateTime &DateTime, const TCHAR *pilot_name, const TCHAR *aircraft_model, const TCHAR *aircraft_registration, const TCHAR *strAssetNumber, const TCHAR *driver_name) { char datum[] = "HFDTM100Datum: WGS-84"; char temp[100]; // Flight recorder ID number MUST go first.. sprintf(temp, "AXCS%c%c%c", (char)strAssetNumber[0], (char)strAssetNumber[1], (char)strAssetNumber[2]); writeln(temp); sprintf(temp, "HFDTE%02u%02u%02u", DateTime.day, DateTime.month, DateTime.year % 100); writeln(temp); if (!Simulator) writeln(GetHFFXARecord()); write_tstring("HFPLTPILOT:", pilot_name); write_tstring("HFGTYGLIDERTYPE:", aircraft_model); write_tstring("HFGIDGLIDERID:", aircraft_registration); write_tstring("HFFTYFR TYPE:XCSOAR,XCSOAR ", XCSoar_VersionStringOld); write_tstring("HFGPS: ", driver_name); writeln(datum); if (!Simulator) writeln(GetIRecord()); }
void IGCWriter::WriteHeader(const BrokenDateTime &date_time, const TCHAR *pilot_name, const TCHAR *aircraft_model, const TCHAR *aircraft_registration, const TCHAR *competition_id, const char *logger_id, const TCHAR *driver_name, bool simulator) { /* * HFDTE141203 <- should be UTC, same as time in filename * HFFXA100 * HFPLTPILOT:JOHN WHARINGTON * HFGTYGLIDERTYPE:LS 3 * HFGIDGLIDERID:VH-WUE * HFDTM100GPSDATUM:WGS84 * HFRFWFIRMWAREVERSION:3.6 * HFRHWHARDWAREVERSION:3.4 * HFFTYFR TYPE:GARRECHT INGENIEURGESELLSCHAFT,VOLKSLOGGER 1.0 * HFCIDCOMPETITIONID:WUE * HFCCLCOMPETITIONCLASS:FAI */ assert(date_time.Plausible()); assert(logger_id != NULL); assert(strlen(logger_id) == 3); char buffer[100]; // Flight recorder ID number MUST go first.. sprintf(buffer, "AXCS%s", logger_id); WriteLine(buffer); sprintf(buffer, "HFDTE%02u%02u%02u", date_time.day, date_time.month, date_time.year % 100); WriteLine(buffer); if (!simulator) WriteLine(GetHFFXARecord()); WriteLine("HFPLTPILOT:", pilot_name); WriteLine("HFGTYGLIDERTYPE:", aircraft_model); WriteLine("HFGIDGLIDERID:", aircraft_registration); WriteLine("HFCIDCOMPETITIONID:", competition_id); WriteLine("HFFTYFRTYPE:XCSOAR,XCSOAR ", XCSoar_VersionStringOld); WriteLine("HFGPS:", driver_name); WriteLine("HFDTM100DATUM:WGS-84"); WriteLine(GetIRecord()); }