WSF
WsfUCI_Utils.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI//REL TO USA ONLY
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2019 Infoscitex, a DCS Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef WSFUCI_UTILS_HPP
13#define WSFUCI_UTILS_HPP
14
15#include "wsf_oms_uci_export.h"
16
17
18#include "uci/type/CapabilityAvailabilityEnum.h"
19#include "uci/type/DateTimeType.h"
20#include "uci/type/StandardIdentityEnum.h"
21#include "uci/type/KinematicsType.h"
22#include "uci/type/SubsystemStateEnum.h"
23
24class UtCalendar;
26class WsfSensor;
27class WsfTrack;
28class WsfPlatform;
29class WsfPlatformPart;
30class WsfSimulation;
31
32namespace wsf
33{
34 class UCI_Interface;
35}
36
37namespace UCI_Util
38{
39 constexpr double sNANOSECONDS_PER_SECOND = 1000000000.0;
40
41 constexpr double sTOLERANCE = 1e-6;
42
44
46
47 uci::type::DateTimeTypeValue ConvertDoubleToUCI_DateTime(double aTime);
48
49 double ConvertUCI_DateTimeToDouble(uci::type::DateTimeTypeValue aUCI_DateTime);
50
51 //Converts the absolute sim time to the required time stamp format
52 uci::type::DateTimeTypeValue GetTimeStamp(WsfSimulation& aSimulation,
53 double aSimTime);
54
55 void GetKinematics(uci::type::DateTimeTypeValue& aSimTime,
56 uci::type::KinematicsType& aKinematics,
57 WsfSensor* aSensorPtr,
58 const WsfTrack& aTrack);
59
60 uci::type::SubsystemStateEnum::EnumerationItem GetSubsystemState(WsfPlatformPart* aPartPtr);
61
62 std::string GetSubsystemStateString(const uci::type::SubsystemStateEnum::EnumerationItem& aState);
63
64 std::string RemoveAngleBrackets(const std::string&);
65
66 uci::type::StandardIdentityEnum::EnumerationItem GetStandardIdentity(const WsfTrack& aTrack);
67
68 bool CheckLimits(const WsfArticulatedPart* aArticulatedPartPtr,
69 double& aAz,
70 double& aEl);
71
72} // namespace UCI_Util
73
74#endif
Definition WsfArticulatedPart.hpp:36
Definition WsfPlatformPart.hpp:61
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
Definition WsfSensor.hpp:92
The main controller for a simulation.
Definition WsfSimulation.hpp:109
An object that represents an 'track' (perception) of something.
Definition WsfTrack.hpp:120
The OMS / UCI Interface Object to the UCI middleware.
Definition WsfUCI_Interface.hpp:118
Definition WsfUCI_Utils.cpp:29
double ConvertUCI_DateTimeToDouble(uci::type::DateTimeTypeValue aUCI_DateTime)
Definition WsfUCI_Utils.cpp:153
bool CheckLimits(const WsfArticulatedPart *aArticulatedPartPtr, double &aAz, double &aEl)
Definition WsfUCI_Utils.cpp:210
uci::type::DateTimeTypeValue ConvertDoubleToUCI_DateTime(double aTime)
Definition WsfUCI_Utils.cpp:147
std::string GetSubsystemStateString(const uci::type::SubsystemStateEnum::EnumerationItem &aState)
Definition WsfUCI_Utils.cpp:128
constexpr double sNANOSECONDS_PER_SECOND
Definition WsfUCI_Utils.hpp:39
wsf::UCI_Interface * GetInterface(WsfPlatform *aPlatformPtr)
Definition WsfUCI_Utils.cpp:30
void GetKinematics(uci::type::DateTimeTypeValue &aSimTime, uci::type::KinematicsType &aKinematics, WsfSensor *aSensorPtr, const WsfTrack &aTrack)
Definition WsfUCI_Utils.cpp:42
std::string RemoveAngleBrackets(const std::string &aString)
Definition WsfUCI_Utils.cpp:182
uci::type::SubsystemStateEnum::EnumerationItem GetSubsystemState(WsfPlatformPart *aPartPtr)
Definition WsfUCI_Utils.cpp:115
constexpr double sTOLERANCE
Definition WsfUCI_Utils.hpp:41
uci::type::StandardIdentityEnum::EnumerationItem GetStandardIdentity(const WsfTrack &aTrack)
Definition WsfUCI_Utils.cpp:190
uci::type::DateTimeTypeValue GetTimeStamp(WsfSimulation &aSimulation, double aSimTime)
Definition WsfUCI_Utils.cpp:159
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Copyrights Multiple, All Rights Reserved