FIX: fixed some issues where the position were not valid
This commit is contained in:
@@ -91,12 +91,12 @@ const uint32_t TableStruct_SimTrack_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE
|
|||||||
PROTOBUF_FIELD_OFFSET(::messages::SimTrack::SimTrack, _impl_.contactemissions_),
|
PROTOBUF_FIELD_OFFSET(::messages::SimTrack::SimTrack, _impl_.contactemissions_),
|
||||||
~0u,
|
~0u,
|
||||||
~0u,
|
~0u,
|
||||||
~0u,
|
|
||||||
0,
|
0,
|
||||||
2,
|
|
||||||
3,
|
|
||||||
1,
|
1,
|
||||||
|
3,
|
||||||
4,
|
4,
|
||||||
|
2,
|
||||||
|
5,
|
||||||
~0u,
|
~0u,
|
||||||
PROTOBUF_FIELD_OFFSET(::messages::SimTrack::Emission, _impl_._has_bits_),
|
PROTOBUF_FIELD_OFFSET(::messages::SimTrack::Emission, _impl_._has_bits_),
|
||||||
PROTOBUF_FIELD_OFFSET(::messages::SimTrack::Emission, _internal_metadata_),
|
PROTOBUF_FIELD_OFFSET(::messages::SimTrack::Emission, _internal_metadata_),
|
||||||
@@ -139,28 +139,29 @@ const char descriptor_table_protodef_SimTrack_2eproto[] PROTOBUF_SECTION_VARIABL
|
|||||||
"\n\016SimTrack.proto\022\021messages.SimTrack\032\037goo"
|
"\n\016SimTrack.proto\022\021messages.SimTrack\032\037goo"
|
||||||
"gle/protobuf/timestamp.proto\032\036google/pro"
|
"gle/protobuf/timestamp.proto\032\036google/pro"
|
||||||
"tobuf/duration.proto\032\020Identifier.proto\032\030"
|
"tobuf/duration.proto\032\020Identifier.proto\032\030"
|
||||||
"GeocentricPosition.proto\"\274\003\n\010SimTrack\0224\n"
|
"GeocentricPosition.proto\"\330\003\n\010SimTrack\0224\n"
|
||||||
"\020EntityIdentifier\030\001 \001(\0132\032.messages.track"
|
"\020EntityIdentifier\030\001 \001(\0132\032.messages.track"
|
||||||
".Identifier\022\031\n\021ContactSourceType\030\002 \001(\r\022D"
|
".Identifier\022\031\n\021ContactSourceType\030\002 \001(\r\022I"
|
||||||
"\n\022GeocentricPosition\030\003 \001(\0132(.messages.tr"
|
"\n\022GeocentricPosition\030\003 \001(\0132(.messages.tr"
|
||||||
"ack.EntityGeocentricPosition\022\031\n\014ContactS"
|
"ack.EntityGeocentricPositionH\000\210\001\001\022\031\n\014Con"
|
||||||
"peed\030\004 \001(\001H\000\210\001\001\022\032\n\rContactCourse\030\005 \001(\001H\001"
|
"tactSpeed\030\004 \001(\001H\001\210\001\001\022\032\n\rContactCourse\030\005 "
|
||||||
"\210\001\001\022\030\n\013ConactPitch\030\006 \001(\001H\002\210\001\001\022\037\n\022Contact"
|
"\001(\001H\002\210\001\001\022\030\n\013ConactPitch\030\006 \001(\001H\003\210\001\001\022\037\n\022Co"
|
||||||
"Environemnt\030\007 \001(\rH\003\210\001\001\022\027\n\nContactRCS\030\010 \001"
|
"ntactEnvironemnt\030\007 \001(\rH\004\210\001\001\022\027\n\nContactRC"
|
||||||
"(\001H\004\210\001\001\0225\n\020ContactEmissions\030\t \003(\0132\033.mess"
|
"S\030\010 \001(\001H\005\210\001\001\0225\n\020ContactEmissions\030\t \003(\0132\033"
|
||||||
"ages.SimTrack.EmissionB\017\n\r_ContactSpeedB"
|
".messages.SimTrack.EmissionB\025\n\023_Geocentr"
|
||||||
"\020\n\016_ContactCourseB\016\n\014_ConactPitchB\025\n\023_Co"
|
"icPositionB\017\n\r_ContactSpeedB\020\n\016_ContactC"
|
||||||
"ntactEnvironemntB\r\n\013_ContactRCS\"\366\002\n\010Emis"
|
"ourseB\016\n\014_ConactPitchB\025\n\023_ContactEnviron"
|
||||||
"sion\022.\n\nIdentifier\030\001 \001(\0132\032.messages.trac"
|
"emntB\r\n\013_ContactRCS\"\366\002\n\010Emission\022.\n\nIden"
|
||||||
"k.Identifier\022\014\n\004name\030\002 \001(\t\022\021\n\tfrequency\030"
|
"tifier\030\001 \001(\0132\032.messages.track.Identifier"
|
||||||
"\003 \001(\001\022\r\n\005Range\030\004 \001(\001\022\026\n\tBandwidth\030\005 \001(\rH"
|
"\022\014\n\004name\030\002 \001(\t\022\021\n\tfrequency\030\003 \001(\001\022\r\n\005Ran"
|
||||||
"\000\210\001\001\022\027\n\npulseWidth\030\006 \001(\rH\001\210\001\001\022\034\n\017pulseRe"
|
"ge\030\004 \001(\001\022\026\n\tBandwidth\030\005 \001(\rH\000\210\001\001\022\027\n\npuls"
|
||||||
"pitition\030\007 \001(\rH\002\210\001\001\022\032\n\rradiatedPower\030\010 \001"
|
"eWidth\030\006 \001(\rH\001\210\001\001\022\034\n\017pulseRepitition\030\007 \001"
|
||||||
"(\rH\003\210\001\001\022\032\n\rnumberOfBeams\030\t \001(\rH\004\210\001\001\022\033\n\016s"
|
"(\rH\002\210\001\001\022\032\n\rradiatedPower\030\010 \001(\rH\003\210\001\001\022\032\n\rn"
|
||||||
"earchInterval\030\n \001(\rH\005\210\001\001B\014\n\n_BandwidthB\r"
|
"umberOfBeams\030\t \001(\rH\004\210\001\001\022\033\n\016searchInterva"
|
||||||
"\n\013_pulseWidthB\022\n\020_pulseRepititionB\020\n\016_ra"
|
"l\030\n \001(\rH\005\210\001\001B\014\n\n_BandwidthB\r\n\013_pulseWidt"
|
||||||
"diatedPowerB\020\n\016_numberOfBeamsB\021\n\017_search"
|
"hB\022\n\020_pulseRepititionB\020\n\016_radiatedPowerB"
|
||||||
"Intervalb\006proto3"
|
"\020\n\016_numberOfBeamsB\021\n\017_searchIntervalb\006pr"
|
||||||
|
"oto3"
|
||||||
;
|
;
|
||||||
static const ::_pbi::DescriptorTable* const descriptor_table_SimTrack_2eproto_deps[4] = {
|
static const ::_pbi::DescriptorTable* const descriptor_table_SimTrack_2eproto_deps[4] = {
|
||||||
&::descriptor_table_GeocentricPosition_2eproto,
|
&::descriptor_table_GeocentricPosition_2eproto,
|
||||||
@@ -170,7 +171,7 @@ static const ::_pbi::DescriptorTable* const descriptor_table_SimTrack_2eproto_de
|
|||||||
};
|
};
|
||||||
static ::_pbi::once_flag descriptor_table_SimTrack_2eproto_once;
|
static ::_pbi::once_flag descriptor_table_SimTrack_2eproto_once;
|
||||||
const ::_pbi::DescriptorTable descriptor_table_SimTrack_2eproto = {
|
const ::_pbi::DescriptorTable descriptor_table_SimTrack_2eproto = {
|
||||||
false, false, 976, descriptor_table_protodef_SimTrack_2eproto,
|
false, false, 1004, descriptor_table_protodef_SimTrack_2eproto,
|
||||||
"SimTrack.proto",
|
"SimTrack.proto",
|
||||||
&descriptor_table_SimTrack_2eproto_once, descriptor_table_SimTrack_2eproto_deps, 4, 2,
|
&descriptor_table_SimTrack_2eproto_once, descriptor_table_SimTrack_2eproto_deps, 4, 2,
|
||||||
schemas, file_default_instances, TableStruct_SimTrack_2eproto::offsets,
|
schemas, file_default_instances, TableStruct_SimTrack_2eproto::offsets,
|
||||||
@@ -193,21 +194,24 @@ class SimTrack::_Internal {
|
|||||||
using HasBits = decltype(std::declval<SimTrack>()._impl_._has_bits_);
|
using HasBits = decltype(std::declval<SimTrack>()._impl_._has_bits_);
|
||||||
static const ::messages::track::Identifier& entityidentifier(const SimTrack* msg);
|
static const ::messages::track::Identifier& entityidentifier(const SimTrack* msg);
|
||||||
static const ::messages::track::EntityGeocentricPosition& geocentricposition(const SimTrack* msg);
|
static const ::messages::track::EntityGeocentricPosition& geocentricposition(const SimTrack* msg);
|
||||||
static void set_has_contactspeed(HasBits* has_bits) {
|
static void set_has_geocentricposition(HasBits* has_bits) {
|
||||||
(*has_bits)[0] |= 1u;
|
(*has_bits)[0] |= 1u;
|
||||||
}
|
}
|
||||||
static void set_has_contactcourse(HasBits* has_bits) {
|
static void set_has_contactspeed(HasBits* has_bits) {
|
||||||
(*has_bits)[0] |= 4u;
|
|
||||||
}
|
|
||||||
static void set_has_conactpitch(HasBits* has_bits) {
|
|
||||||
(*has_bits)[0] |= 8u;
|
|
||||||
}
|
|
||||||
static void set_has_contactenvironemnt(HasBits* has_bits) {
|
|
||||||
(*has_bits)[0] |= 2u;
|
(*has_bits)[0] |= 2u;
|
||||||
}
|
}
|
||||||
static void set_has_contactrcs(HasBits* has_bits) {
|
static void set_has_contactcourse(HasBits* has_bits) {
|
||||||
|
(*has_bits)[0] |= 8u;
|
||||||
|
}
|
||||||
|
static void set_has_conactpitch(HasBits* has_bits) {
|
||||||
(*has_bits)[0] |= 16u;
|
(*has_bits)[0] |= 16u;
|
||||||
}
|
}
|
||||||
|
static void set_has_contactenvironemnt(HasBits* has_bits) {
|
||||||
|
(*has_bits)[0] |= 4u;
|
||||||
|
}
|
||||||
|
static void set_has_contactrcs(HasBits* has_bits) {
|
||||||
|
(*has_bits)[0] |= 32u;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const ::messages::track::Identifier&
|
const ::messages::track::Identifier&
|
||||||
@@ -225,10 +229,8 @@ void SimTrack::clear_entityidentifier() {
|
|||||||
_impl_.entityidentifier_ = nullptr;
|
_impl_.entityidentifier_ = nullptr;
|
||||||
}
|
}
|
||||||
void SimTrack::clear_geocentricposition() {
|
void SimTrack::clear_geocentricposition() {
|
||||||
if (GetArenaForAllocation() == nullptr && _impl_.geocentricposition_ != nullptr) {
|
if (_impl_.geocentricposition_ != nullptr) _impl_.geocentricposition_->Clear();
|
||||||
delete _impl_.geocentricposition_;
|
_impl_._has_bits_[0] &= ~0x00000001u;
|
||||||
}
|
|
||||||
_impl_.geocentricposition_ = nullptr;
|
|
||||||
}
|
}
|
||||||
SimTrack::SimTrack(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
SimTrack::SimTrack(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
||||||
bool is_message_owned)
|
bool is_message_owned)
|
||||||
@@ -315,14 +317,14 @@ void SimTrack::Clear() {
|
|||||||
delete _impl_.entityidentifier_;
|
delete _impl_.entityidentifier_;
|
||||||
}
|
}
|
||||||
_impl_.entityidentifier_ = nullptr;
|
_impl_.entityidentifier_ = nullptr;
|
||||||
if (GetArenaForAllocation() == nullptr && _impl_.geocentricposition_ != nullptr) {
|
cached_has_bits = _impl_._has_bits_[0];
|
||||||
delete _impl_.geocentricposition_;
|
if (cached_has_bits & 0x00000001u) {
|
||||||
|
GOOGLE_DCHECK(_impl_.geocentricposition_ != nullptr);
|
||||||
|
_impl_.geocentricposition_->Clear();
|
||||||
}
|
}
|
||||||
_impl_.geocentricposition_ = nullptr;
|
|
||||||
_impl_.contactspeed_ = 0;
|
_impl_.contactspeed_ = 0;
|
||||||
_impl_.contactsourcetype_ = 0u;
|
_impl_.contactsourcetype_ = 0u;
|
||||||
cached_has_bits = _impl_._has_bits_[0];
|
if (cached_has_bits & 0x0000003cu) {
|
||||||
if (cached_has_bits & 0x0000001eu) {
|
|
||||||
::memset(&_impl_.contactenvironemnt_, 0, static_cast<size_t>(
|
::memset(&_impl_.contactenvironemnt_, 0, static_cast<size_t>(
|
||||||
reinterpret_cast<char*>(&_impl_.contactrcs_) -
|
reinterpret_cast<char*>(&_impl_.contactrcs_) -
|
||||||
reinterpret_cast<char*>(&_impl_.contactenvironemnt_)) + sizeof(_impl_.contactrcs_));
|
reinterpret_cast<char*>(&_impl_.contactenvironemnt_)) + sizeof(_impl_.contactrcs_));
|
||||||
@@ -354,7 +356,7 @@ const char* SimTrack::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx)
|
|||||||
} else
|
} else
|
||||||
goto handle_unusual;
|
goto handle_unusual;
|
||||||
continue;
|
continue;
|
||||||
// .messages.track.EntityGeocentricPosition GeocentricPosition = 3;
|
// optional .messages.track.EntityGeocentricPosition GeocentricPosition = 3;
|
||||||
case 3:
|
case 3:
|
||||||
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
|
||||||
ptr = ctx->ParseMessage(_internal_mutable_geocentricposition(), ptr);
|
ptr = ctx->ParseMessage(_internal_mutable_geocentricposition(), ptr);
|
||||||
@@ -463,8 +465,8 @@ uint8_t* SimTrack::_InternalSerialize(
|
|||||||
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_contactsourcetype(), target);
|
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_contactsourcetype(), target);
|
||||||
}
|
}
|
||||||
|
|
||||||
// .messages.track.EntityGeocentricPosition GeocentricPosition = 3;
|
// optional .messages.track.EntityGeocentricPosition GeocentricPosition = 3;
|
||||||
if (this->_internal_has_geocentricposition()) {
|
if (_internal_has_geocentricposition()) {
|
||||||
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
||||||
InternalWriteMessage(3, _Internal::geocentricposition(this),
|
InternalWriteMessage(3, _Internal::geocentricposition(this),
|
||||||
_Internal::geocentricposition(this).GetCachedSize(), target, stream);
|
_Internal::geocentricposition(this).GetCachedSize(), target, stream);
|
||||||
@@ -538,45 +540,47 @@ size_t SimTrack::ByteSizeLong() const {
|
|||||||
*_impl_.entityidentifier_);
|
*_impl_.entityidentifier_);
|
||||||
}
|
}
|
||||||
|
|
||||||
// .messages.track.EntityGeocentricPosition GeocentricPosition = 3;
|
cached_has_bits = _impl_._has_bits_[0];
|
||||||
if (this->_internal_has_geocentricposition()) {
|
if (cached_has_bits & 0x00000003u) {
|
||||||
|
// optional .messages.track.EntityGeocentricPosition GeocentricPosition = 3;
|
||||||
|
if (cached_has_bits & 0x00000001u) {
|
||||||
total_size += 1 +
|
total_size += 1 +
|
||||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
|
||||||
*_impl_.geocentricposition_);
|
*_impl_.geocentricposition_);
|
||||||
}
|
}
|
||||||
|
|
||||||
// optional double ContactSpeed = 4;
|
// optional double ContactSpeed = 4;
|
||||||
cached_has_bits = _impl_._has_bits_[0];
|
if (cached_has_bits & 0x00000002u) {
|
||||||
if (cached_has_bits & 0x00000001u) {
|
|
||||||
total_size += 1 + 8;
|
total_size += 1 + 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
// uint32 ContactSourceType = 2;
|
// uint32 ContactSourceType = 2;
|
||||||
if (this->_internal_contactsourcetype() != 0) {
|
if (this->_internal_contactsourcetype() != 0) {
|
||||||
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_contactsourcetype());
|
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_contactsourcetype());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cached_has_bits & 0x0000001eu) {
|
if (cached_has_bits & 0x0000003cu) {
|
||||||
// optional uint32 ContactEnvironemnt = 7;
|
// optional uint32 ContactEnvironemnt = 7;
|
||||||
if (cached_has_bits & 0x00000002u) {
|
if (cached_has_bits & 0x00000004u) {
|
||||||
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_contactenvironemnt());
|
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_contactenvironemnt());
|
||||||
}
|
}
|
||||||
|
|
||||||
// optional double ContactCourse = 5;
|
// optional double ContactCourse = 5;
|
||||||
if (cached_has_bits & 0x00000004u) {
|
|
||||||
total_size += 1 + 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
// optional double ConactPitch = 6;
|
|
||||||
if (cached_has_bits & 0x00000008u) {
|
if (cached_has_bits & 0x00000008u) {
|
||||||
total_size += 1 + 8;
|
total_size += 1 + 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
// optional double ContactRCS = 8;
|
// optional double ConactPitch = 6;
|
||||||
if (cached_has_bits & 0x00000010u) {
|
if (cached_has_bits & 0x00000010u) {
|
||||||
total_size += 1 + 8;
|
total_size += 1 + 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// optional double ContactRCS = 8;
|
||||||
|
if (cached_has_bits & 0x00000020u) {
|
||||||
|
total_size += 1 + 8;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
||||||
}
|
}
|
||||||
@@ -601,28 +605,31 @@ void SimTrack::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTO
|
|||||||
_this->_internal_mutable_entityidentifier()->::messages::track::Identifier::MergeFrom(
|
_this->_internal_mutable_entityidentifier()->::messages::track::Identifier::MergeFrom(
|
||||||
from._internal_entityidentifier());
|
from._internal_entityidentifier());
|
||||||
}
|
}
|
||||||
if (from._internal_has_geocentricposition()) {
|
cached_has_bits = from._impl_._has_bits_[0];
|
||||||
|
if (cached_has_bits & 0x00000003u) {
|
||||||
|
if (cached_has_bits & 0x00000001u) {
|
||||||
_this->_internal_mutable_geocentricposition()->::messages::track::EntityGeocentricPosition::MergeFrom(
|
_this->_internal_mutable_geocentricposition()->::messages::track::EntityGeocentricPosition::MergeFrom(
|
||||||
from._internal_geocentricposition());
|
from._internal_geocentricposition());
|
||||||
}
|
}
|
||||||
if (from._internal_has_contactspeed()) {
|
if (cached_has_bits & 0x00000002u) {
|
||||||
_this->_internal_set_contactspeed(from._internal_contactspeed());
|
_this->_impl_.contactspeed_ = from._impl_.contactspeed_;
|
||||||
|
}
|
||||||
|
_this->_impl_._has_bits_[0] |= cached_has_bits;
|
||||||
}
|
}
|
||||||
if (from._internal_contactsourcetype() != 0) {
|
if (from._internal_contactsourcetype() != 0) {
|
||||||
_this->_internal_set_contactsourcetype(from._internal_contactsourcetype());
|
_this->_internal_set_contactsourcetype(from._internal_contactsourcetype());
|
||||||
}
|
}
|
||||||
cached_has_bits = from._impl_._has_bits_[0];
|
if (cached_has_bits & 0x0000003cu) {
|
||||||
if (cached_has_bits & 0x0000001eu) {
|
if (cached_has_bits & 0x00000004u) {
|
||||||
if (cached_has_bits & 0x00000002u) {
|
|
||||||
_this->_impl_.contactenvironemnt_ = from._impl_.contactenvironemnt_;
|
_this->_impl_.contactenvironemnt_ = from._impl_.contactenvironemnt_;
|
||||||
}
|
}
|
||||||
if (cached_has_bits & 0x00000004u) {
|
if (cached_has_bits & 0x00000008u) {
|
||||||
_this->_impl_.contactcourse_ = from._impl_.contactcourse_;
|
_this->_impl_.contactcourse_ = from._impl_.contactcourse_;
|
||||||
}
|
}
|
||||||
if (cached_has_bits & 0x00000008u) {
|
if (cached_has_bits & 0x00000010u) {
|
||||||
_this->_impl_.conactpitch_ = from._impl_.conactpitch_;
|
_this->_impl_.conactpitch_ = from._impl_.conactpitch_;
|
||||||
}
|
}
|
||||||
if (cached_has_bits & 0x00000010u) {
|
if (cached_has_bits & 0x00000020u) {
|
||||||
_this->_impl_.contactrcs_ = from._impl_.contactrcs_;
|
_this->_impl_.contactrcs_ = from._impl_.contactrcs_;
|
||||||
}
|
}
|
||||||
_this->_impl_._has_bits_[0] |= cached_has_bits;
|
_this->_impl_._has_bits_[0] |= cached_has_bits;
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ class SimTrack final :
|
|||||||
::messages::track::Identifier* entityidentifier);
|
::messages::track::Identifier* entityidentifier);
|
||||||
::messages::track::Identifier* unsafe_arena_release_entityidentifier();
|
::messages::track::Identifier* unsafe_arena_release_entityidentifier();
|
||||||
|
|
||||||
// .messages.track.EntityGeocentricPosition GeocentricPosition = 3;
|
// optional .messages.track.EntityGeocentricPosition GeocentricPosition = 3;
|
||||||
bool has_geocentricposition() const;
|
bool has_geocentricposition() const;
|
||||||
private:
|
private:
|
||||||
bool _internal_has_geocentricposition() const;
|
bool _internal_has_geocentricposition() const;
|
||||||
@@ -751,9 +751,11 @@ inline void SimTrack::set_contactsourcetype(uint32_t value) {
|
|||||||
// @@protoc_insertion_point(field_set:messages.SimTrack.SimTrack.ContactSourceType)
|
// @@protoc_insertion_point(field_set:messages.SimTrack.SimTrack.ContactSourceType)
|
||||||
}
|
}
|
||||||
|
|
||||||
// .messages.track.EntityGeocentricPosition GeocentricPosition = 3;
|
// optional .messages.track.EntityGeocentricPosition GeocentricPosition = 3;
|
||||||
inline bool SimTrack::_internal_has_geocentricposition() const {
|
inline bool SimTrack::_internal_has_geocentricposition() const {
|
||||||
return this != internal_default_instance() && _impl_.geocentricposition_ != nullptr;
|
bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
|
||||||
|
PROTOBUF_ASSUME(!value || _impl_.geocentricposition_ != nullptr);
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
inline bool SimTrack::has_geocentricposition() const {
|
inline bool SimTrack::has_geocentricposition() const {
|
||||||
return _internal_has_geocentricposition();
|
return _internal_has_geocentricposition();
|
||||||
@@ -774,14 +776,14 @@ inline void SimTrack::unsafe_arena_set_allocated_geocentricposition(
|
|||||||
}
|
}
|
||||||
_impl_.geocentricposition_ = geocentricposition;
|
_impl_.geocentricposition_ = geocentricposition;
|
||||||
if (geocentricposition) {
|
if (geocentricposition) {
|
||||||
|
_impl_._has_bits_[0] |= 0x00000001u;
|
||||||
} else {
|
} else {
|
||||||
|
_impl_._has_bits_[0] &= ~0x00000001u;
|
||||||
}
|
}
|
||||||
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.SimTrack.SimTrack.GeocentricPosition)
|
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:messages.SimTrack.SimTrack.GeocentricPosition)
|
||||||
}
|
}
|
||||||
inline ::messages::track::EntityGeocentricPosition* SimTrack::release_geocentricposition() {
|
inline ::messages::track::EntityGeocentricPosition* SimTrack::release_geocentricposition() {
|
||||||
|
_impl_._has_bits_[0] &= ~0x00000001u;
|
||||||
::messages::track::EntityGeocentricPosition* temp = _impl_.geocentricposition_;
|
::messages::track::EntityGeocentricPosition* temp = _impl_.geocentricposition_;
|
||||||
_impl_.geocentricposition_ = nullptr;
|
_impl_.geocentricposition_ = nullptr;
|
||||||
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
|
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||||
@@ -797,13 +799,13 @@ inline ::messages::track::EntityGeocentricPosition* SimTrack::release_geocentric
|
|||||||
}
|
}
|
||||||
inline ::messages::track::EntityGeocentricPosition* SimTrack::unsafe_arena_release_geocentricposition() {
|
inline ::messages::track::EntityGeocentricPosition* SimTrack::unsafe_arena_release_geocentricposition() {
|
||||||
// @@protoc_insertion_point(field_release:messages.SimTrack.SimTrack.GeocentricPosition)
|
// @@protoc_insertion_point(field_release:messages.SimTrack.SimTrack.GeocentricPosition)
|
||||||
|
_impl_._has_bits_[0] &= ~0x00000001u;
|
||||||
::messages::track::EntityGeocentricPosition* temp = _impl_.geocentricposition_;
|
::messages::track::EntityGeocentricPosition* temp = _impl_.geocentricposition_;
|
||||||
_impl_.geocentricposition_ = nullptr;
|
_impl_.geocentricposition_ = nullptr;
|
||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
inline ::messages::track::EntityGeocentricPosition* SimTrack::_internal_mutable_geocentricposition() {
|
inline ::messages::track::EntityGeocentricPosition* SimTrack::_internal_mutable_geocentricposition() {
|
||||||
|
_impl_._has_bits_[0] |= 0x00000001u;
|
||||||
if (_impl_.geocentricposition_ == nullptr) {
|
if (_impl_.geocentricposition_ == nullptr) {
|
||||||
auto* p = CreateMaybeMessage<::messages::track::EntityGeocentricPosition>(GetArenaForAllocation());
|
auto* p = CreateMaybeMessage<::messages::track::EntityGeocentricPosition>(GetArenaForAllocation());
|
||||||
_impl_.geocentricposition_ = p;
|
_impl_.geocentricposition_ = p;
|
||||||
@@ -828,9 +830,9 @@ inline void SimTrack::set_allocated_geocentricposition(::messages::track::Entity
|
|||||||
geocentricposition = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
|
geocentricposition = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
|
||||||
message_arena, geocentricposition, submessage_arena);
|
message_arena, geocentricposition, submessage_arena);
|
||||||
}
|
}
|
||||||
|
_impl_._has_bits_[0] |= 0x00000001u;
|
||||||
} else {
|
} else {
|
||||||
|
_impl_._has_bits_[0] &= ~0x00000001u;
|
||||||
}
|
}
|
||||||
_impl_.geocentricposition_ = geocentricposition;
|
_impl_.geocentricposition_ = geocentricposition;
|
||||||
// @@protoc_insertion_point(field_set_allocated:messages.SimTrack.SimTrack.GeocentricPosition)
|
// @@protoc_insertion_point(field_set_allocated:messages.SimTrack.SimTrack.GeocentricPosition)
|
||||||
@@ -838,7 +840,7 @@ inline void SimTrack::set_allocated_geocentricposition(::messages::track::Entity
|
|||||||
|
|
||||||
// optional double ContactSpeed = 4;
|
// optional double ContactSpeed = 4;
|
||||||
inline bool SimTrack::_internal_has_contactspeed() const {
|
inline bool SimTrack::_internal_has_contactspeed() const {
|
||||||
bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
|
bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
inline bool SimTrack::has_contactspeed() const {
|
inline bool SimTrack::has_contactspeed() const {
|
||||||
@@ -846,7 +848,7 @@ inline bool SimTrack::has_contactspeed() const {
|
|||||||
}
|
}
|
||||||
inline void SimTrack::clear_contactspeed() {
|
inline void SimTrack::clear_contactspeed() {
|
||||||
_impl_.contactspeed_ = 0;
|
_impl_.contactspeed_ = 0;
|
||||||
_impl_._has_bits_[0] &= ~0x00000001u;
|
_impl_._has_bits_[0] &= ~0x00000002u;
|
||||||
}
|
}
|
||||||
inline double SimTrack::_internal_contactspeed() const {
|
inline double SimTrack::_internal_contactspeed() const {
|
||||||
return _impl_.contactspeed_;
|
return _impl_.contactspeed_;
|
||||||
@@ -856,7 +858,7 @@ inline double SimTrack::contactspeed() const {
|
|||||||
return _internal_contactspeed();
|
return _internal_contactspeed();
|
||||||
}
|
}
|
||||||
inline void SimTrack::_internal_set_contactspeed(double value) {
|
inline void SimTrack::_internal_set_contactspeed(double value) {
|
||||||
_impl_._has_bits_[0] |= 0x00000001u;
|
_impl_._has_bits_[0] |= 0x00000002u;
|
||||||
_impl_.contactspeed_ = value;
|
_impl_.contactspeed_ = value;
|
||||||
}
|
}
|
||||||
inline void SimTrack::set_contactspeed(double value) {
|
inline void SimTrack::set_contactspeed(double value) {
|
||||||
@@ -866,7 +868,7 @@ inline void SimTrack::set_contactspeed(double value) {
|
|||||||
|
|
||||||
// optional double ContactCourse = 5;
|
// optional double ContactCourse = 5;
|
||||||
inline bool SimTrack::_internal_has_contactcourse() const {
|
inline bool SimTrack::_internal_has_contactcourse() const {
|
||||||
bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
|
bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0;
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
inline bool SimTrack::has_contactcourse() const {
|
inline bool SimTrack::has_contactcourse() const {
|
||||||
@@ -874,7 +876,7 @@ inline bool SimTrack::has_contactcourse() const {
|
|||||||
}
|
}
|
||||||
inline void SimTrack::clear_contactcourse() {
|
inline void SimTrack::clear_contactcourse() {
|
||||||
_impl_.contactcourse_ = 0;
|
_impl_.contactcourse_ = 0;
|
||||||
_impl_._has_bits_[0] &= ~0x00000004u;
|
_impl_._has_bits_[0] &= ~0x00000008u;
|
||||||
}
|
}
|
||||||
inline double SimTrack::_internal_contactcourse() const {
|
inline double SimTrack::_internal_contactcourse() const {
|
||||||
return _impl_.contactcourse_;
|
return _impl_.contactcourse_;
|
||||||
@@ -884,7 +886,7 @@ inline double SimTrack::contactcourse() const {
|
|||||||
return _internal_contactcourse();
|
return _internal_contactcourse();
|
||||||
}
|
}
|
||||||
inline void SimTrack::_internal_set_contactcourse(double value) {
|
inline void SimTrack::_internal_set_contactcourse(double value) {
|
||||||
_impl_._has_bits_[0] |= 0x00000004u;
|
_impl_._has_bits_[0] |= 0x00000008u;
|
||||||
_impl_.contactcourse_ = value;
|
_impl_.contactcourse_ = value;
|
||||||
}
|
}
|
||||||
inline void SimTrack::set_contactcourse(double value) {
|
inline void SimTrack::set_contactcourse(double value) {
|
||||||
@@ -894,7 +896,7 @@ inline void SimTrack::set_contactcourse(double value) {
|
|||||||
|
|
||||||
// optional double ConactPitch = 6;
|
// optional double ConactPitch = 6;
|
||||||
inline bool SimTrack::_internal_has_conactpitch() const {
|
inline bool SimTrack::_internal_has_conactpitch() const {
|
||||||
bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0;
|
bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0;
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
inline bool SimTrack::has_conactpitch() const {
|
inline bool SimTrack::has_conactpitch() const {
|
||||||
@@ -902,7 +904,7 @@ inline bool SimTrack::has_conactpitch() const {
|
|||||||
}
|
}
|
||||||
inline void SimTrack::clear_conactpitch() {
|
inline void SimTrack::clear_conactpitch() {
|
||||||
_impl_.conactpitch_ = 0;
|
_impl_.conactpitch_ = 0;
|
||||||
_impl_._has_bits_[0] &= ~0x00000008u;
|
_impl_._has_bits_[0] &= ~0x00000010u;
|
||||||
}
|
}
|
||||||
inline double SimTrack::_internal_conactpitch() const {
|
inline double SimTrack::_internal_conactpitch() const {
|
||||||
return _impl_.conactpitch_;
|
return _impl_.conactpitch_;
|
||||||
@@ -912,7 +914,7 @@ inline double SimTrack::conactpitch() const {
|
|||||||
return _internal_conactpitch();
|
return _internal_conactpitch();
|
||||||
}
|
}
|
||||||
inline void SimTrack::_internal_set_conactpitch(double value) {
|
inline void SimTrack::_internal_set_conactpitch(double value) {
|
||||||
_impl_._has_bits_[0] |= 0x00000008u;
|
_impl_._has_bits_[0] |= 0x00000010u;
|
||||||
_impl_.conactpitch_ = value;
|
_impl_.conactpitch_ = value;
|
||||||
}
|
}
|
||||||
inline void SimTrack::set_conactpitch(double value) {
|
inline void SimTrack::set_conactpitch(double value) {
|
||||||
@@ -922,7 +924,7 @@ inline void SimTrack::set_conactpitch(double value) {
|
|||||||
|
|
||||||
// optional uint32 ContactEnvironemnt = 7;
|
// optional uint32 ContactEnvironemnt = 7;
|
||||||
inline bool SimTrack::_internal_has_contactenvironemnt() const {
|
inline bool SimTrack::_internal_has_contactenvironemnt() const {
|
||||||
bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
|
bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
inline bool SimTrack::has_contactenvironemnt() const {
|
inline bool SimTrack::has_contactenvironemnt() const {
|
||||||
@@ -930,7 +932,7 @@ inline bool SimTrack::has_contactenvironemnt() const {
|
|||||||
}
|
}
|
||||||
inline void SimTrack::clear_contactenvironemnt() {
|
inline void SimTrack::clear_contactenvironemnt() {
|
||||||
_impl_.contactenvironemnt_ = 0u;
|
_impl_.contactenvironemnt_ = 0u;
|
||||||
_impl_._has_bits_[0] &= ~0x00000002u;
|
_impl_._has_bits_[0] &= ~0x00000004u;
|
||||||
}
|
}
|
||||||
inline uint32_t SimTrack::_internal_contactenvironemnt() const {
|
inline uint32_t SimTrack::_internal_contactenvironemnt() const {
|
||||||
return _impl_.contactenvironemnt_;
|
return _impl_.contactenvironemnt_;
|
||||||
@@ -940,7 +942,7 @@ inline uint32_t SimTrack::contactenvironemnt() const {
|
|||||||
return _internal_contactenvironemnt();
|
return _internal_contactenvironemnt();
|
||||||
}
|
}
|
||||||
inline void SimTrack::_internal_set_contactenvironemnt(uint32_t value) {
|
inline void SimTrack::_internal_set_contactenvironemnt(uint32_t value) {
|
||||||
_impl_._has_bits_[0] |= 0x00000002u;
|
_impl_._has_bits_[0] |= 0x00000004u;
|
||||||
_impl_.contactenvironemnt_ = value;
|
_impl_.contactenvironemnt_ = value;
|
||||||
}
|
}
|
||||||
inline void SimTrack::set_contactenvironemnt(uint32_t value) {
|
inline void SimTrack::set_contactenvironemnt(uint32_t value) {
|
||||||
@@ -950,7 +952,7 @@ inline void SimTrack::set_contactenvironemnt(uint32_t value) {
|
|||||||
|
|
||||||
// optional double ContactRCS = 8;
|
// optional double ContactRCS = 8;
|
||||||
inline bool SimTrack::_internal_has_contactrcs() const {
|
inline bool SimTrack::_internal_has_contactrcs() const {
|
||||||
bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0;
|
bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0;
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
inline bool SimTrack::has_contactrcs() const {
|
inline bool SimTrack::has_contactrcs() const {
|
||||||
@@ -958,7 +960,7 @@ inline bool SimTrack::has_contactrcs() const {
|
|||||||
}
|
}
|
||||||
inline void SimTrack::clear_contactrcs() {
|
inline void SimTrack::clear_contactrcs() {
|
||||||
_impl_.contactrcs_ = 0;
|
_impl_.contactrcs_ = 0;
|
||||||
_impl_._has_bits_[0] &= ~0x00000010u;
|
_impl_._has_bits_[0] &= ~0x00000020u;
|
||||||
}
|
}
|
||||||
inline double SimTrack::_internal_contactrcs() const {
|
inline double SimTrack::_internal_contactrcs() const {
|
||||||
return _impl_.contactrcs_;
|
return _impl_.contactrcs_;
|
||||||
@@ -968,7 +970,7 @@ inline double SimTrack::contactrcs() const {
|
|||||||
return _internal_contactrcs();
|
return _internal_contactrcs();
|
||||||
}
|
}
|
||||||
inline void SimTrack::_internal_set_contactrcs(double value) {
|
inline void SimTrack::_internal_set_contactrcs(double value) {
|
||||||
_impl_._has_bits_[0] |= 0x00000010u;
|
_impl_._has_bits_[0] |= 0x00000020u;
|
||||||
_impl_.contactrcs_ = value;
|
_impl_.contactrcs_ = value;
|
||||||
}
|
}
|
||||||
inline void SimTrack::set_contactrcs(double value) {
|
inline void SimTrack::set_contactrcs(double value) {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ message SimTrack {
|
|||||||
|
|
||||||
messages.track.Identifier EntityIdentifier = 1;
|
messages.track.Identifier EntityIdentifier = 1;
|
||||||
uint32 ContactSourceType = 2;
|
uint32 ContactSourceType = 2;
|
||||||
messages.track.EntityGeocentricPosition GeocentricPosition = 3;
|
optional messages.track.EntityGeocentricPosition GeocentricPosition = 3;
|
||||||
optional double ContactSpeed = 4;
|
optional double ContactSpeed = 4;
|
||||||
optional double ContactCourse = 5;
|
optional double ContactCourse = 5;
|
||||||
optional double ConactPitch = 6;
|
optional double ConactPitch = 6;
|
||||||
|
|||||||
@@ -35,7 +35,8 @@ namespace SimCore
|
|||||||
/// @param z
|
/// @param z
|
||||||
void setPosition(double x, double y, double z);
|
void setPosition(double x, double y, double z);
|
||||||
SimCore::Position getPosition();
|
SimCore::Position getPosition();
|
||||||
SimCore::Identifier getIdentifier();
|
|
||||||
|
const SimCore::Identifier getIdentifier();
|
||||||
|
|
||||||
/// @brief
|
/// @brief
|
||||||
/// @param emission
|
/// @param emission
|
||||||
|
|||||||
Submodule libs/whisper-com updated: 1d154f71d4...9ffa95877b
@@ -8,7 +8,7 @@
|
|||||||
namespace SimCore
|
namespace SimCore
|
||||||
{
|
{
|
||||||
SensorTrack::SensorTrack(WHISPER::SourceType src,SimCore::Identifier id,SimCore::TrackKind trackkind):trackKind_(trackkind),ID_(id),
|
SensorTrack::SensorTrack(WHISPER::SourceType src,SimCore::Identifier id,SimCore::TrackKind trackkind):trackKind_(trackkind),ID_(id),
|
||||||
Message(id.getParentNumber(),id.getNumber(),WHISPER::MsgTopics::TRACK,WHISPER::SENSOR_TRACK,src)
|
Message(id.getUUID(),WHISPER::MsgTopics::TRACK,WHISPER::SENSOR_TRACK,src)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ namespace SimCore
|
|||||||
{
|
{
|
||||||
EntityKind.setValue(SimCore::EntityKind::UNKNOWN);
|
EntityKind.setValue(SimCore::EntityKind::UNKNOWN);
|
||||||
|
|
||||||
|
position_ = SimCore::Position();
|
||||||
Speed.setValue(0);
|
Speed.setValue(0);
|
||||||
Course.setValue(0);
|
Course.setValue(0);
|
||||||
Pitch.setValue(0);
|
Pitch.setValue(0);
|
||||||
@@ -23,6 +24,7 @@ namespace SimCore
|
|||||||
{
|
{
|
||||||
EntityKind.setValue(entityKind);
|
EntityKind.setValue(entityKind);
|
||||||
|
|
||||||
|
position_ = SimCore::Position();
|
||||||
Speed.setValue(0);
|
Speed.setValue(0);
|
||||||
Course.setValue(0);
|
Course.setValue(0);
|
||||||
Pitch.setValue(0);
|
Pitch.setValue(0);
|
||||||
@@ -34,6 +36,7 @@ namespace SimCore
|
|||||||
{
|
{
|
||||||
EntityKind.setValue(entityKind);
|
EntityKind.setValue(entityKind);
|
||||||
|
|
||||||
|
position_ = SimCore::Position();
|
||||||
Speed.setValue(0);
|
Speed.setValue(0);
|
||||||
Course.setValue(0);
|
Course.setValue(0);
|
||||||
Pitch.setValue(0);
|
Pitch.setValue(0);
|
||||||
@@ -45,7 +48,7 @@ namespace SimCore
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
SimCore::Identifier SimTrack::getIdentifier()
|
const SimCore::Identifier SimTrack::getIdentifier()
|
||||||
{
|
{
|
||||||
return ID_;
|
return ID_;
|
||||||
}
|
}
|
||||||
@@ -75,14 +78,18 @@ namespace SimCore
|
|||||||
|
|
||||||
messages::SimTrack::SimTrack SimTrack;
|
messages::SimTrack::SimTrack SimTrack;
|
||||||
|
|
||||||
|
if (position_.isValid())
|
||||||
|
{
|
||||||
|
LOG_S(ERROR)<<"Position is valid";
|
||||||
SimTrack.mutable_geocentricposition()->set_x(position_.getGeocentricPos()(SimCore::X));
|
SimTrack.mutable_geocentricposition()->set_x(position_.getGeocentricPos()(SimCore::X));
|
||||||
SimTrack.mutable_geocentricposition()->set_y(position_.getGeocentricPos()(SimCore::Y));
|
SimTrack.mutable_geocentricposition()->set_y(position_.getGeocentricPos()(SimCore::Y));
|
||||||
SimTrack.mutable_geocentricposition()->set_z(position_.getGeocentricPos()(SimCore::Z));
|
SimTrack.mutable_geocentricposition()->set_z(position_.getGeocentricPos()(SimCore::Z));
|
||||||
|
}
|
||||||
|
|
||||||
SimTrack.set_contactspeed(this->Speed.getValue());
|
if(Speed.getValidity()) SimTrack.set_contactspeed(this->Speed.getValue());
|
||||||
SimTrack.set_contactcourse(this->Course.getValue());
|
if(Course.getValidity()) SimTrack.set_contactcourse(this->Course.getValue());
|
||||||
SimTrack.set_conactpitch(this->Pitch.getValue());
|
if(Pitch.getValidity()) SimTrack.set_conactpitch(this->Pitch.getValue());
|
||||||
SimTrack.set_contactrcs(this->RCS.getValue());
|
if(RCS.getValidity()) SimTrack.set_contactrcs(this->RCS.getValue());
|
||||||
|
|
||||||
|
|
||||||
SimTrack.mutable_entityidentifier()->set_number(this->ID_.getNumber());
|
SimTrack.mutable_entityidentifier()->set_number(this->ID_.getNumber());
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ namespace SimCore {
|
|||||||
wgs84_ = std::make_unique<GeographicLib::Ellipsoid>(GeographicLib::Constants::WGS84_a(), GeographicLib::Constants::WGS84_f());
|
wgs84_ = std::make_unique<GeographicLib::Ellipsoid>(GeographicLib::Constants::WGS84_a(), GeographicLib::Constants::WGS84_f());
|
||||||
setGeocentricPos( X, Y, Z);
|
setGeocentricPos( X, Y, Z);
|
||||||
|
|
||||||
|
valid_ = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -48,6 +50,7 @@ namespace SimCore {
|
|||||||
lon = GeodesicPos_[LONGITUDE];
|
lon = GeodesicPos_[LONGITUDE];
|
||||||
h = GeodesicPos_[HEIGHT];
|
h = GeodesicPos_[HEIGHT];
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -128,6 +131,7 @@ namespace SimCore {
|
|||||||
std::lock_guard<std::mutex> lock(other.mx);
|
std::lock_guard<std::mutex> lock(other.mx);
|
||||||
GeocentricPos_ = other.GeocentricPos_;
|
GeocentricPos_ = other.GeocentricPos_;
|
||||||
GeodesicPos_ = other.GeodesicPos_;
|
GeodesicPos_ = other.GeodesicPos_;
|
||||||
|
valid_ = true;
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user