Changeset 118 in pacpussensors for trunk/Gps/gpsComponent.cpp


Ignore:
Timestamp:
Jan 13, 2016, 5:30:51 PM (9 years ago)
Author:
DHERBOMEZ Gérald
Message:

add output for HDT, VTG, GGA frames
add timestamped structures for GPS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Gps/gpsComponent.cpp

    r99 r118  
    7979
    8080}
     81
     82
     83void GpsComponent::addOutputs()
     84{
     85  addOutput<TimestampedGgaFrame, GpsComponent>("ggaOut");
     86  addOutput<TimestampedVtgFrame, GpsComponent>("vtgOut");
     87  addOutput<TimestampedVtgFrame, GpsComponent>("hdtOut");
     88}
     89
    8190
    8291
     
    221230{
    222231  ppsIndex_ = 0;
     232
     233  outGga_ = getTypedOutput<TimestampedGgaFrame, GpsComponent>("ggaOut");
     234  outVtg_ = getTypedOutput<TimestampedVtgFrame, GpsComponent>("vtgOut");
     235  outHdt_ = getTypedOutput<TimestampedHdtFrame, GpsComponent>("hdtOut");
     236
    223237
    224238  setActive( true );
     
    387401      ggaFrame.notifyObservers();
    388402
     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
    389410      if ( (isRecording()) && (ggaRecording) ) {
    390411                    if (!(ggahdFile.isOpen()))
     
    510531      sendDataToServerSocket(hdtFrame,type);
    511532      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);
    512540
    513541      if ( (isRecording()) && (hdtRecording) )
     
    591619        vtgFrame.notifyObservers();
    592620
     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
    593628        if (isRecording() && vtgRecording) {
    594629          if (!vtghdFile.isOpen())
Note: See TracChangeset for help on using the changeset viewer.