ADD: addded Orderlibryry and removed the orderlibrary from the entity library
This commit is contained in:
@@ -19,12 +19,11 @@ class Ship : public Entities::Entity
|
||||
Ship(SimCore::Identifier OwnID,
|
||||
std::string EntityName,
|
||||
WHISPER::SourceType ownType,
|
||||
SimCore::Identifier ParentID,
|
||||
SimCore::EntityKind EntityKind,
|
||||
std::uint32_t GroundTruthPort,
|
||||
std::uint32_t CommandPort
|
||||
):
|
||||
Entity( OwnID,EntityName,ownType, ParentID, EntityKind, GroundTruthPort, CommandPort)
|
||||
Entity( OwnID,EntityName,ownType, EntityKind, GroundTruthPort, CommandPort,false)
|
||||
{
|
||||
SimCore::Position pos1;
|
||||
pos1.setGeodesicPos(55, 6, 0);
|
||||
@@ -38,25 +37,18 @@ class Ship : public Entities::Entity
|
||||
|
||||
private:
|
||||
|
||||
void specificPhysicsCalculations(std::chrono::milliseconds::rep duration) override
|
||||
void childWorker() override
|
||||
{
|
||||
SimCore::Position pos1;
|
||||
pos1.setGeodesicPos(55, 6, 0);
|
||||
|
||||
|
||||
|
||||
// LOG_S(INFO)<<std::endl<<Movement_.getPosition().getGeodesicPos();
|
||||
// double distance, bearing1;
|
||||
// std::tie(distance, bearing1) = Movement_.getPosition().distanceBearingToPosition(pos1);
|
||||
// LOG_S(INFO)<<"distance from start is:" << distance;
|
||||
LOG_S(INFO)<<"calculating every " << duration << " milliseconds";
|
||||
};
|
||||
|
||||
void specificReloadCharacteristicts() override
|
||||
{
|
||||
|
||||
|
||||
LOG_S(INFO)<<"loading specifications";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -66,9 +58,8 @@ SCENARIO("Testing the SimCore Sensor")
|
||||
{
|
||||
GIVEN("different Attributes for a Track in different forms")
|
||||
{
|
||||
SimCore::Identifier IDParent(0,1,false);
|
||||
SimCore::Identifier ID1(0,2,false);
|
||||
Ship Ship(ID1,"FGSHamburg",WHISPER::SourceType::ENTITY,IDParent,SimCore::EntityKind::SURFACE,8000,8001);
|
||||
SimCore::Identifier ID1;
|
||||
Ship Ship(ID1,"FGSHamburg",WHISPER::SourceType::ENTITY,SimCore::EntityKind::SURFACE,8000,8001);
|
||||
Ship.start();
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(10000));
|
||||
Ship.stop();
|
||||
|
||||
@@ -43,8 +43,8 @@ SCENARIO("Testing the SimCore Sensor")
|
||||
{
|
||||
GIVEN("different Attributes for a Track in different forms")
|
||||
{
|
||||
SimCore::Identifier IDParent(0,1,false);
|
||||
SimCore::Identifier IDRadar(1,1,false);
|
||||
SimCore::Identifier IDParent;
|
||||
SimCore::Identifier IDRadar;
|
||||
|
||||
Radar Radar(IDRadar,IDParent,SimCore::SensorKinds::RADAR,8000,8001,"127.0.0.1","APAR");
|
||||
Radar.start();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "Entities/Tracklist/Tracklist.hpp"
|
||||
#include "Entities/Tracklist/TracklistItem.hpp"
|
||||
#include "SimCore/IdentifierMaker.hpp"
|
||||
#include "SimCore/Messages/RadarTrack.hpp"
|
||||
#include "SimCore/Messages/SimTrack.hpp"
|
||||
#include "SimCore/Position.hpp"
|
||||
#include "WHISPER/Messages/Message.hpp"
|
||||
#include <SimCore/Identifier.hpp>
|
||||
@@ -25,7 +25,7 @@ SCENARIO("Testing the SimCore Sensor")
|
||||
|
||||
|
||||
|
||||
SimCore::Identifier OwnID(0,1,false);
|
||||
SimCore::Identifier OwnID;
|
||||
SimCore::IdentifierMaker IDMaker;
|
||||
auto RadarID = IDMaker.getNewIdentifier(1,SimCore::INTERNAL);
|
||||
auto TrackID1 = IDMaker.getNewIdentifier(1,SimCore::INTERNAL);
|
||||
@@ -37,7 +37,7 @@ SCENARIO("Testing the SimCore Sensor")
|
||||
sensor1.Sensorname = "TRS-3D";
|
||||
|
||||
LOG_S(INFO)<<"making radar track";
|
||||
auto Track1 = std::make_shared<SimCore::RadarTrack>(WHISPER::SourceType::SENSOR,*TrackID1.get());
|
||||
auto Track1 = std::make_shared<SimCore::SimTrack>(*TrackID1.get(),"test",SimCore::EntityKind::SURFACE);
|
||||
|
||||
SimCore::Position pos1 ;
|
||||
pos1.setGeodesicPos(55, 6, 0);
|
||||
@@ -65,7 +65,7 @@ SCENARIO("Testing the SimCore Sensor")
|
||||
|
||||
LOG_S(INFO)<<"add same track again";
|
||||
|
||||
Track1->setSpeed(10);
|
||||
Track1->Speed.setValue(10);
|
||||
|
||||
InternalTracklist.addTrack(Track1, sensor1);
|
||||
REQUIRE(InternalTracklist.getTrack(Track1->getIdentifier())->getSpeed() == 10);
|
||||
|
||||
Reference in New Issue
Block a user