diff -r fa3d7ce5d0a7 -r 8396f7857013 igc.cc --- a/igc.cc Fri Jan 27 17:16:26 2012 +0100 +++ b/igc.cc Fri Jan 27 17:21:51 2012 +0100 @@ -24,8 +24,12 @@ } } break; - case 'B': - fixes_ << in.readLine(); + case 'B': { + Fix fix(in.readLine()); + if (!fixes_.count()) start_ = fix; + landing_ = fix; + fixes_ << fix; + } break; default: (void) in.readLine(); @@ -43,9 +47,9 @@ gps_.lat = s.mid(pos, 8); pos += 8; // DDMMmmm[NS] gps_.lon = s.mid(pos, 9); pos += 9; // DDDMMmmm[EW] - fix3d_ = s.mid(pos, 1) == "A"; + is3d_ = s.mid(pos, 1) == "A"; pos += 1; - alt_.baro = s.mid(pos, 5).toInt(); pos += 5; - alt_.gps = s.mid(pos, 5).toInt(); pos += 5; + alt_[baro] = s.mid(pos, 5).toInt(); pos += 5; + alt_[gps] = s.mid(pos, 5).toInt(); pos += 5; }