Changeset 118 in pacpussensors
- Timestamp:
- Jan 13, 2016, 5:30:51 PM (9 years ago)
- Location:
- trunk/Gps
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Gps/gpsComponent.cpp
r99 r118 79 79 80 80 } 81 82 83 void GpsComponent::addOutputs() 84 { 85 addOutput<TimestampedGgaFrame, GpsComponent>("ggaOut"); 86 addOutput<TimestampedVtgFrame, GpsComponent>("vtgOut"); 87 addOutput<TimestampedVtgFrame, GpsComponent>("hdtOut"); 88 } 89 81 90 82 91 … … 221 230 { 222 231 ppsIndex_ = 0; 232 233 outGga_ = getTypedOutput<TimestampedGgaFrame, GpsComponent>("ggaOut"); 234 outVtg_ = getTypedOutput<TimestampedVtgFrame, GpsComponent>("vtgOut"); 235 outHdt_ = getTypedOutput<TimestampedHdtFrame, GpsComponent>("hdtOut"); 236 223 237 224 238 setActive( true ); … … 387 401 ggaFrame.notifyObservers(); 388 402 403 memcpy(&mGga.frame, ggaFrame.getFrameData(), sizeof(trame_gga_dbl)); 404 mGga.time = ggaFrame.getRoadTime(); 405 mGga.timerange = 0; 406 407 // send GGA data to output 408 checkedSend(outGga_, mGga); 409 389 410 if ( (isRecording()) && (ggaRecording) ) { 390 411 if (!(ggahdFile.isOpen())) … … 510 531 sendDataToServerSocket(hdtFrame,type); 511 532 hdtFrame.notifyObservers(); 533 534 memcpy(&mHdt.frame, hdtFrame.getFrameData(), sizeof(trame_hdt)); 535 mHdt.time = hdtFrame.getRoadTime(); 536 mHdt.timerange = 0; 537 538 // send VTG data to output 539 checkedSend(outHdt_, mHdt); 512 540 513 541 if ( (isRecording()) && (hdtRecording) ) … … 591 619 vtgFrame.notifyObservers(); 592 620 621 memcpy(&mVtg.frame, vtgFrame.getFrameData(), sizeof(trame_vtg)); 622 mVtg.time = vtgFrame.getRoadTime(); 623 mVtg.timerange = 0; 624 625 // send VTG data to output 626 checkedSend(outVtg_, mVtg); 627 593 628 if (isRecording() && vtgRecording) { 594 629 if (!vtghdFile.isOpen()) -
trunk/Gps/gpsComponent.h
r99 r118 16 16 #include "Pacpus/kernel/DbiteFile.h" 17 17 #include "../NMEA0183/include/nmea0183.h" 18 #include <Pacpus/kernel/InputOutputInterface.h> 18 19 19 20 #include "GpsFrames.h" … … 88 89 bool analyzeFrame(); /*!< reconstruct the entire frame starting from the received pieces */ 89 90 91 void addOutputs(); 92 90 93 #ifdef WIN32 91 94 Win32SerialPort * serialPort; … … 153 156 ShMem * shMem_; 154 157 158 TimestampedGgaFrame mGga; 159 TimestampedVtgFrame mVtg; 160 TimestampedHdtFrame mHdt; 161 162 // Declaration of outputs 163 OutputInterface<TimestampedGgaFrame, GpsComponent>* outGga_; 164 OutputInterface<TimestampedVtgFrame, GpsComponent>* outVtg_; 165 OutputInterface<TimestampedHdtFrame, GpsComponent>* outHdt_; 166 155 167 /// For the socket server 156 168 /* Qt3 version - 17/12/2007 -
trunk/Gps/structure_gps.h
r102 r118 469 469 }; 470 470 471 472 /// trame_hdt structure with timestamping 473 struct TimestampedHdtFrame 474 { 475 trame_hdt frame; 476 road_time_t time; 477 road_timerange_t timerange; 478 }; 479 471 480 #endif // STRUCTURE_GPS_H
Note:
See TracChangeset
for help on using the changeset viewer.