CHG: changed to fit to the new base message
This commit is contained in:
@@ -45,7 +45,7 @@ namespace Entities
|
||||
|
||||
{
|
||||
PodController_ = std::make_unique<kubecontrol::PodController>("docs/config");
|
||||
OwnShipTrack = std::make_shared<SimCore::SimTrack>(OwnID, OwnType, EntityKind);
|
||||
OwnShipTrack = std::make_shared<SimCore::SimTrack>(OwnID, EnttityName, EntityKind);
|
||||
OwnShipTrack->setPosition(SimCore::Position());
|
||||
|
||||
MovemtServer_ = std::make_shared<DirectCommunication::DirectCommunicationServer>(__MOVEMENT_SERVER_PORT__);
|
||||
@@ -70,7 +70,7 @@ namespace Entities
|
||||
OwnShipTrack->setPosition(pos);
|
||||
LOG_S(INFO)<< "POS: LAT: "<< OwnShipTrack->getPosition().getGeodesicPos()(SimCore::LATITUDE) << " LON: " << OwnShipTrack->getPosition().getGeodesicPos()(SimCore::LONGITUDE);
|
||||
|
||||
Orders::MoveOrder moveorder(OwnShipTrack->getIdentifier(),WHISPER::SourceType::ENTITY);
|
||||
Orders::MoveOrder moveorder(OwnShipTrack->getIdentifier());
|
||||
moveorder.setPosition(pos);
|
||||
if(MovementWorkerStarted == true)
|
||||
{
|
||||
@@ -81,7 +81,7 @@ namespace Entities
|
||||
void Entity::setSpeed(double val)
|
||||
{
|
||||
OwnShipTrack->Speed.setValue(val);
|
||||
Orders::MoveOrder moveorder(OwnShipTrack->getIdentifier(),WHISPER::SourceType::ENTITY);
|
||||
Orders::MoveOrder moveorder(OwnShipTrack->getIdentifier());
|
||||
moveorder.Speed.setValue(val);
|
||||
if(MovementWorkerStarted == true)
|
||||
{
|
||||
@@ -92,7 +92,7 @@ namespace Entities
|
||||
void Entity::setCourse(double val)
|
||||
{
|
||||
OwnShipTrack->Course.setValue(val);
|
||||
Orders::MoveOrder moveorder(OwnShipTrack->getIdentifier(),WHISPER::SourceType::ENTITY);
|
||||
Orders::MoveOrder moveorder(OwnShipTrack->getIdentifier());
|
||||
moveorder.Course.setValue(val);
|
||||
if(MovementWorkerStarted == true)
|
||||
{
|
||||
@@ -144,7 +144,8 @@ namespace Entities
|
||||
{
|
||||
if (online_ == true) {
|
||||
LOG_S(INFO)<<"__ONLINE__";
|
||||
auto MovementPod = kubecontrol::KubePod("movmentpod-"+EntityName_,xg::newGuid().str(),"movementimage:latest");
|
||||
MovementPodUUID_ = xg::newGuid().str();
|
||||
auto MovementPod = kubecontrol::KubePod(MovementPodUUID_,MovementPodUUID_,"movementimage:latest");
|
||||
MovementPod.setEnvironmentVar("SERVER_IP", SimCore::UtilFunctions::getOwnIP());
|
||||
LOG_S(INFO)<< MovementPod.createYAML();
|
||||
PodController_->startPod(MovementPod);
|
||||
@@ -182,13 +183,13 @@ namespace Entities
|
||||
if (newTrack != nullptr)
|
||||
{
|
||||
OwnShipTrack->setPosition(newTrack->getPosition());
|
||||
// LOG_S(INFO)<< "new POS: LAT: "<< OwnShipTrack->getPosition().getGeodesicPos()(SimCore::LATITUDE) << " LON: " << OwnShipTrack->getPosition().getGeodesicPos()(SimCore::LONGITUDE);
|
||||
LOG_S(INFO)<< "new POS: LAT: "<< OwnShipTrack->getPosition().getGeodesicPos()(SimCore::LATITUDE) << " LON: " << OwnShipTrack->getPosition().getGeodesicPos()(SimCore::LONGITUDE);
|
||||
}
|
||||
}
|
||||
|
||||
if (MovemtServer_->countClients() == 0)
|
||||
{
|
||||
MovementWorkerStarted = false;
|
||||
MovementWorkerStarted = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user