예제 #1
0
void
FormatIGCTaskTurnPoint(char *buffer, const GeoPoint &location,
                       const TCHAR *name)
{
  char *p = buffer;
  *p++ = 'C';
  p = FormatIGCLocation(p, location);
  CopyASCIIUpper(p, name);
}
예제 #2
0
void
IGCWriter::LogPoint(const IGCFix &fix, int epe, int satellites)
{
    char b_record[500];
    char *p = b_record;

    sprintf(p, "B%02d%02d%02d", fix.time.hour, fix.time.minute, fix.time.second);
    p += strlen(p);

    p = FormatIGCLocation(p, fix.location);

    sprintf(p, "%c%05d%05d%03d%02d",
            fix.gps_valid ? 'A' : 'V',
            NormalizeIGCAltitude(fix.pressure_altitude),
            NormalizeIGCAltitude(fix.gps_altitude),
            epe, satellites);

    WriteLine(b_record);
}
예제 #3
0
void
IGCWriter::AddDeclaration(const GeoPoint &location, const TCHAR *id)
{
    char c_record[500];
    char id_string[MAX_PATH];
    int i;

    TCHAR tmpstring[MAX_PATH];
    _tcscpy(tmpstring, id);
    _tcsupr(tmpstring);
    for (i = 0; i < (int)_tcslen(tmpstring); i++)
        id_string[i] = (char)tmpstring[i];

    id_string[i] = '\0';

    char *p = c_record;
    *p++ = 'C';
    p = FormatIGCLocation(p, location);
    strcpy(p, id_string);

    WriteLine(c_record);
}