FIX: fixed track class bugs

This commit is contained in:
Henry Winkel
2022-12-21 15:18:57 +01:00
parent 56833c93f2
commit a570766dc6
4 changed files with 81 additions and 20 deletions

View File

@@ -1,5 +1,5 @@
#include "SimCore/Messages/Track.hpp"
#include "WHISPER/Messages/Message.hpp"
#include <SimCore/Messages/Track.hpp>
#include <WHISPER/Messages/Message.hpp>
#include <SimCore/SimCore.hpp>
#include <memory>
#define CATCH_CONFIG_MAIN
@@ -37,9 +37,10 @@ SCENARIO("Testing the SimCore Track")
{
SimCore::Position pos( GeocentPos1(SimCore::GeocentricPosition::X), GeocentPos1(SimCore::GeocentricPosition::Y), GeocentPos1(SimCore::GeocentricPosition::Z));
SimCore::Track track(1,WHISPER::SourceType::SHIP,10,pos,false);
SimCore::Track track(1,WHISPER::SourceType::SHIP,10,false);
track.setCourse(course);
track.setSpeed(speed);
track.setPosition(GeocentPos1(SimCore::X),GeocentPos1(SimCore::Y),GeocentPos1(SimCore::Z));
if (track.getPostion() == pos) {
testOperator = true;
@@ -49,7 +50,6 @@ SCENARIO("Testing the SimCore Track")
if (msg.get()->msgType_ == WHISPER::RAW_TRACK) {
trackPtr = std::make_shared<SimCore::Track>(serializedMSG);
LOG_S(INFO)<< trackPtr->getSpeed();
}
@@ -63,6 +63,7 @@ SCENARIO("Testing the SimCore Track")
REQUIRE(msg.get()->msgType_ == WHISPER::RAW_TRACK);
REQUIRE(trackPtr->getSpeed() == speed);
REQUIRE(trackPtr->getPostion().getGeocentricPos() == GeocentPos1);