- Timestamp:
- Dec 28, 2009, 11:47:08 AM (15 years ago)
- Location:
- trunk/BNC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncmodel.cpp
r2126 r2130 179 179 _nmeaStream = new QTextStream(); 180 180 _nmeaStream->setDevice(_nmeaFile); 181 QDateTime dateTime = QDateTime::currentDateTime().toUTC(); 182 QString nmStr = "GPRMC," + dateTime.time().toString("hhmmss") 183 + "A,0000.0000000,N,00000.0000000,E,0.00,0.00," 184 + dateTime.date().toString("ddMMyy") 185 + ",0.0,E"; 186 187 writeNMEAstr(nmStr); 181 188 } 182 189 } … … 612 619 return 0; 613 620 } 621 622 // 623 //////////////////////////////////////////////////////////////////////////// 624 void bncModel::writeNMEAstr(const QString& nmStr) { 625 626 if (!_nmeaStream) { 627 return; 628 } 629 630 unsigned char XOR = 0; 631 for (int ii = 0; ii < nmStr.length(); ii++) { 632 XOR ^= (unsigned char) nmStr[ii].toAscii(); 633 } 634 635 *_nmeaStream << '$' << nmStr << '*' << hex << (int) XOR << endl; 636 637 _nmeaStream->flush(); 638 } -
trunk/BNC/bncmodel.h
r2125 r2130 73 73 const ColumnVector& vv, 74 74 QMap<QString, t_satData*>& satData); 75 void writeNMEAstr(const QString& nmStr); 75 76 76 77 QByteArray _staID;
Note:
See TracChangeset
for help on using the changeset viewer.