ADD: added SimTrack class and Emission class as new standard message
This commit is contained in:
@@ -50,6 +50,10 @@ add_library(SimCore STATIC
|
||||
src/SimCore/Messages/SimTrack.cpp
|
||||
include/SimCore/Messages/Protos/SimTrack.pb.cc
|
||||
|
||||
include/SimCore/Messages/Emission.hpp
|
||||
src/SimCore/Messages/Emission.cpp
|
||||
|
||||
|
||||
|
||||
include/SimCore/Messages/Protos/Track.pb.cc
|
||||
include/SimCore/Messages/Protos/GeocentricPosition.pb.cc
|
||||
@@ -155,6 +159,11 @@ IF (${TEST_SIMCORE_LIBRARY})
|
||||
add_executable(test_GroundTruthTrackClass tests/test_GroundTruthTrackClass.cpp)
|
||||
target_link_libraries(test_GroundTruthTrackClass Catch2::Catch2 SimCore eigen loguru)
|
||||
catch_discover_tests(test_GroundTruthTrackClass)
|
||||
|
||||
add_executable(test_SimTrack tests/test_SimTrack.cpp)
|
||||
target_link_libraries(test_SimTrack Catch2::Catch2 SimCore eigen loguru)
|
||||
catch_discover_tests(test_SimTrack)
|
||||
|
||||
|
||||
add_executable(test_RadarTrackClass tests/test_RadarTrackClass.cpp)
|
||||
target_link_libraries(test_RadarTrackClass Catch2::Catch2 SimCore loguru)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <iterator>
|
||||
#include <utility>
|
||||
#include <loguru.hpp>
|
||||
#include <SimCore/Messages/Protos/Identifier.pb.h>
|
||||
|
||||
|
||||
namespace SimCore {
|
||||
@@ -34,6 +35,13 @@ namespace SimCore {
|
||||
*/
|
||||
Identifier(std::string str);
|
||||
|
||||
/**
|
||||
* @brief constructs the ID out of an protomessage id
|
||||
*
|
||||
*/
|
||||
Identifier(messages::track::Identifier id);
|
||||
|
||||
|
||||
/**
|
||||
* @brief returns the number of the object, this plus the number of the parent make it unique
|
||||
* @return uint32_t
|
||||
@@ -66,6 +74,10 @@ namespace SimCore {
|
||||
|
||||
std::string getUUID() const;
|
||||
|
||||
/// @brief
|
||||
/// @param lhs
|
||||
/// @param rhs
|
||||
/// @return
|
||||
friend bool operator==(const Identifier &lhs,const Identifier &rhs);
|
||||
|
||||
private:
|
||||
|
||||
64
include/SimCore/Messages/Emission.hpp
Normal file
64
include/SimCore/Messages/Emission.hpp
Normal file
@@ -0,0 +1,64 @@
|
||||
#pragma once
|
||||
|
||||
#include <SimCore/data.hpp>
|
||||
#include <string>
|
||||
#include <SimCore/Identifier.hpp>
|
||||
#include <SimCore/Messages/Protos/SimTrack.pb.h>
|
||||
|
||||
|
||||
namespace SimCore
|
||||
{
|
||||
class Emission
|
||||
{
|
||||
private:
|
||||
const SimCore::Identifier ID_;
|
||||
Data<std::string> name_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
/// @brief
|
||||
/// @param name
|
||||
Emission(std::string name);
|
||||
|
||||
/// @brief
|
||||
/// @param name
|
||||
/// @param id
|
||||
Emission(std::string name, SimCore::Identifier id);
|
||||
|
||||
|
||||
/// @brief
|
||||
/// @return
|
||||
SimCore::Identifier getID() const;
|
||||
|
||||
/// @brief
|
||||
/// @return
|
||||
std::string getName();
|
||||
|
||||
Data<double> Frequency;
|
||||
Data<double> Range;
|
||||
Data<double> Bandwidth;
|
||||
Data<double> PulseWidth;
|
||||
Data<double> PulseRepitition;
|
||||
Data<double> RadiatedPower;
|
||||
Data<std::uint32_t> NumberOfBeams;
|
||||
Data<std::uint32_t> searchInterval;
|
||||
|
||||
|
||||
/// @brief
|
||||
/// @param lhs
|
||||
/// @param rhs
|
||||
/// @return
|
||||
friend bool operator==(const Emission &lhs,const Emission &rhs);
|
||||
|
||||
/// @brief
|
||||
/// @return
|
||||
messages::SimTrack::Emission packEmission();
|
||||
|
||||
/// @brief
|
||||
/// @param emission
|
||||
/// @return
|
||||
static Emission unpackEmission(messages::SimTrack::Emission emission);
|
||||
|
||||
};
|
||||
} // namespace SimCore
|
||||
File diff suppressed because it is too large
Load Diff
@@ -192,11 +192,11 @@ class SimTrack final :
|
||||
kEntityIdentifierFieldNumber = 1,
|
||||
kGeocentricPositionFieldNumber = 3,
|
||||
kContactSpeedFieldNumber = 4,
|
||||
kContactSourceTypeFieldNumber = 2,
|
||||
kContactEnvironemntFieldNumber = 7,
|
||||
kContactCourseFieldNumber = 5,
|
||||
kContactOriginFieldNumber = 2,
|
||||
kContactEnvironemntFieldNumber = 8,
|
||||
kContactBearingFieldNumber = 6,
|
||||
kContactRangeFieldNumber = 7,
|
||||
kConactPitchFieldNumber = 6,
|
||||
kContactRCSFieldNumber = 8,
|
||||
};
|
||||
// repeated .messages.SimTrack.Emission ContactEmissions = 9;
|
||||
int contactemissions_size() const;
|
||||
@@ -252,7 +252,11 @@ class SimTrack final :
|
||||
::messages::track::EntityGeocentricPosition* geocentricposition);
|
||||
::messages::track::EntityGeocentricPosition* unsafe_arena_release_geocentricposition();
|
||||
|
||||
// double ContactSpeed = 4;
|
||||
// optional double ContactSpeed = 4;
|
||||
bool has_contactspeed() const;
|
||||
private:
|
||||
bool _internal_has_contactspeed() const;
|
||||
public:
|
||||
void clear_contactspeed();
|
||||
double contactspeed() const;
|
||||
void set_contactspeed(double value);
|
||||
@@ -261,25 +265,20 @@ class SimTrack final :
|
||||
void _internal_set_contactspeed(double value);
|
||||
public:
|
||||
|
||||
// double ContactCourse = 5;
|
||||
void clear_contactcourse();
|
||||
double contactcourse() const;
|
||||
void set_contactcourse(double value);
|
||||
// uint32 ContactSourceType = 2;
|
||||
void clear_contactsourcetype();
|
||||
uint32_t contactsourcetype() const;
|
||||
void set_contactsourcetype(uint32_t value);
|
||||
private:
|
||||
double _internal_contactcourse() const;
|
||||
void _internal_set_contactcourse(double value);
|
||||
uint32_t _internal_contactsourcetype() const;
|
||||
void _internal_set_contactsourcetype(uint32_t value);
|
||||
public:
|
||||
|
||||
// uint32 ContactOrigin = 2;
|
||||
void clear_contactorigin();
|
||||
uint32_t contactorigin() const;
|
||||
void set_contactorigin(uint32_t value);
|
||||
// optional uint32 ContactEnvironemnt = 7;
|
||||
bool has_contactenvironemnt() const;
|
||||
private:
|
||||
uint32_t _internal_contactorigin() const;
|
||||
void _internal_set_contactorigin(uint32_t value);
|
||||
bool _internal_has_contactenvironemnt() const;
|
||||
public:
|
||||
|
||||
// uint32 ContactEnvironemnt = 8;
|
||||
void clear_contactenvironemnt();
|
||||
uint32_t contactenvironemnt() const;
|
||||
void set_contactenvironemnt(uint32_t value);
|
||||
@@ -288,22 +287,43 @@ class SimTrack final :
|
||||
void _internal_set_contactenvironemnt(uint32_t value);
|
||||
public:
|
||||
|
||||
// double ContactBearing = 6;
|
||||
void clear_contactbearing();
|
||||
double contactbearing() const;
|
||||
void set_contactbearing(double value);
|
||||
// optional double ContactCourse = 5;
|
||||
bool has_contactcourse() const;
|
||||
private:
|
||||
double _internal_contactbearing() const;
|
||||
void _internal_set_contactbearing(double value);
|
||||
bool _internal_has_contactcourse() const;
|
||||
public:
|
||||
void clear_contactcourse();
|
||||
double contactcourse() const;
|
||||
void set_contactcourse(double value);
|
||||
private:
|
||||
double _internal_contactcourse() const;
|
||||
void _internal_set_contactcourse(double value);
|
||||
public:
|
||||
|
||||
// double ContactRange = 7;
|
||||
void clear_contactrange();
|
||||
double contactrange() const;
|
||||
void set_contactrange(double value);
|
||||
// optional double ConactPitch = 6;
|
||||
bool has_conactpitch() const;
|
||||
private:
|
||||
double _internal_contactrange() const;
|
||||
void _internal_set_contactrange(double value);
|
||||
bool _internal_has_conactpitch() const;
|
||||
public:
|
||||
void clear_conactpitch();
|
||||
double conactpitch() const;
|
||||
void set_conactpitch(double value);
|
||||
private:
|
||||
double _internal_conactpitch() const;
|
||||
void _internal_set_conactpitch(double value);
|
||||
public:
|
||||
|
||||
// optional double ContactRCS = 8;
|
||||
bool has_contactrcs() const;
|
||||
private:
|
||||
bool _internal_has_contactrcs() const;
|
||||
public:
|
||||
void clear_contactrcs();
|
||||
double contactrcs() const;
|
||||
void set_contactrcs(double value);
|
||||
private:
|
||||
double _internal_contactrcs() const;
|
||||
void _internal_set_contactrcs(double value);
|
||||
public:
|
||||
|
||||
// @@protoc_insertion_point(class_scope:messages.SimTrack.SimTrack)
|
||||
@@ -314,16 +334,17 @@ class SimTrack final :
|
||||
typedef void InternalArenaConstructable_;
|
||||
typedef void DestructorSkippable_;
|
||||
struct Impl_ {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::messages::SimTrack::Emission > contactemissions_;
|
||||
::messages::track::Identifier* entityidentifier_;
|
||||
::messages::track::EntityGeocentricPosition* geocentricposition_;
|
||||
double contactspeed_;
|
||||
double contactcourse_;
|
||||
uint32_t contactorigin_;
|
||||
uint32_t contactsourcetype_;
|
||||
uint32_t contactenvironemnt_;
|
||||
double contactbearing_;
|
||||
double contactrange_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
double contactcourse_;
|
||||
double conactpitch_;
|
||||
double contactrcs_;
|
||||
};
|
||||
union { Impl_ _impl_; };
|
||||
friend struct ::TableStruct_SimTrack_2eproto;
|
||||
@@ -451,32 +472,85 @@ class Emission final :
|
||||
// accessors -------------------------------------------------------
|
||||
|
||||
enum : int {
|
||||
kFrequencyFieldNumber = 1,
|
||||
kFrequencyBandWithFieldNumber = 2,
|
||||
kPulseWidthFieldNumber = 3,
|
||||
kPulseRepititionFieldNumber = 4,
|
||||
kRadiatedPowerFieldNumber = 5,
|
||||
kNumberOfBeamsFieldNumber = 6,
|
||||
kNameFieldNumber = 2,
|
||||
kIdentifierFieldNumber = 1,
|
||||
kFrequencyFieldNumber = 3,
|
||||
kRangeFieldNumber = 4,
|
||||
kBandwidthFieldNumber = 5,
|
||||
kPulseWidthFieldNumber = 6,
|
||||
kPulseRepititionFieldNumber = 7,
|
||||
kRadiatedPowerFieldNumber = 8,
|
||||
kNumberOfBeamsFieldNumber = 9,
|
||||
kSearchIntervalFieldNumber = 10,
|
||||
};
|
||||
// uint32 frequency = 1;
|
||||
// string name = 2;
|
||||
void clear_name();
|
||||
const std::string& name() const;
|
||||
template <typename ArgT0 = const std::string&, typename... ArgT>
|
||||
void set_name(ArgT0&& arg0, ArgT... args);
|
||||
std::string* mutable_name();
|
||||
PROTOBUF_NODISCARD std::string* release_name();
|
||||
void set_allocated_name(std::string* name);
|
||||
private:
|
||||
const std::string& _internal_name() const;
|
||||
inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value);
|
||||
std::string* _internal_mutable_name();
|
||||
public:
|
||||
|
||||
// .messages.track.Identifier Identifier = 1;
|
||||
bool has_identifier() const;
|
||||
private:
|
||||
bool _internal_has_identifier() const;
|
||||
public:
|
||||
void clear_identifier();
|
||||
const ::messages::track::Identifier& identifier() const;
|
||||
PROTOBUF_NODISCARD ::messages::track::Identifier* release_identifier();
|
||||
::messages::track::Identifier* mutable_identifier();
|
||||
void set_allocated_identifier(::messages::track::Identifier* identifier);
|
||||
private:
|
||||
const ::messages::track::Identifier& _internal_identifier() const;
|
||||
::messages::track::Identifier* _internal_mutable_identifier();
|
||||
public:
|
||||
void unsafe_arena_set_allocated_identifier(
|
||||
::messages::track::Identifier* identifier);
|
||||
::messages::track::Identifier* unsafe_arena_release_identifier();
|
||||
|
||||
// double frequency = 3;
|
||||
void clear_frequency();
|
||||
uint32_t frequency() const;
|
||||
void set_frequency(uint32_t value);
|
||||
double frequency() const;
|
||||
void set_frequency(double value);
|
||||
private:
|
||||
uint32_t _internal_frequency() const;
|
||||
void _internal_set_frequency(uint32_t value);
|
||||
double _internal_frequency() const;
|
||||
void _internal_set_frequency(double value);
|
||||
public:
|
||||
|
||||
// uint32 frequencyBandWith = 2;
|
||||
void clear_frequencybandwith();
|
||||
uint32_t frequencybandwith() const;
|
||||
void set_frequencybandwith(uint32_t value);
|
||||
// double Range = 4;
|
||||
void clear_range();
|
||||
double range() const;
|
||||
void set_range(double value);
|
||||
private:
|
||||
uint32_t _internal_frequencybandwith() const;
|
||||
void _internal_set_frequencybandwith(uint32_t value);
|
||||
double _internal_range() const;
|
||||
void _internal_set_range(double value);
|
||||
public:
|
||||
|
||||
// uint32 pulseWidth = 3;
|
||||
// optional uint32 Bandwidth = 5;
|
||||
bool has_bandwidth() const;
|
||||
private:
|
||||
bool _internal_has_bandwidth() const;
|
||||
public:
|
||||
void clear_bandwidth();
|
||||
uint32_t bandwidth() const;
|
||||
void set_bandwidth(uint32_t value);
|
||||
private:
|
||||
uint32_t _internal_bandwidth() const;
|
||||
void _internal_set_bandwidth(uint32_t value);
|
||||
public:
|
||||
|
||||
// optional uint32 pulseWidth = 6;
|
||||
bool has_pulsewidth() const;
|
||||
private:
|
||||
bool _internal_has_pulsewidth() const;
|
||||
public:
|
||||
void clear_pulsewidth();
|
||||
uint32_t pulsewidth() const;
|
||||
void set_pulsewidth(uint32_t value);
|
||||
@@ -485,7 +559,11 @@ class Emission final :
|
||||
void _internal_set_pulsewidth(uint32_t value);
|
||||
public:
|
||||
|
||||
// uint32 pulseRepitition = 4;
|
||||
// optional uint32 pulseRepitition = 7;
|
||||
bool has_pulserepitition() const;
|
||||
private:
|
||||
bool _internal_has_pulserepitition() const;
|
||||
public:
|
||||
void clear_pulserepitition();
|
||||
uint32_t pulserepitition() const;
|
||||
void set_pulserepitition(uint32_t value);
|
||||
@@ -494,7 +572,11 @@ class Emission final :
|
||||
void _internal_set_pulserepitition(uint32_t value);
|
||||
public:
|
||||
|
||||
// uint32 radiatedPower = 5;
|
||||
// optional uint32 radiatedPower = 8;
|
||||
bool has_radiatedpower() const;
|
||||
private:
|
||||
bool _internal_has_radiatedpower() const;
|
||||
public:
|
||||
void clear_radiatedpower();
|
||||
uint32_t radiatedpower() const;
|
||||
void set_radiatedpower(uint32_t value);
|
||||
@@ -503,7 +585,11 @@ class Emission final :
|
||||
void _internal_set_radiatedpower(uint32_t value);
|
||||
public:
|
||||
|
||||
// uint32 numberOfBeams = 6;
|
||||
// optional uint32 numberOfBeams = 9;
|
||||
bool has_numberofbeams() const;
|
||||
private:
|
||||
bool _internal_has_numberofbeams() const;
|
||||
public:
|
||||
void clear_numberofbeams();
|
||||
uint32_t numberofbeams() const;
|
||||
void set_numberofbeams(uint32_t value);
|
||||
@@ -512,6 +598,19 @@ class Emission final :
|
||||
void _internal_set_numberofbeams(uint32_t value);
|
||||
public:
|
||||
|
||||
// optional uint32 searchInterval = 10;
|
||||
bool has_searchinterval() const;
|
||||
private:
|
||||
bool _internal_has_searchinterval() const;
|
||||
public:
|
||||
void clear_searchinterval();
|
||||
uint32_t searchinterval() const;
|
||||
void set_searchinterval(uint32_t value);
|
||||
private:
|
||||
uint32_t _internal_searchinterval() const;
|
||||
void _internal_set_searchinterval(uint32_t value);
|
||||
public:
|
||||
|
||||
// @@protoc_insertion_point(class_scope:messages.SimTrack.Emission)
|
||||
private:
|
||||
class _Internal;
|
||||
@@ -520,13 +619,18 @@ class Emission final :
|
||||
typedef void InternalArenaConstructable_;
|
||||
typedef void DestructorSkippable_;
|
||||
struct Impl_ {
|
||||
uint32_t frequency_;
|
||||
uint32_t frequencybandwith_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
|
||||
::messages::track::Identifier* identifier_;
|
||||
double frequency_;
|
||||
double range_;
|
||||
uint32_t bandwidth_;
|
||||
uint32_t pulsewidth_;
|
||||
uint32_t pulserepitition_;
|
||||
uint32_t radiatedpower_;
|
||||
uint32_t numberofbeams_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
uint32_t searchinterval_;
|
||||
};
|
||||
union { Impl_ _impl_; };
|
||||
friend struct ::TableStruct_SimTrack_2eproto;
|
||||
@@ -627,24 +731,24 @@ inline void SimTrack::set_allocated_entityidentifier(::messages::track::Identifi
|
||||
// @@protoc_insertion_point(field_set_allocated:messages.SimTrack.SimTrack.EntityIdentifier)
|
||||
}
|
||||
|
||||
// uint32 ContactOrigin = 2;
|
||||
inline void SimTrack::clear_contactorigin() {
|
||||
_impl_.contactorigin_ = 0u;
|
||||
// uint32 ContactSourceType = 2;
|
||||
inline void SimTrack::clear_contactsourcetype() {
|
||||
_impl_.contactsourcetype_ = 0u;
|
||||
}
|
||||
inline uint32_t SimTrack::_internal_contactorigin() const {
|
||||
return _impl_.contactorigin_;
|
||||
inline uint32_t SimTrack::_internal_contactsourcetype() const {
|
||||
return _impl_.contactsourcetype_;
|
||||
}
|
||||
inline uint32_t SimTrack::contactorigin() const {
|
||||
// @@protoc_insertion_point(field_get:messages.SimTrack.SimTrack.ContactOrigin)
|
||||
return _internal_contactorigin();
|
||||
inline uint32_t SimTrack::contactsourcetype() const {
|
||||
// @@protoc_insertion_point(field_get:messages.SimTrack.SimTrack.ContactSourceType)
|
||||
return _internal_contactsourcetype();
|
||||
}
|
||||
inline void SimTrack::_internal_set_contactorigin(uint32_t value) {
|
||||
inline void SimTrack::_internal_set_contactsourcetype(uint32_t value) {
|
||||
|
||||
_impl_.contactorigin_ = value;
|
||||
_impl_.contactsourcetype_ = value;
|
||||
}
|
||||
inline void SimTrack::set_contactorigin(uint32_t value) {
|
||||
_internal_set_contactorigin(value);
|
||||
// @@protoc_insertion_point(field_set:messages.SimTrack.SimTrack.ContactOrigin)
|
||||
inline void SimTrack::set_contactsourcetype(uint32_t value) {
|
||||
_internal_set_contactsourcetype(value);
|
||||
// @@protoc_insertion_point(field_set:messages.SimTrack.SimTrack.ContactSourceType)
|
||||
}
|
||||
|
||||
// .messages.track.EntityGeocentricPosition GeocentricPosition = 3;
|
||||
@@ -732,9 +836,17 @@ inline void SimTrack::set_allocated_geocentricposition(::messages::track::Entity
|
||||
// @@protoc_insertion_point(field_set_allocated:messages.SimTrack.SimTrack.GeocentricPosition)
|
||||
}
|
||||
|
||||
// double ContactSpeed = 4;
|
||||
// optional double ContactSpeed = 4;
|
||||
inline bool SimTrack::_internal_has_contactspeed() const {
|
||||
bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
|
||||
return value;
|
||||
}
|
||||
inline bool SimTrack::has_contactspeed() const {
|
||||
return _internal_has_contactspeed();
|
||||
}
|
||||
inline void SimTrack::clear_contactspeed() {
|
||||
_impl_.contactspeed_ = 0;
|
||||
_impl_._has_bits_[0] &= ~0x00000001u;
|
||||
}
|
||||
inline double SimTrack::_internal_contactspeed() const {
|
||||
return _impl_.contactspeed_;
|
||||
@@ -744,7 +856,7 @@ inline double SimTrack::contactspeed() const {
|
||||
return _internal_contactspeed();
|
||||
}
|
||||
inline void SimTrack::_internal_set_contactspeed(double value) {
|
||||
|
||||
_impl_._has_bits_[0] |= 0x00000001u;
|
||||
_impl_.contactspeed_ = value;
|
||||
}
|
||||
inline void SimTrack::set_contactspeed(double value) {
|
||||
@@ -752,9 +864,17 @@ inline void SimTrack::set_contactspeed(double value) {
|
||||
// @@protoc_insertion_point(field_set:messages.SimTrack.SimTrack.ContactSpeed)
|
||||
}
|
||||
|
||||
// double ContactCourse = 5;
|
||||
// optional double ContactCourse = 5;
|
||||
inline bool SimTrack::_internal_has_contactcourse() const {
|
||||
bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
|
||||
return value;
|
||||
}
|
||||
inline bool SimTrack::has_contactcourse() const {
|
||||
return _internal_has_contactcourse();
|
||||
}
|
||||
inline void SimTrack::clear_contactcourse() {
|
||||
_impl_.contactcourse_ = 0;
|
||||
_impl_._has_bits_[0] &= ~0x00000004u;
|
||||
}
|
||||
inline double SimTrack::_internal_contactcourse() const {
|
||||
return _impl_.contactcourse_;
|
||||
@@ -764,7 +884,7 @@ inline double SimTrack::contactcourse() const {
|
||||
return _internal_contactcourse();
|
||||
}
|
||||
inline void SimTrack::_internal_set_contactcourse(double value) {
|
||||
|
||||
_impl_._has_bits_[0] |= 0x00000004u;
|
||||
_impl_.contactcourse_ = value;
|
||||
}
|
||||
inline void SimTrack::set_contactcourse(double value) {
|
||||
@@ -772,49 +892,45 @@ inline void SimTrack::set_contactcourse(double value) {
|
||||
// @@protoc_insertion_point(field_set:messages.SimTrack.SimTrack.ContactCourse)
|
||||
}
|
||||
|
||||
// double ContactBearing = 6;
|
||||
inline void SimTrack::clear_contactbearing() {
|
||||
_impl_.contactbearing_ = 0;
|
||||
// optional double ConactPitch = 6;
|
||||
inline bool SimTrack::_internal_has_conactpitch() const {
|
||||
bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0;
|
||||
return value;
|
||||
}
|
||||
inline double SimTrack::_internal_contactbearing() const {
|
||||
return _impl_.contactbearing_;
|
||||
inline bool SimTrack::has_conactpitch() const {
|
||||
return _internal_has_conactpitch();
|
||||
}
|
||||
inline double SimTrack::contactbearing() const {
|
||||
// @@protoc_insertion_point(field_get:messages.SimTrack.SimTrack.ContactBearing)
|
||||
return _internal_contactbearing();
|
||||
inline void SimTrack::clear_conactpitch() {
|
||||
_impl_.conactpitch_ = 0;
|
||||
_impl_._has_bits_[0] &= ~0x00000008u;
|
||||
}
|
||||
inline void SimTrack::_internal_set_contactbearing(double value) {
|
||||
|
||||
_impl_.contactbearing_ = value;
|
||||
inline double SimTrack::_internal_conactpitch() const {
|
||||
return _impl_.conactpitch_;
|
||||
}
|
||||
inline void SimTrack::set_contactbearing(double value) {
|
||||
_internal_set_contactbearing(value);
|
||||
// @@protoc_insertion_point(field_set:messages.SimTrack.SimTrack.ContactBearing)
|
||||
inline double SimTrack::conactpitch() const {
|
||||
// @@protoc_insertion_point(field_get:messages.SimTrack.SimTrack.ConactPitch)
|
||||
return _internal_conactpitch();
|
||||
}
|
||||
inline void SimTrack::_internal_set_conactpitch(double value) {
|
||||
_impl_._has_bits_[0] |= 0x00000008u;
|
||||
_impl_.conactpitch_ = value;
|
||||
}
|
||||
inline void SimTrack::set_conactpitch(double value) {
|
||||
_internal_set_conactpitch(value);
|
||||
// @@protoc_insertion_point(field_set:messages.SimTrack.SimTrack.ConactPitch)
|
||||
}
|
||||
|
||||
// double ContactRange = 7;
|
||||
inline void SimTrack::clear_contactrange() {
|
||||
_impl_.contactrange_ = 0;
|
||||
// optional uint32 ContactEnvironemnt = 7;
|
||||
inline bool SimTrack::_internal_has_contactenvironemnt() const {
|
||||
bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
|
||||
return value;
|
||||
}
|
||||
inline double SimTrack::_internal_contactrange() const {
|
||||
return _impl_.contactrange_;
|
||||
inline bool SimTrack::has_contactenvironemnt() const {
|
||||
return _internal_has_contactenvironemnt();
|
||||
}
|
||||
inline double SimTrack::contactrange() const {
|
||||
// @@protoc_insertion_point(field_get:messages.SimTrack.SimTrack.ContactRange)
|
||||
return _internal_contactrange();
|
||||
}
|
||||
inline void SimTrack::_internal_set_contactrange(double value) {
|
||||
|
||||
_impl_.contactrange_ = value;
|
||||
}
|
||||
inline void SimTrack::set_contactrange(double value) {
|
||||
_internal_set_contactrange(value);
|
||||
// @@protoc_insertion_point(field_set:messages.SimTrack.SimTrack.ContactRange)
|
||||
}
|
||||
|
||||
// uint32 ContactEnvironemnt = 8;
|
||||
inline void SimTrack::clear_contactenvironemnt() {
|
||||
_impl_.contactenvironemnt_ = 0u;
|
||||
_impl_._has_bits_[0] &= ~0x00000002u;
|
||||
}
|
||||
inline uint32_t SimTrack::_internal_contactenvironemnt() const {
|
||||
return _impl_.contactenvironemnt_;
|
||||
@@ -824,7 +940,7 @@ inline uint32_t SimTrack::contactenvironemnt() const {
|
||||
return _internal_contactenvironemnt();
|
||||
}
|
||||
inline void SimTrack::_internal_set_contactenvironemnt(uint32_t value) {
|
||||
|
||||
_impl_._has_bits_[0] |= 0x00000002u;
|
||||
_impl_.contactenvironemnt_ = value;
|
||||
}
|
||||
inline void SimTrack::set_contactenvironemnt(uint32_t value) {
|
||||
@@ -832,6 +948,34 @@ inline void SimTrack::set_contactenvironemnt(uint32_t value) {
|
||||
// @@protoc_insertion_point(field_set:messages.SimTrack.SimTrack.ContactEnvironemnt)
|
||||
}
|
||||
|
||||
// optional double ContactRCS = 8;
|
||||
inline bool SimTrack::_internal_has_contactrcs() const {
|
||||
bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0;
|
||||
return value;
|
||||
}
|
||||
inline bool SimTrack::has_contactrcs() const {
|
||||
return _internal_has_contactrcs();
|
||||
}
|
||||
inline void SimTrack::clear_contactrcs() {
|
||||
_impl_.contactrcs_ = 0;
|
||||
_impl_._has_bits_[0] &= ~0x00000010u;
|
||||
}
|
||||
inline double SimTrack::_internal_contactrcs() const {
|
||||
return _impl_.contactrcs_;
|
||||
}
|
||||
inline double SimTrack::contactrcs() const {
|
||||
// @@protoc_insertion_point(field_get:messages.SimTrack.SimTrack.ContactRCS)
|
||||
return _internal_contactrcs();
|
||||
}
|
||||
inline void SimTrack::_internal_set_contactrcs(double value) {
|
||||
_impl_._has_bits_[0] |= 0x00000010u;
|
||||
_impl_.contactrcs_ = value;
|
||||
}
|
||||
inline void SimTrack::set_contactrcs(double value) {
|
||||
_internal_set_contactrcs(value);
|
||||
// @@protoc_insertion_point(field_set:messages.SimTrack.SimTrack.ContactRCS)
|
||||
}
|
||||
|
||||
// repeated .messages.SimTrack.Emission ContactEmissions = 9;
|
||||
inline int SimTrack::_internal_contactemissions_size() const {
|
||||
return _impl_.contactemissions_.size();
|
||||
@@ -876,49 +1020,220 @@ SimTrack::contactemissions() const {
|
||||
|
||||
// Emission
|
||||
|
||||
// uint32 frequency = 1;
|
||||
inline void Emission::clear_frequency() {
|
||||
_impl_.frequency_ = 0u;
|
||||
// .messages.track.Identifier Identifier = 1;
|
||||
inline bool Emission::_internal_has_identifier() const {
|
||||
return this != internal_default_instance() && _impl_.identifier_ != nullptr;
|
||||
}
|
||||
inline uint32_t Emission::_internal_frequency() const {
|
||||
inline bool Emission::has_identifier() const {
|
||||
return _internal_has_identifier();
|
||||
}
|
||||
inline const ::messages::track::Identifier& Emission::_internal_identifier() const {
|
||||
const ::messages::track::Identifier* p = _impl_.identifier_;
|
||||
return p != nullptr ? *p : reinterpret_cast<const ::messages::track::Identifier&>(
|
||||
::messages::track::_Identifier_default_instance_);
|
||||
}
|
||||
inline const ::messages::track::Identifier& Emission::identifier() const {
|
||||
// @@protoc_insertion_point(field_get:messages.SimTrack.Emission.Identifier)
|
||||
return _internal_identifier();
|
||||
}
|
||||
inline void Emission::unsafe_arena_set_allocated_identifier(
|
||||
::messages::track::Identifier* identifier) {
|
||||
if (GetArenaForAllocation() == nullptr) {
|
||||
delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.identifier_);
|
||||
}
|
||||
_impl_.identifier_ = identifier;
|
||||
if (identifier) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.SimTrack.Emission.Identifier)
|
||||
}
|
||||
inline ::messages::track::Identifier* Emission::release_identifier() {
|
||||
|
||||
::messages::track::Identifier* temp = _impl_.identifier_;
|
||||
_impl_.identifier_ = nullptr;
|
||||
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
|
||||
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
|
||||
if (GetArenaForAllocation() == nullptr) { delete old; }
|
||||
#else // PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||
if (GetArenaForAllocation() != nullptr) {
|
||||
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
|
||||
}
|
||||
#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||
return temp;
|
||||
}
|
||||
inline ::messages::track::Identifier* Emission::unsafe_arena_release_identifier() {
|
||||
// @@protoc_insertion_point(field_release:messages.SimTrack.Emission.Identifier)
|
||||
|
||||
::messages::track::Identifier* temp = _impl_.identifier_;
|
||||
_impl_.identifier_ = nullptr;
|
||||
return temp;
|
||||
}
|
||||
inline ::messages::track::Identifier* Emission::_internal_mutable_identifier() {
|
||||
|
||||
if (_impl_.identifier_ == nullptr) {
|
||||
auto* p = CreateMaybeMessage<::messages::track::Identifier>(GetArenaForAllocation());
|
||||
_impl_.identifier_ = p;
|
||||
}
|
||||
return _impl_.identifier_;
|
||||
}
|
||||
inline ::messages::track::Identifier* Emission::mutable_identifier() {
|
||||
::messages::track::Identifier* _msg = _internal_mutable_identifier();
|
||||
// @@protoc_insertion_point(field_mutable:messages.SimTrack.Emission.Identifier)
|
||||
return _msg;
|
||||
}
|
||||
inline void Emission::set_allocated_identifier(::messages::track::Identifier* identifier) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
|
||||
if (message_arena == nullptr) {
|
||||
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.identifier_);
|
||||
}
|
||||
if (identifier) {
|
||||
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
|
||||
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
|
||||
reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(identifier));
|
||||
if (message_arena != submessage_arena) {
|
||||
identifier = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
|
||||
message_arena, identifier, submessage_arena);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
_impl_.identifier_ = identifier;
|
||||
// @@protoc_insertion_point(field_set_allocated:messages.SimTrack.Emission.Identifier)
|
||||
}
|
||||
|
||||
// string name = 2;
|
||||
inline void Emission::clear_name() {
|
||||
_impl_.name_.ClearToEmpty();
|
||||
}
|
||||
inline const std::string& Emission::name() const {
|
||||
// @@protoc_insertion_point(field_get:messages.SimTrack.Emission.name)
|
||||
return _internal_name();
|
||||
}
|
||||
template <typename ArgT0, typename... ArgT>
|
||||
inline PROTOBUF_ALWAYS_INLINE
|
||||
void Emission::set_name(ArgT0&& arg0, ArgT... args) {
|
||||
|
||||
_impl_.name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
|
||||
// @@protoc_insertion_point(field_set:messages.SimTrack.Emission.name)
|
||||
}
|
||||
inline std::string* Emission::mutable_name() {
|
||||
std::string* _s = _internal_mutable_name();
|
||||
// @@protoc_insertion_point(field_mutable:messages.SimTrack.Emission.name)
|
||||
return _s;
|
||||
}
|
||||
inline const std::string& Emission::_internal_name() const {
|
||||
return _impl_.name_.Get();
|
||||
}
|
||||
inline void Emission::_internal_set_name(const std::string& value) {
|
||||
|
||||
_impl_.name_.Set(value, GetArenaForAllocation());
|
||||
}
|
||||
inline std::string* Emission::_internal_mutable_name() {
|
||||
|
||||
return _impl_.name_.Mutable(GetArenaForAllocation());
|
||||
}
|
||||
inline std::string* Emission::release_name() {
|
||||
// @@protoc_insertion_point(field_release:messages.SimTrack.Emission.name)
|
||||
return _impl_.name_.Release();
|
||||
}
|
||||
inline void Emission::set_allocated_name(std::string* name) {
|
||||
if (name != nullptr) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
_impl_.name_.SetAllocated(name, GetArenaForAllocation());
|
||||
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
if (_impl_.name_.IsDefault()) {
|
||||
_impl_.name_.Set("", GetArenaForAllocation());
|
||||
}
|
||||
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||
// @@protoc_insertion_point(field_set_allocated:messages.SimTrack.Emission.name)
|
||||
}
|
||||
|
||||
// double frequency = 3;
|
||||
inline void Emission::clear_frequency() {
|
||||
_impl_.frequency_ = 0;
|
||||
}
|
||||
inline double Emission::_internal_frequency() const {
|
||||
return _impl_.frequency_;
|
||||
}
|
||||
inline uint32_t Emission::frequency() const {
|
||||
inline double Emission::frequency() const {
|
||||
// @@protoc_insertion_point(field_get:messages.SimTrack.Emission.frequency)
|
||||
return _internal_frequency();
|
||||
}
|
||||
inline void Emission::_internal_set_frequency(uint32_t value) {
|
||||
inline void Emission::_internal_set_frequency(double value) {
|
||||
|
||||
_impl_.frequency_ = value;
|
||||
}
|
||||
inline void Emission::set_frequency(uint32_t value) {
|
||||
inline void Emission::set_frequency(double value) {
|
||||
_internal_set_frequency(value);
|
||||
// @@protoc_insertion_point(field_set:messages.SimTrack.Emission.frequency)
|
||||
}
|
||||
|
||||
// uint32 frequencyBandWith = 2;
|
||||
inline void Emission::clear_frequencybandwith() {
|
||||
_impl_.frequencybandwith_ = 0u;
|
||||
// double Range = 4;
|
||||
inline void Emission::clear_range() {
|
||||
_impl_.range_ = 0;
|
||||
}
|
||||
inline uint32_t Emission::_internal_frequencybandwith() const {
|
||||
return _impl_.frequencybandwith_;
|
||||
inline double Emission::_internal_range() const {
|
||||
return _impl_.range_;
|
||||
}
|
||||
inline uint32_t Emission::frequencybandwith() const {
|
||||
// @@protoc_insertion_point(field_get:messages.SimTrack.Emission.frequencyBandWith)
|
||||
return _internal_frequencybandwith();
|
||||
inline double Emission::range() const {
|
||||
// @@protoc_insertion_point(field_get:messages.SimTrack.Emission.Range)
|
||||
return _internal_range();
|
||||
}
|
||||
inline void Emission::_internal_set_frequencybandwith(uint32_t value) {
|
||||
inline void Emission::_internal_set_range(double value) {
|
||||
|
||||
_impl_.frequencybandwith_ = value;
|
||||
_impl_.range_ = value;
|
||||
}
|
||||
inline void Emission::set_frequencybandwith(uint32_t value) {
|
||||
_internal_set_frequencybandwith(value);
|
||||
// @@protoc_insertion_point(field_set:messages.SimTrack.Emission.frequencyBandWith)
|
||||
inline void Emission::set_range(double value) {
|
||||
_internal_set_range(value);
|
||||
// @@protoc_insertion_point(field_set:messages.SimTrack.Emission.Range)
|
||||
}
|
||||
|
||||
// uint32 pulseWidth = 3;
|
||||
// optional uint32 Bandwidth = 5;
|
||||
inline bool Emission::_internal_has_bandwidth() const {
|
||||
bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
|
||||
return value;
|
||||
}
|
||||
inline bool Emission::has_bandwidth() const {
|
||||
return _internal_has_bandwidth();
|
||||
}
|
||||
inline void Emission::clear_bandwidth() {
|
||||
_impl_.bandwidth_ = 0u;
|
||||
_impl_._has_bits_[0] &= ~0x00000001u;
|
||||
}
|
||||
inline uint32_t Emission::_internal_bandwidth() const {
|
||||
return _impl_.bandwidth_;
|
||||
}
|
||||
inline uint32_t Emission::bandwidth() const {
|
||||
// @@protoc_insertion_point(field_get:messages.SimTrack.Emission.Bandwidth)
|
||||
return _internal_bandwidth();
|
||||
}
|
||||
inline void Emission::_internal_set_bandwidth(uint32_t value) {
|
||||
_impl_._has_bits_[0] |= 0x00000001u;
|
||||
_impl_.bandwidth_ = value;
|
||||
}
|
||||
inline void Emission::set_bandwidth(uint32_t value) {
|
||||
_internal_set_bandwidth(value);
|
||||
// @@protoc_insertion_point(field_set:messages.SimTrack.Emission.Bandwidth)
|
||||
}
|
||||
|
||||
// optional uint32 pulseWidth = 6;
|
||||
inline bool Emission::_internal_has_pulsewidth() const {
|
||||
bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
|
||||
return value;
|
||||
}
|
||||
inline bool Emission::has_pulsewidth() const {
|
||||
return _internal_has_pulsewidth();
|
||||
}
|
||||
inline void Emission::clear_pulsewidth() {
|
||||
_impl_.pulsewidth_ = 0u;
|
||||
_impl_._has_bits_[0] &= ~0x00000002u;
|
||||
}
|
||||
inline uint32_t Emission::_internal_pulsewidth() const {
|
||||
return _impl_.pulsewidth_;
|
||||
@@ -928,7 +1243,7 @@ inline uint32_t Emission::pulsewidth() const {
|
||||
return _internal_pulsewidth();
|
||||
}
|
||||
inline void Emission::_internal_set_pulsewidth(uint32_t value) {
|
||||
|
||||
_impl_._has_bits_[0] |= 0x00000002u;
|
||||
_impl_.pulsewidth_ = value;
|
||||
}
|
||||
inline void Emission::set_pulsewidth(uint32_t value) {
|
||||
@@ -936,9 +1251,17 @@ inline void Emission::set_pulsewidth(uint32_t value) {
|
||||
// @@protoc_insertion_point(field_set:messages.SimTrack.Emission.pulseWidth)
|
||||
}
|
||||
|
||||
// uint32 pulseRepitition = 4;
|
||||
// optional uint32 pulseRepitition = 7;
|
||||
inline bool Emission::_internal_has_pulserepitition() const {
|
||||
bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
|
||||
return value;
|
||||
}
|
||||
inline bool Emission::has_pulserepitition() const {
|
||||
return _internal_has_pulserepitition();
|
||||
}
|
||||
inline void Emission::clear_pulserepitition() {
|
||||
_impl_.pulserepitition_ = 0u;
|
||||
_impl_._has_bits_[0] &= ~0x00000004u;
|
||||
}
|
||||
inline uint32_t Emission::_internal_pulserepitition() const {
|
||||
return _impl_.pulserepitition_;
|
||||
@@ -948,7 +1271,7 @@ inline uint32_t Emission::pulserepitition() const {
|
||||
return _internal_pulserepitition();
|
||||
}
|
||||
inline void Emission::_internal_set_pulserepitition(uint32_t value) {
|
||||
|
||||
_impl_._has_bits_[0] |= 0x00000004u;
|
||||
_impl_.pulserepitition_ = value;
|
||||
}
|
||||
inline void Emission::set_pulserepitition(uint32_t value) {
|
||||
@@ -956,9 +1279,17 @@ inline void Emission::set_pulserepitition(uint32_t value) {
|
||||
// @@protoc_insertion_point(field_set:messages.SimTrack.Emission.pulseRepitition)
|
||||
}
|
||||
|
||||
// uint32 radiatedPower = 5;
|
||||
// optional uint32 radiatedPower = 8;
|
||||
inline bool Emission::_internal_has_radiatedpower() const {
|
||||
bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0;
|
||||
return value;
|
||||
}
|
||||
inline bool Emission::has_radiatedpower() const {
|
||||
return _internal_has_radiatedpower();
|
||||
}
|
||||
inline void Emission::clear_radiatedpower() {
|
||||
_impl_.radiatedpower_ = 0u;
|
||||
_impl_._has_bits_[0] &= ~0x00000008u;
|
||||
}
|
||||
inline uint32_t Emission::_internal_radiatedpower() const {
|
||||
return _impl_.radiatedpower_;
|
||||
@@ -968,7 +1299,7 @@ inline uint32_t Emission::radiatedpower() const {
|
||||
return _internal_radiatedpower();
|
||||
}
|
||||
inline void Emission::_internal_set_radiatedpower(uint32_t value) {
|
||||
|
||||
_impl_._has_bits_[0] |= 0x00000008u;
|
||||
_impl_.radiatedpower_ = value;
|
||||
}
|
||||
inline void Emission::set_radiatedpower(uint32_t value) {
|
||||
@@ -976,9 +1307,17 @@ inline void Emission::set_radiatedpower(uint32_t value) {
|
||||
// @@protoc_insertion_point(field_set:messages.SimTrack.Emission.radiatedPower)
|
||||
}
|
||||
|
||||
// uint32 numberOfBeams = 6;
|
||||
// optional uint32 numberOfBeams = 9;
|
||||
inline bool Emission::_internal_has_numberofbeams() const {
|
||||
bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0;
|
||||
return value;
|
||||
}
|
||||
inline bool Emission::has_numberofbeams() const {
|
||||
return _internal_has_numberofbeams();
|
||||
}
|
||||
inline void Emission::clear_numberofbeams() {
|
||||
_impl_.numberofbeams_ = 0u;
|
||||
_impl_._has_bits_[0] &= ~0x00000010u;
|
||||
}
|
||||
inline uint32_t Emission::_internal_numberofbeams() const {
|
||||
return _impl_.numberofbeams_;
|
||||
@@ -988,7 +1327,7 @@ inline uint32_t Emission::numberofbeams() const {
|
||||
return _internal_numberofbeams();
|
||||
}
|
||||
inline void Emission::_internal_set_numberofbeams(uint32_t value) {
|
||||
|
||||
_impl_._has_bits_[0] |= 0x00000010u;
|
||||
_impl_.numberofbeams_ = value;
|
||||
}
|
||||
inline void Emission::set_numberofbeams(uint32_t value) {
|
||||
@@ -996,6 +1335,34 @@ inline void Emission::set_numberofbeams(uint32_t value) {
|
||||
// @@protoc_insertion_point(field_set:messages.SimTrack.Emission.numberOfBeams)
|
||||
}
|
||||
|
||||
// optional uint32 searchInterval = 10;
|
||||
inline bool Emission::_internal_has_searchinterval() const {
|
||||
bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0;
|
||||
return value;
|
||||
}
|
||||
inline bool Emission::has_searchinterval() const {
|
||||
return _internal_has_searchinterval();
|
||||
}
|
||||
inline void Emission::clear_searchinterval() {
|
||||
_impl_.searchinterval_ = 0u;
|
||||
_impl_._has_bits_[0] &= ~0x00000020u;
|
||||
}
|
||||
inline uint32_t Emission::_internal_searchinterval() const {
|
||||
return _impl_.searchinterval_;
|
||||
}
|
||||
inline uint32_t Emission::searchinterval() const {
|
||||
// @@protoc_insertion_point(field_get:messages.SimTrack.Emission.searchInterval)
|
||||
return _internal_searchinterval();
|
||||
}
|
||||
inline void Emission::_internal_set_searchinterval(uint32_t value) {
|
||||
_impl_._has_bits_[0] |= 0x00000020u;
|
||||
_impl_.searchinterval_ = value;
|
||||
}
|
||||
inline void Emission::set_searchinterval(uint32_t value) {
|
||||
_internal_set_searchinterval(value);
|
||||
// @@protoc_insertion_point(field_set:messages.SimTrack.Emission.searchInterval)
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif // __GNUC__
|
||||
|
||||
@@ -14,13 +14,13 @@ import "GeocentricPosition.proto";
|
||||
message SimTrack {
|
||||
|
||||
messages.track.Identifier EntityIdentifier = 1;
|
||||
uint32 ContactOrigin = 2;
|
||||
uint32 ContactSourceType = 2;
|
||||
messages.track.EntityGeocentricPosition GeocentricPosition = 3;
|
||||
double ContactSpeed = 4;
|
||||
double ContactCourse = 5;
|
||||
double ContactBearing = 6;
|
||||
double ContactRange = 7;
|
||||
uint32 ContactEnvironemnt = 8;
|
||||
optional double ContactSpeed = 4;
|
||||
optional double ContactCourse = 5;
|
||||
optional double ConactPitch = 6;
|
||||
optional uint32 ContactEnvironemnt = 7;
|
||||
optional double ContactRCS = 8;
|
||||
|
||||
repeated Emission ContactEmissions = 9;
|
||||
// google.protobuf.Timestamp timestamp = 9;
|
||||
@@ -28,11 +28,16 @@ message SimTrack {
|
||||
|
||||
message Emission
|
||||
{
|
||||
uint32 frequency = 1;
|
||||
uint32 frequencyBandWith = 2;
|
||||
uint32 pulseWidth = 3;
|
||||
uint32 pulseRepitition = 4;
|
||||
uint32 radiatedPower = 5;
|
||||
uint32 numberOfBeams = 6;
|
||||
messages.track.Identifier Identifier = 1;
|
||||
string name = 2;
|
||||
double frequency = 3;
|
||||
double Range = 4;
|
||||
optional uint32 Bandwidth = 5;
|
||||
optional uint32 pulseWidth = 6;
|
||||
optional uint32 pulseRepitition = 7;
|
||||
optional uint32 radiatedPower = 8;
|
||||
optional uint32 numberOfBeams = 9;
|
||||
optional uint32 searchInterval = 10;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,9 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include <WHISPER/whisper.hpp>
|
||||
#include <WHISPER/Messages/Message.hpp>
|
||||
|
||||
#include "SimCore/Messages/Protos/SimTrack.pb.h"
|
||||
#include <SimCore/Identifier.hpp>
|
||||
#include <SimCore/Position.hpp>
|
||||
#include <SimCore/data.hpp>
|
||||
|
||||
#include <SimCore/Messages/Emission.hpp>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace SimCore
|
||||
{
|
||||
@@ -11,23 +20,42 @@ namespace SimCore
|
||||
{
|
||||
private:
|
||||
const SimCore::Identifier ID_;
|
||||
|
||||
SimCore::TrackKind TrackKind_ = UNKNOWN_TRACK;
|
||||
|
||||
const WHISPER::SourceType SourceType_;
|
||||
|
||||
const SimCore::ObjectSource ObjectSource_;
|
||||
Position position_;
|
||||
|
||||
std::vector<Emission> EmitterList;
|
||||
|
||||
public:
|
||||
SimTrack();
|
||||
SimTrack(SimCore::Identifier id, SimCore::TrackKind trackkind, WHISPER::SourceType sourcetype, SimCore::ObjectSource);
|
||||
|
||||
void addPosition(SimCore::Position pos);
|
||||
SimCore::Position getPosition();
|
||||
|
||||
|
||||
SimTrack(WHISPER::SourceType sourcetype,SimCore::EntityKind entityKind);
|
||||
SimTrack( SimCore::Identifier id ,WHISPER::SourceType sourcetype,SimCore::EntityKind entityKind );
|
||||
|
||||
~SimTrack();
|
||||
|
||||
/// @brief
|
||||
/// @param pos
|
||||
void setPosition(SimCore::Position pos);
|
||||
/// @brief
|
||||
/// @param x
|
||||
/// @param y
|
||||
/// @param z
|
||||
void setPosition(double x, double y, double z);
|
||||
SimCore::Position getPosition();
|
||||
SimCore::Identifier getIdentifier();
|
||||
|
||||
|
||||
Data<double> Speed;
|
||||
Data<double> Course;
|
||||
Data<double> Pitch;
|
||||
Data<double> RCS;
|
||||
|
||||
Data<SimCore::EntityKind> EntityKind;
|
||||
|
||||
|
||||
WHISPER::Message buildMessage(SimCore::Identifier parentID);
|
||||
static SimTrack unpack(WHISPER::Message msg);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,17 @@
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
|
||||
#define RCS_DEFAULT 1000
|
||||
#define RCS_AIR 800
|
||||
#define RCS_SURFACE 10000
|
||||
#define RCS_LAND 100
|
||||
#define RCS_SPACE 100
|
||||
|
||||
namespace SimCore {
|
||||
|
||||
|
||||
|
||||
|
||||
/// 1m/s in knoten
|
||||
const double MsKt = 1.9438444924574;
|
||||
|
||||
|
||||
@@ -24,7 +24,14 @@ Identifier::Identifier(std::uint32_t parent,std::uint32_t number,bool external):
|
||||
|
||||
}
|
||||
|
||||
SimCore::Identifier::Identifier(messages::track::Identifier id)
|
||||
{
|
||||
this->uuid_ = id.uuid();
|
||||
this->parent_ = id.parent();
|
||||
this->number_ = id.number();
|
||||
this->external_ = id.external();
|
||||
|
||||
}
|
||||
|
||||
Identifier::Identifier(std::string str)
|
||||
{
|
||||
|
||||
96
src/SimCore/Messages/Emission.cpp
Normal file
96
src/SimCore/Messages/Emission.cpp
Normal file
@@ -0,0 +1,96 @@
|
||||
#include "SimCore/Messages/Emission.hpp"
|
||||
|
||||
namespace SimCore
|
||||
{
|
||||
|
||||
Emission::Emission(std::string name)
|
||||
:ID_(SimCore::Identifier())
|
||||
{
|
||||
this->name_.setValue(name);
|
||||
|
||||
}
|
||||
|
||||
SimCore::Emission::Emission(std::string name, SimCore::Identifier id)
|
||||
:ID_(id)
|
||||
{
|
||||
this->name_.setValue(name);
|
||||
}
|
||||
|
||||
messages::SimTrack::Emission SimCore::Emission::packEmission()
|
||||
{
|
||||
messages::SimTrack::Emission msg;
|
||||
msg.set_name(this->name_.getValue());
|
||||
|
||||
msg.mutable_identifier()->set_number(this->ID_.getNumber());
|
||||
msg.mutable_identifier()->set_external((uint32_t)this->ID_.isExternal());
|
||||
msg.mutable_identifier()->set_parent(this->ID_.getParentNumber());
|
||||
msg.mutable_identifier()->set_uuid(this->ID_.getUUID());
|
||||
|
||||
msg.set_range(Range.getValue());
|
||||
msg.set_frequency(Frequency.getValue());
|
||||
msg.set_bandwidth(Bandwidth.getValue());
|
||||
|
||||
if (msg.has_pulsewidth())
|
||||
{
|
||||
msg.set_pulsewidth(PulseWidth.getValue());
|
||||
}
|
||||
if (msg.has_pulserepitition())
|
||||
{
|
||||
msg.set_pulserepitition(PulseRepitition.getValue());
|
||||
}
|
||||
|
||||
if (msg.has_radiatedpower())
|
||||
{
|
||||
msg.set_radiatedpower(RadiatedPower.getValue());
|
||||
}
|
||||
|
||||
if (msg.has_searchinterval())
|
||||
{
|
||||
msg.set_searchinterval(searchInterval.getValue());
|
||||
}
|
||||
|
||||
if (msg.has_numberofbeams())
|
||||
{
|
||||
msg.set_numberofbeams(NumberOfBeams.getValue());
|
||||
}
|
||||
|
||||
return msg;
|
||||
|
||||
}
|
||||
|
||||
Emission Emission::unpackEmission(messages::SimTrack::Emission msg)
|
||||
{
|
||||
SimCore::Emission emission(msg.name(),SimCore::Identifier(msg.identifier()));
|
||||
|
||||
emission.Range.setValue(msg.range());
|
||||
emission.Frequency.setValue(msg.frequency());
|
||||
emission.Bandwidth.setValue(msg.bandwidth());
|
||||
emission.PulseWidth.setValue(msg.pulsewidth());
|
||||
emission.PulseRepitition.setValue(msg.pulserepitition());
|
||||
emission.RadiatedPower.setValue(msg.radiatedpower());
|
||||
emission.NumberOfBeams.setValue(msg.numberofbeams());
|
||||
emission.searchInterval.setValue(msg.searchinterval());
|
||||
|
||||
return emission;
|
||||
}
|
||||
|
||||
SimCore::Identifier Emission::getID() const
|
||||
{
|
||||
return this->ID_;
|
||||
}
|
||||
|
||||
std::string Emission::getName()
|
||||
{
|
||||
return this->name_.getValue();
|
||||
}
|
||||
|
||||
bool operator==(const Emission &lhs, const Emission &rhs)
|
||||
{
|
||||
if (lhs.getID().getUUID() == rhs.getID().getUUID())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,170 @@
|
||||
#include <SimCore/Messages/SimTrack.hpp>
|
||||
|
||||
/// @brief
|
||||
namespace SimCore
|
||||
{
|
||||
SimTrack::SimTrack()
|
||||
:ID_(SimCore::Identifier()),TrackKind_(SimCore::TrackKind::UNKNOWN_TRACK),SourceType_(WHISPER::SourceType::GATEWAY),ObjectSource_(SimCore::ObjectSource::INTERNAL)
|
||||
:ID_(SimCore::Identifier()),SourceType_(WHISPER::SourceType::SIMCOMTROLER)
|
||||
{
|
||||
EntityKind.setValue(SimCore::EntityKind::UNKNOWN);
|
||||
}
|
||||
|
||||
SimTrack::SimTrack(WHISPER::SourceType sourcetype,SimCore::EntityKind entityKind)
|
||||
:ID_(SimCore::Identifier()),SourceType_(WHISPER::SourceType::SIMCOMTROLER)
|
||||
{
|
||||
EntityKind.setValue(entityKind);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
SimTrack::SimTrack(SimCore::Identifier id, SimCore::TrackKind trackkind, WHISPER::SourceType sourcetype, SimCore::ObjectSource objsrc)
|
||||
:ID_(id),TrackKind_(trackkind),SourceType_(sourcetype),ObjectSource_(objsrc)
|
||||
SimTrack::SimTrack(SimCore::Identifier id ,WHISPER::SourceType sourcetype,SimCore::EntityKind entityKind )
|
||||
:ID_(id),SourceType_(WHISPER::SourceType::SIMCOMTROLER)
|
||||
{
|
||||
EntityKind.setValue(entityKind);
|
||||
|
||||
}
|
||||
|
||||
|
||||
SimTrack::~SimTrack()
|
||||
{
|
||||
}
|
||||
|
||||
SimCore::Identifier SimTrack::getIdentifier()
|
||||
{
|
||||
return ID_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SimTrack::setPosition(SimCore::Position pos)
|
||||
{
|
||||
position_ = pos;
|
||||
}
|
||||
|
||||
void SimTrack::setPosition(double x, double y, double z) {
|
||||
Position pos(x, y, z);
|
||||
position_ = pos;
|
||||
}
|
||||
|
||||
SimCore::Position SimTrack::getPosition()
|
||||
{
|
||||
return position_;
|
||||
}
|
||||
|
||||
|
||||
WHISPER::Message SimTrack::buildMessage(SimCore::Identifier parentID)
|
||||
{
|
||||
WHISPER::Message msg(parentID.getParentNumber(), parentID.getNumber(),WHISPER::MsgTopics::TRACK , WHISPER::MsgType::GROUND_TRUTH_TRACK, WHISPER::SourceType::GATEWAY);
|
||||
|
||||
|
||||
messages::SimTrack::SimTrack SimTrack;
|
||||
|
||||
SimTrack.mutable_geocentricposition()->set_x(position_.getGeocentricPos()(SimCore::X));
|
||||
SimTrack.mutable_geocentricposition()->set_y(position_.getGeocentricPos()(SimCore::Y));
|
||||
SimTrack.mutable_geocentricposition()->set_z(position_.getGeocentricPos()(SimCore::Z));
|
||||
|
||||
SimTrack.set_contactspeed(this->Speed.getValue());
|
||||
SimTrack.set_contactcourse(this->Course.getValue());
|
||||
SimTrack.set_conactpitch(this->Pitch.getValue());
|
||||
SimTrack.set_contactrcs(this->RCS.getValue());
|
||||
|
||||
|
||||
SimTrack.mutable_entityidentifier()->set_number(this->ID_.getNumber());
|
||||
SimTrack.mutable_entityidentifier()->set_external((uint32_t)this->ID_.isExternal());
|
||||
SimTrack.mutable_entityidentifier()->set_parent(this->ID_.getParentNumber());
|
||||
SimTrack.mutable_entityidentifier()->set_uuid(this->ID_.getUUID());
|
||||
|
||||
|
||||
// SimTrack.mutable_timestamp()->set_seconds(time(NULL));
|
||||
|
||||
auto any = std::make_shared<google::protobuf::Any>();
|
||||
|
||||
any->PackFrom(SimTrack);
|
||||
msg.addPayLoad(any);
|
||||
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
SimTrack SimTrack::unpack(WHISPER::Message msg)
|
||||
{
|
||||
|
||||
auto m = msg.getProtoMessage();
|
||||
|
||||
auto trackMsg = messages::SimTrack::SimTrack();
|
||||
if(m.payload().Is<messages::SimTrack::SimTrack>())
|
||||
{
|
||||
m.payload().UnpackTo(&trackMsg);
|
||||
}
|
||||
|
||||
SimCore::Identifier id(trackMsg.mutable_entityidentifier()->parent(),trackMsg.mutable_entityidentifier()->number(),trackMsg.mutable_entityidentifier()->uuid(),trackMsg.mutable_entityidentifier()->external());
|
||||
|
||||
|
||||
WHISPER::SourceType sourcetype = (WHISPER::SourceType)trackMsg.contactsourcetype();
|
||||
SimCore::EntityKind entityKind = (SimCore::EntityKind)trackMsg.contactenvironemnt();
|
||||
|
||||
SimCore::SimTrack track(id,sourcetype,entityKind);
|
||||
|
||||
|
||||
if (trackMsg.has_geocentricposition())
|
||||
{
|
||||
track.setPosition(trackMsg.mutable_geocentricposition()->x(), trackMsg.mutable_geocentricposition()->y(), trackMsg.mutable_geocentricposition()->z());
|
||||
}
|
||||
if (trackMsg.has_contactcourse())
|
||||
{
|
||||
track.Course.setValue(trackMsg.contactcourse());
|
||||
}
|
||||
if (trackMsg.has_contactspeed())
|
||||
{
|
||||
track.Speed.setValue(trackMsg.contactspeed());
|
||||
}
|
||||
if (trackMsg.has_conactpitch())
|
||||
{
|
||||
track.Pitch.setValue(trackMsg.contactspeed());
|
||||
}
|
||||
if (trackMsg.has_contactrcs())
|
||||
{
|
||||
track.RCS.setValue(trackMsg.contactrcs());
|
||||
}else
|
||||
{
|
||||
switch (entityKind)
|
||||
{
|
||||
case SimCore::EntityKind::AIR:
|
||||
{
|
||||
track.RCS.setValue(RCS_AIR);
|
||||
|
||||
break;
|
||||
}
|
||||
case SimCore::EntityKind::LAND:
|
||||
{
|
||||
track.RCS.setValue(RCS_LAND);
|
||||
break;
|
||||
}
|
||||
case SimCore::EntityKind::SURFACE:
|
||||
{
|
||||
track.RCS.setValue(RCS_SURFACE);
|
||||
break;
|
||||
}
|
||||
case SimCore::EntityKind::SPACE:
|
||||
{
|
||||
track.RCS.setValue(RCS_SPACE);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
track.RCS.setValue(RCS_DEFAULT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return track;
|
||||
}
|
||||
|
||||
} // namespace SimCore
|
||||
|
||||
83
tests/test_SimTrack.cpp
Normal file
83
tests/test_SimTrack.cpp
Normal file
@@ -0,0 +1,83 @@
|
||||
#include <SimCore/Messages/SimTrack.hpp>
|
||||
#include <WHISPER/Messages/Message.hpp>
|
||||
#include <SimCore/SimCore.hpp>
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#define CATCH_CONFIG_MAIN
|
||||
#include <catch2/catch.hpp>
|
||||
#include <SimCore/Position.hpp>
|
||||
|
||||
|
||||
|
||||
|
||||
SCENARIO("Testing the SimCore Track")
|
||||
{
|
||||
GIVEN("different Attributes for a Track in different forms")
|
||||
{
|
||||
Eigen::Vector3d GeocentPos1;
|
||||
GeocentPos1(SimCore::GeocentricPosition::X) = 3784014.333;
|
||||
GeocentPos1(SimCore::GeocentricPosition::Y) = 899869.779;
|
||||
GeocentPos1(SimCore::GeocentricPosition::Z) = 5037960.502;
|
||||
Eigen::Vector3d GeodesPos1;
|
||||
GeodesPos1(SimCore::GeodesicPosition::LATITUDE) = 52.516181;
|
||||
GeodesPos1(SimCore::GeodesicPosition::LONGITUDE) = 13.376935;
|
||||
GeodesPos1(SimCore::GeodesicPosition::HEIGHT) = 0;
|
||||
|
||||
SimCore::Position pos1(GeocentPos1(SimCore::X),GeocentPos1(SimCore::Y),GeocentPos1(SimCore::Z));
|
||||
|
||||
double course = 90;
|
||||
double speed = 10;
|
||||
double knots = speed * SimCore::MsKt;
|
||||
bool testOperator = false;
|
||||
|
||||
std::shared_ptr<WHISPER::Message> msg = NULL;
|
||||
|
||||
std::shared_ptr<SimCore::SimTrack> trackPtr = NULL;
|
||||
|
||||
std::string serializedMSG;
|
||||
|
||||
WHEN("constructing Track Object with data")
|
||||
{
|
||||
SimCore::Position pos( GeocentPos1(SimCore::GeocentricPosition::X), GeocentPos1(SimCore::GeocentricPosition::Y), GeocentPos1(SimCore::GeocentricPosition::Z));
|
||||
SimCore::SimTrack track(WHISPER::SourceType::SHIP,SimCore::EntityKind::LAND);
|
||||
track.Speed.setValue(speed);
|
||||
track.Course.setValue(course);
|
||||
track.setPosition(pos1);
|
||||
|
||||
if (track.getPosition() == pos) {
|
||||
testOperator = true;
|
||||
}
|
||||
// serializedMSG = track.buildMessage(parentID).serialize();
|
||||
// msg = std::make_shared<WHISPER::Message>(serializedMSG);
|
||||
|
||||
// if (msg.get()->msgType_ == WHISPER::GROUND_TRUTH_TRACK) {
|
||||
|
||||
// trackPtr = std::make_shared<SimCore::SimTrack>(std::move(SimCore::SimTrack::unpack(*msg)));
|
||||
// }
|
||||
|
||||
// std::string trackstring = track.buildMessage(parentID).serialize();
|
||||
|
||||
// SimCore::GroundTruthTrack trackDeserialized = SimCore::GroundTruthTrack::unpack(*msg);
|
||||
|
||||
|
||||
THEN("check if Track attributes are correct")
|
||||
{
|
||||
REQUIRE(testOperator == true);
|
||||
REQUIRE(track.Course.getValue() == course);
|
||||
REQUIRE(track.Speed.getValue() == speed);
|
||||
REQUIRE(track.getPosition().getGeocentricPos() == pos.getGeocentricPos());
|
||||
|
||||
// REQUIRE(msg.get()->msgType_ == WHISPER::GROUND_TRUTH_TRACK);
|
||||
// REQUIRE(trackPtr->Speed.getValue() == speed);
|
||||
// REQUIRE(trackPtr->getPosition().getGeocentricPos() == GeocentPos1);
|
||||
// REQUIRE(trackPtr->getIdentifier().getNumber() > 0);
|
||||
// REQUIRE(trackDeserialized.getIdentifier().getNumber() > 0);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} //THEN
|
||||
} // WHEN
|
||||
} // GIVEN
|
||||
} //SCENARIO
|
||||
Reference in New Issue
Block a user