igc.cc
changeset 23 8396f7857013
parent 13 c5ee81217f70
child 26 4d79c3f357ad
equal deleted inserted replaced
22:fa3d7ce5d0a7 23:8396f7857013
    22 			s.insert(4, "20"); // FIXME: current year?
    22 			s.insert(4, "20"); // FIXME: current year?
    23 		    date_ = QDate::fromString(s, "ddMMyyyy");
    23 		    date_ = QDate::fromString(s, "ddMMyyyy");
    24 		    }
    24 		    }
    25 		}
    25 		}
    26 		break;
    26 		break;
    27 	    case 'B': 
    27 	    case 'B':  {
    28 		fixes_ << in.readLine(); 
    28 		Fix fix(in.readLine());
       
    29 		if (!fixes_.count()) start_ = fix;
       
    30 		landing_ = fix;
       
    31 		fixes_ << fix;
       
    32 		}
    29 		break;
    33 		break;
    30 	    default:
    34 	    default:
    31 		(void) in.readLine();
    35 		(void) in.readLine();
    32 	}
    36 	}
    33     }
    37     }
    41     pos += 6;	
    45     pos += 6;	
    42 
    46 
    43     gps_.lat = s.mid(pos, 8); pos += 8;	// DDMMmmm[NS]
    47     gps_.lat = s.mid(pos, 8); pos += 8;	// DDMMmmm[NS]
    44     gps_.lon = s.mid(pos, 9); pos += 9;	// DDDMMmmm[EW]
    48     gps_.lon = s.mid(pos, 9); pos += 9;	// DDDMMmmm[EW]
    45 
    49 
    46     fix3d_ = s.mid(pos, 1) == "A"; 
    50     is3d_ = s.mid(pos, 1) == "A"; 
    47     pos += 1;
    51     pos += 1;
    48 
    52 
    49     alt_.baro = s.mid(pos, 5).toInt(); pos += 5;
    53     alt_[baro] = s.mid(pos, 5).toInt(); pos += 5;
    50     alt_.gps = s.mid(pos, 5).toInt(); pos += 5;
    54     alt_[gps]  = s.mid(pos, 5).toInt(); pos += 5;
    51 }
    55 }