From bb15ece3d5847936403b1e5eba2a8e08ee3e0b91 Mon Sep 17 00:00:00 2001 From: emile Date: Thu, 6 Jun 2019 14:25:13 -0400 Subject: [PATCH 1/7] Documentation de SbetPrinter.hpp --- src/SbetPrinter.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/SbetPrinter.hpp b/src/SbetPrinter.hpp index fc32a53..6f196b2 100644 --- a/src/SbetPrinter.hpp +++ b/src/SbetPrinter.hpp @@ -15,12 +15,23 @@ #include #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, From bdff62b3558cc7ae69ed67bb411c32165151460b Mon Sep 17 00:00:00 2001 From: emile Date: Thu, 6 Jun 2019 14:28:48 -0400 Subject: [PATCH 2/7] Documentation de SbetProcessor.hpp --- src/SbetProcessor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/SbetProcessor.cpp b/src/SbetProcessor.cpp index 75f8977..aca3634 100644 --- a/src/SbetProcessor.cpp +++ b/src/SbetProcessor.cpp @@ -3,10 +3,16 @@ #include "SbetProcessor.hpp" +/** + * Create a SbetProcessor + */ SbetProcessor::SbetProcessor(){ } +/** + * Destroy the SbetProcessor + */ SbetProcessor::~SbetProcessor(){ } From 216ab58bb95546eba44e556617063e93eb2a594b Mon Sep 17 00:00:00 2001 From: emile Date: Thu, 6 Jun 2019 15:07:27 -0400 Subject: [PATCH 3/7] Documentation de SbetProcessor.hpp --- src/SbetProcessor.hpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/SbetProcessor.hpp b/src/SbetProcessor.hpp index 61a2d14..baddac3 100644 --- a/src/SbetProcessor.hpp +++ b/src/SbetProcessor.hpp @@ -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; From 7b0d4fd412df1a36daca4efe36d7a4c2d3cf49f8 Mon Sep 17 00:00:00 2001 From: emile Date: Fri, 7 Jun 2019 15:12:17 -0400 Subject: [PATCH 4/7] Ajout de tests SbetProcessorTest.hpp --- test/SbetProcessorTest.hpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 test/SbetProcessorTest.hpp diff --git a/test/SbetProcessorTest.hpp b/test/SbetProcessorTest.hpp new file mode 100644 index 0000000..a6efb7d --- /dev/null +++ b/test/SbetProcessorTest.hpp @@ -0,0 +1,24 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +/* + * File: SbetProcessorTest.hpp + * Author: emile + * + * Created on June 7, 2019, 9:06 AM + */ +#include "catch.hpp" +#include "../src/SbetPrinter.hpp" +#include "../src/AccuracyPrinter.hpp" +#include "../src/AccuracyProcessor.hpp" +#include "../src/SbetProcessor.hpp" + +TEST_CASE("test the readFile function of the SbetProcessor") +{ + SbetPrinter sp; + std::string name = "ejoiqjd"; +} + From df7fb64b7df8fc54512055bdb6717528e05f6288 Mon Sep 17 00:00:00 2001 From: emile Date: Fri, 7 Jun 2019 15:12:50 -0400 Subject: [PATCH 5/7] Ajout de commande dans MakeFile --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Makefile b/Makefile index 699e6f6..2345047 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,6 @@ CC=g++ +OPTIONS=-Wall -static +INCLUDES=-I/usr/include/eigen3 -I/usr/include/boost CFLAGS=-Wall default: @@ -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 From fbc8df0cc74d9cd2da2a1d6182276cfe7eceb201 Mon Sep 17 00:00:00 2001 From: emile Date: Fri, 7 Jun 2019 15:13:16 -0400 Subject: [PATCH 6/7] Inclure SbetProcessorTest.hpp --- test/CatchMain.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/test/CatchMain.cpp b/test/CatchMain.cpp index aa621be..d8404e1 100644 --- a/test/CatchMain.cpp +++ b/test/CatchMain.cpp @@ -11,4 +11,5 @@ #define CATCH_CONFIG_MAIN #include "catch.hpp" #include "SbetPrinterTest.hpp" +#include "SbetProcessorTest.hpp" //#include "TemplateTest.hpp" \ No newline at end of file From a962ff36ebe3b17c12099dc3d0c1082f7d20c5c7 Mon Sep 17 00:00:00 2001 From: emile Date: Mon, 17 Jun 2019 08:58:40 -0400 Subject: [PATCH 7/7] Suppression d'un test incomplet --- test/CatchMain.cpp | 1 - test/SbetProcessorTest.hpp | 24 ------------------------ 2 files changed, 25 deletions(-) delete mode 100644 test/SbetProcessorTest.hpp diff --git a/test/CatchMain.cpp b/test/CatchMain.cpp index d8404e1..aa621be 100644 --- a/test/CatchMain.cpp +++ b/test/CatchMain.cpp @@ -11,5 +11,4 @@ #define CATCH_CONFIG_MAIN #include "catch.hpp" #include "SbetPrinterTest.hpp" -#include "SbetProcessorTest.hpp" //#include "TemplateTest.hpp" \ No newline at end of file diff --git a/test/SbetProcessorTest.hpp b/test/SbetProcessorTest.hpp deleted file mode 100644 index a6efb7d..0000000 --- a/test/SbetProcessorTest.hpp +++ /dev/null @@ -1,24 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -/* - * File: SbetProcessorTest.hpp - * Author: emile - * - * Created on June 7, 2019, 9:06 AM - */ -#include "catch.hpp" -#include "../src/SbetPrinter.hpp" -#include "../src/AccuracyPrinter.hpp" -#include "../src/AccuracyProcessor.hpp" -#include "../src/SbetProcessor.hpp" - -TEST_CASE("test the readFile function of the SbetProcessor") -{ - SbetPrinter sp; - std::string name = "ejoiqjd"; -} -