SLProject  4.3.020
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
SENSGpsRecorderDataHandler Class Reference

#include <SENSRecorderDataHandler.h>

Inheritance diagram for SENSGpsRecorderDataHandler:
[legend]

Public Member Functions

 SENSGpsRecorderDataHandler ()
 
void writeLineToFile (ofstream &file, const GpsInfo &data) override
 called in thread store routine for every new line More...
 
- Public Member Functions inherited from SENSRecorderDataHandler< GpsInfo >
 SENSRecorderDataHandler (const std::string &name)
 
virtual ~SENSRecorderDataHandler ()
 
void start (const std::string &outputDir)
 start the store thread More...
 
void stop ()
 stop the store thread and clear values in queue More...
 
void add (GpsInfo &&item)
 add new value to store queue More...
 
bool getErrorMsg (std::string &msg)
 get error msg (valid if function returns true) More...
 

Additional Inherited Members

- Protected Member Functions inherited from SENSRecorderDataHandler< GpsInfo >
virtual void writeOnThreadStart ()
 called in thread store routine when thread starts More...
 
virtual void writeHeaderToFile (ofstream &file)
 called in thread store routine when file could be opened More...
 
virtual void writeOnThreadFinish ()
 called in thread store routine when thread finished More...
 
- Protected Attributes inherited from SENSRecorderDataHandler< GpsInfo >
std::string _outputDir
 output directory More...
 

Detailed Description

Constructor & Destructor Documentation

◆ SENSGpsRecorderDataHandler()

SENSGpsRecorderDataHandler::SENSGpsRecorderDataHandler ( )

Definition at line 128 of file SENSRecorderDataHandler.cpp.

129  : SENSRecorderDataHandler("gps")
130 {
131 }
SENSRecorderDataHandler(const std::string &name)

Member Function Documentation

◆ writeLineToFile()

void SENSGpsRecorderDataHandler::writeLineToFile ( ofstream &  file,
const GpsInfo data 
)
overridevirtual

called in thread store routine for every new line

Implements SENSRecorderDataHandler< GpsInfo >.

Definition at line 133 of file SENSRecorderDataHandler.cpp.

134 {
135  file << std::chrono::time_point_cast<SENSMicroseconds>(data.second).time_since_epoch().count() << " "
136  << data.first.latitudeDEG << " "
137  << data.first.longitudeDEG << " "
138  << data.first.altitudeM << " "
139  << data.first.accuracyM << "\n";
140 }

The documentation for this class was generated from the following files: