Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
CC=g++
OPTIONS=-Wall -static
INCLUDES=-I/usr/include/eigen3 -I/usr/include/boost
CFLAGS=-Wall

default:
Expand All @@ -9,6 +11,13 @@ test: clean default
mkdir -p build/test/reports
$(CC) $(CFLAGS) -o build/test/tests test/CatchMain.cpp
build/test/tests -r junit -o build/test/reports/sbet-test-linux-report.xml

test-quick: default
mkdir -p build/test
mkdir -p build/test/reports
$(CC) $(OPTIONS) $(INCLUDES) test/CatchMain.cpp -o build/test/tests
build/test/tests

clean:
rm -rf build

Expand Down
11 changes: 11 additions & 0 deletions src/SbetPrinter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,23 @@
#include <cmath>
#include "SbetProcessor.hpp"

/*!
* \brief SbetPrinter class extends of SbetProcessor class
*/
class SbetPrinter: public SbetProcessor{
public:
/**
* Create a SbetPrinter class
*/
SbetPrinter(){
printf("Time Latitude Longitude Altitude SpeedX SpeedY SpeedZ Heading Pitch Roll Wander ForceX ForceY ForceZ AngularRateX AngularRateY AngularRateZ\n");
}

/**
* Print the information of a SbetEntry
*
* @param entry The SbetEntry
*/
void processEntry(SbetEntry * entry){
printf("%.12lf %.12lf %.12lf %lf %lf %lf %lf %.12lf %.12lf %.12lf %lf %lf %lf %lf %lf %lf %lf\n",
entry->time,
Expand Down
6 changes: 6 additions & 0 deletions src/SbetProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@

#include "SbetProcessor.hpp"

/**
* Create a SbetProcessor
*/
SbetProcessor::SbetProcessor(){

}

/**
* Destroy the SbetProcessor
*/
SbetProcessor::~SbetProcessor(){

}
Expand Down
18 changes: 18 additions & 0 deletions src/SbetProcessor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,28 @@ typedef struct{

class SbetProcessor{
public:
/**
* Create a SbetProcessor
*/
SbetProcessor();

/**
* Destroy the SbetProcessor
*/
virtual ~SbetProcessor();

/**
* Read a SBET file and return true if the reading is successful
*
* @param filename the name of the SBET file
*/
bool readFile(std::string & filename);

/**
* Print the information of the SbetEntry
*
* @param entry The SbetEntry
*/
virtual void processEntry(SbetEntry * entry)=0;
virtual void done()=0;

Expand Down