From 3b191a56942a7c541d63bf80a2de0d0ba28d93c5 Mon Sep 17 00:00:00 2001 From: robsblacktrax <38221291+robsblacktrax@users.noreply.github.com> Date: Thu, 22 Nov 2018 15:41:37 -0500 Subject: [PATCH 01/10] Update thirdParty_motion.cpp BTXLOK-460 Trackable module was that initialising name erasing more data from the vector than necessary --- C++/thirdParty_motion.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C++/thirdParty_motion.cpp b/C++/thirdParty_motion.cpp index d383b07..6303fbc 100644 --- a/C++/thirdParty_motion.cpp +++ b/C++/thirdParty_motion.cpp @@ -81,7 +81,7 @@ Trackable::Trackable(vector *data, uint16_t intSig, uint16_t fltS data->erase(data->begin(), data->begin() + 1); this->name.append(data->begin(), data->begin() + this->nameLen); - data->erase(data->begin(), data->begin() + sizeof(unsigned char)*this->nameLen); + data->erase(data->begin(), data->begin() + this->nameLen); if (this->pkType == 0x51) { @@ -694,4 +694,4 @@ void LEDAccVelMod::printModule() cout << "Y Acceleration: " << this->accy << endl; cout << "Z Acceleration: " << this->accz << endl; cout << "========LED Acceleration/Velocity Module========" << endl; -} \ No newline at end of file +} From 06c39023311fa510e213ec8cafedf23589162c66 Mon Sep 17 00:00:00 2001 From: robsblacktrax <38221291+robsblacktrax@users.noreply.github.com> Date: Thu, 25 Jul 2019 15:59:20 -0400 Subject: [PATCH 02/10] Update RTTrP.py --- Python/RTTrP.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Python/RTTrP.py b/Python/RTTrP.py index ccdfb8d..1f48595 100644 --- a/Python/RTTrP.py +++ b/Python/RTTrP.py @@ -1,3 +1,26 @@ +# MIT License + +#Copyright(c) 2019 CAST Group of Companies Inc + +#Permission is hereby granted, free of charge, to any person obtaining a copy +#of this software and associated documentation files(the "Software"), to deal +#in the Software without restriction, including without limitation the rights +#to use, copy, modify, merge, publish, distribute, sublicense, and / or sell +#copies of the Software, and to permit persons to whom the Software is +#furnished to do so, subject to the following conditions : + +#The above copyright notice and this permission notice shall be included in all +#copies or substantial portions of the Software. + +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE +#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +#SOFTWARE. + + import struct # Main class for the packet header, to keep things simply we just leave this as a generic class From 92d0cbd5e08102a2b866fc12d7da7a1a87e6435c Mon Sep 17 00:00:00 2001 From: robsblacktrax <38221291+robsblacktrax@users.noreply.github.com> Date: Thu, 25 Jul 2019 16:00:03 -0400 Subject: [PATCH 03/10] Update License --- Python/thirdParty_lighting.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Python/thirdParty_lighting.py b/Python/thirdParty_lighting.py index cfbbc9f..111ecdc 100644 --- a/Python/thirdParty_lighting.py +++ b/Python/thirdParty_lighting.py @@ -1,3 +1,25 @@ +# MIT License + +#Copyright(c) 2019 CAST Group of Companies Inc + +#Permission is hereby granted, free of charge, to any person obtaining a copy +#of this software and associated documentation files(the "Software"), to deal +#in the Software without restriction, including without limitation the rights +#to use, copy, modify, merge, publish, distribute, sublicense, and / or sell +#copies of the Software, and to permit persons to whom the Software is +#furnished to do so, subject to the following conditions : + +#The above copyright notice and this permission notice shall be included in all +#copies or substantial portions of the Software. + +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE +#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +#SOFTWARE. + import struct import RTTrP From c8a05bcf49ea25d9097cf118dc4f31dc610cced0 Mon Sep 17 00:00:00 2001 From: robsblacktrax <38221291+robsblacktrax@users.noreply.github.com> Date: Thu, 25 Jul 2019 16:00:41 -0400 Subject: [PATCH 04/10] Update License --- Python/thirdParty_motion.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Python/thirdParty_motion.py b/Python/thirdParty_motion.py index cf9b0b1..0fb3c60 100644 --- a/Python/thirdParty_motion.py +++ b/Python/thirdParty_motion.py @@ -1,3 +1,25 @@ +# MIT License + +#Copyright(c) 2019 CAST Group of Companies Inc + +#Permission is hereby granted, free of charge, to any person obtaining a copy +#of this software and associated documentation files(the "Software"), to deal +#in the Software without restriction, including without limitation the rights +#to use, copy, modify, merge, publish, distribute, sublicense, and / or sell +#copies of the Software, and to permit persons to whom the Software is +#furnished to do so, subject to the following conditions : + +#The above copyright notice and this permission notice shall be included in all +#copies or substantial portions of the Software. + +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE +#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +#SOFTWARE. + import struct import RTTrP From 78e6fcc19b09517f7fcd0356fac1f68bc7664aec Mon Sep 17 00:00:00 2001 From: robsblacktrax <38221291+robsblacktrax@users.noreply.github.com> Date: Thu, 25 Jul 2019 16:01:14 -0400 Subject: [PATCH 05/10] Update license copyright year --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index e024ab8..abd292d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2018 CAST Group of Companies Inc +Copyright (c) 2019 CAST Group of Companies Inc Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 91c0b6c370aec9e4b7600a692d43af29290ad863 Mon Sep 17 00:00:00 2001 From: robsblacktrax <38221291+robsblacktrax@users.noreply.github.com> Date: Wed, 21 Jul 2021 16:29:43 -0400 Subject: [PATCH 06/10] BTXSAC-356 BTXSAC-356 Update RTTrPM wiki samples with Zone data http://10.1.1.4:8080/browse/BTXSAC-356 --- C++/RTTrP.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/C++/RTTrP.h b/C++/RTTrP.h index 25481c5..965e772 100644 --- a/C++/RTTrP.h +++ b/C++/RTTrP.h @@ -45,7 +45,9 @@ class RTTrPM QuatModule *quatMod; EulerModule *eulerMod; CentroidAccVelMod *cavMod; + ZoneMod *zoneMod; vector *lavMod; + vector *zoneSubMod; vector *data; vector pkType; @@ -69,4 +71,4 @@ class RTTrPL void printModule(void); }; -#endif // RTTRP_H \ No newline at end of file +#endif // RTTRP_H From 7bdc07c7ca603c54053ca9089e51bdeee9ba727c Mon Sep 17 00:00:00 2001 From: robsblacktrax <38221291+robsblacktrax@users.noreply.github.com> Date: Wed, 21 Jul 2021 16:36:38 -0400 Subject: [PATCH 07/10] BTXSAC-356 BTXSAC-356 Update RTTrPM wiki samples with Zone data --- C++/RTTrP.cpp | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/C++/RTTrP.cpp b/C++/RTTrP.cpp index 267853e..cdd3525 100644 --- a/C++/RTTrP.cpp +++ b/C++/RTTrP.cpp @@ -91,6 +91,8 @@ RTTrPM::RTTrPM() this->eulerMod = NULL; this->cavMod = NULL; this->lavMod = NULL; + this->zoneMod = NULL; + this->zoneSubMod = NULL; } RTTrPM::~RTTrPM() @@ -100,6 +102,7 @@ RTTrPM::~RTTrPM() delete(this->quatMod); delete(this->eulerMod); delete(this->cavMod); + delete(this->zoneMod); if (this->ledMod != NULL) { @@ -138,6 +141,25 @@ RTTrPM::~RTTrPM() } else delete(this->lavMod); + + if (this->zoneSubMod != NULL) + { + if (this->zoneSubMod->size() > 0) + { + vector::iterator zoneSubIter; + + for (zoneSubIter = this->zoneSubMod->begin(); zoneSubIter < this->zoneSubMod->end(); zoneSubIter++) + { + delete((*zoneSubIter)); + } + + delete(this->zoneSubMod); + } + else + delete(this->zoneSubMod); + } + else + delete(this->zoneSubMod); } void RTTrPM::printPacket(void) @@ -162,6 +184,12 @@ void RTTrPM::printPacket(void) if (this->lavMod != NULL) print_vector(this->lavMod); + + if (this->zoneMod != NULL) + this->zoneMod->printModule(); + + if (this->zoneSubMod != NULL) + print_vector(this->zoneSubMod); } RTTrPL::RTTrPL() @@ -197,4 +225,4 @@ void RTTrPL::printModule() print_vector((*spotIt)->chanBlocks); } } -} \ No newline at end of file +} From d3605c42b32a83aff0e54823cb1e28c4e96ab25f Mon Sep 17 00:00:00 2001 From: robsblacktrax <38221291+robsblacktrax@users.noreply.github.com> Date: Wed, 21 Jul 2021 16:38:34 -0400 Subject: [PATCH 08/10] BTXSAC-356 BTXSAC-356 Update RTTrPM wiki samples with Zone data --- C++/thirdParty_motion.h | 72 ++++++++++++++++++++++++++++++++++------- 1 file changed, 60 insertions(+), 12 deletions(-) diff --git a/C++/thirdParty_motion.h b/C++/thirdParty_motion.h index fe6b589..f4d3784 100644 --- a/C++/thirdParty_motion.h +++ b/C++/thirdParty_motion.h @@ -1,3 +1,25 @@ +/*MIT License + +#Copyright(c) 2020 CAST Group of Companies Inc + +#Permission is hereby granted, free of charge, to any person obtaining a copy +#of this software and associated documentation files(the "Software"), to deal +#in the Software without restriction, including without limitation the rights +#to use, copy, modify, merge, publish, distribute, sublicense, and / or sell +#copies of the Software, and to permit persons to whom the Software is +#furnished to do so, subject to the following conditions : + +#The above copyright notice and this permission notice shall be included in all +#copies or substantial portions of the Software. + +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE +#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +#SOFTWARE. */ + #ifndef THIRDPARTY_MOTION_H #define THIRDPARTY_MOTION_H @@ -15,8 +37,6 @@ #pragma once -using namespace std; - class Packet { public: @@ -24,7 +44,7 @@ class Packet uint16_t intSig, fltSig; Packet(); - Packet(uint16_t intSig, uint16_t fltSig, vector *data); + Packet(uint16_t intSig, uint16_t fltSig, std::vector *data); Packet(const Packet &toCopy); ~Packet(); }; @@ -34,12 +54,12 @@ class Trackable : public Packet public: uint16_t size; uint8_t nameLen; - string name; + std::string name; uint8_t numMods; uint32_t timeStamp; Trackable(); - Trackable(vector *data, uint16_t intSig, uint16_t fltSig); + Trackable(std::vector *data, uint16_t intSig, uint16_t fltSig); Trackable(const Trackable &toCopy); ~Trackable(); @@ -53,7 +73,7 @@ class CentroidMod : public Packet double x, y, z; CentroidMod(); - CentroidMod(vector *data, uint16_t intSig, uint16_t fltSig); + CentroidMod(std::vector *data, uint16_t intSig, uint16_t fltSig); CentroidMod(const CentroidMod &toCopy); ~CentroidMod(); @@ -68,7 +88,7 @@ class LEDModule : public Packet uint8_t index; LEDModule(); - LEDModule(vector *data, uint16_t intSig, uint16_t fltSig); + LEDModule(std::vector *data, uint16_t intSig, uint16_t fltSig); LEDModule(const LEDModule &toCopy); ~LEDModule(); @@ -82,7 +102,7 @@ class QuatModule : public Packet double Qx, Qy, Qz, Qw; QuatModule(); - QuatModule(vector *data, uint16_t intSig, uint16_t fltSig); + QuatModule(std::vector *data, uint16_t intSig, uint16_t fltSig); QuatModule(const QuatModule &toCopy); ~QuatModule(); @@ -96,7 +116,7 @@ class EulerModule : public Packet double R1, R2, R3; EulerModule(); - EulerModule(vector *data, uint16_t intSig, uint16_t fltSig); + EulerModule(std::vector *data, uint16_t intSig, uint16_t fltSig); EulerModule(const EulerModule &toCopy); ~EulerModule(); @@ -112,7 +132,7 @@ class CentroidAccVelMod : public Packet float velx, vely, velz; CentroidAccVelMod(); - CentroidAccVelMod(vector *data, uint16_t intSig, uint16_t fltSig); + CentroidAccVelMod(std::vector *data, uint16_t intSig, uint16_t fltSig); CentroidAccVelMod(const CentroidAccVelMod &toCopy); ~CentroidAccVelMod(); @@ -129,11 +149,39 @@ class LEDAccVelMod : public Packet uint8_t index; LEDAccVelMod(); - LEDAccVelMod(vector *data, uint16_t intSig, uint16_t fltSig); + LEDAccVelMod(std::vector *data, uint16_t intSig, uint16_t fltSig); LEDAccVelMod(const LEDAccVelMod &toCopy); ~LEDAccVelMod(); void printModule(); }; -#endif \ No newline at end of file +class ZoneMod : public Packet +{ +public: + uint16_t size; + uint8_t numofZoneSubModules; + ZoneMod(); + ZoneMod(std::vector *data, uint16_t intSig, uint16_t fltSig); + ZoneMod(const ZoneMod &toCopy); + ~ZoneMod(); + + void printModule(); +}; + +class ZoneSubMod +{ +public: + uint16_t intSig; + uint8_t size; + uint8_t zoneNameLength; + std::string zoneName; + ZoneSubMod(); + ZoneSubMod(std::vector *data, uint16_t intSig); + ZoneSubMod(const ZoneSubMod &toCopy); + ~ZoneSubMod(); + + void printModule(); +}; + +#endif From f9cc25e34cc492e37ad2ed9b763b6fe10b2d881f Mon Sep 17 00:00:00 2001 From: robsblacktrax <38221291+robsblacktrax@users.noreply.github.com> Date: Wed, 21 Jul 2021 16:41:00 -0400 Subject: [PATCH 09/10] BTXSAC-356 BTXSAC-356 Update RTTrPM wiki samples with Zone data --- C++/thirdParty_motion.cpp | 112 +++++++++++++++++++++++++++++++++++++- 1 file changed, 110 insertions(+), 2 deletions(-) diff --git a/C++/thirdParty_motion.cpp b/C++/thirdParty_motion.cpp index 6303fbc..cb090fe 100644 --- a/C++/thirdParty_motion.cpp +++ b/C++/thirdParty_motion.cpp @@ -81,7 +81,7 @@ Trackable::Trackable(vector *data, uint16_t intSig, uint16_t fltS data->erase(data->begin(), data->begin() + 1); this->name.append(data->begin(), data->begin() + this->nameLen); - data->erase(data->begin(), data->begin() + this->nameLen); + data->erase(data->begin(), data->begin() + sizeof(unsigned char)*this->nameLen); if (this->pkType == 0x51) { @@ -325,7 +325,7 @@ QuatModule::QuatModule(vector *data, uint16_t intSig, uint16_t fl data->erase(data->begin(), data->begin() + 8); } - if (this->intSig = 0x4154) + if (this->intSig == 0x4154) { this->size = ntohs(this->size); this->latency = ntohs(this->latency); @@ -695,3 +695,111 @@ void LEDAccVelMod::printModule() cout << "Z Acceleration: " << this->accz << endl; cout << "========LED Acceleration/Velocity Module========" << endl; } + +ZoneMod::ZoneMod() +{ + +} + +void ZoneMod::ZoneMod(std::vector *data, uint16_t intSig, uint16_t fltSig) +{ + copy(data->begin(), data->begin() + 2, (unsigned char *)&this->size); + data->erase(data->begin(), data->begin() + 2); + copy(data->begin(), data->begin() + 1, (unsigned char*)&this->numofZoneSubModules); + data->erase(data->begin(), data->begin() + 1); + + if (this->intSig == 0x4154) + { + this->size = ntohs(this->size); + this->numofZoneSubModules = ntohs(this->numofZoneSubModules); + } +} + +ZoneMod::ZoneMod(const ZoneMod &toCopy) +{ + size = toCopy.size; + numofZoneSubModules = toCopy.numofZoneSubModules; +} + +ZoneMod::~ZoneMod() +{ + +} + +void ZoneMod::printModule() +{ + cout << "========Colliding Zones Module ========" << endl; + + cout << "Module Size: " << this->size << endl; + cout << "Number of Zones colliding with the trackable " << this->numofZoneSubModules << endl; + + cout << "========Colliding Zones Module ========" << endl; + +} + +class ZoneMod : public Packet +{ +public: + uint16_t size; + uint8_t numofZoneSubModules; + ZoneMod(); + ZoneMod(std::vector *data, uint16_t intSig, uint16_t fltSig); + ZoneMod(const ZoneMod &toCopy); + ~ZoneMod(); + + void printModule(); +}; + +ZoneSubMod::ZoneSubMod() +{ + +} + +ZoneSubMod::ZoneSubMod(std::vector *data, uint16_t intSig) +{ + copy(data->begin(), data->begin() + 2, (unsigned char *)&this->size); + data->erase(data->begin(), data->begin() + 2); + copy(data->begin(), data->begin() + 1, (unsigned char*)&this->zoneNameLength); + data->erase(data->begin(), data->begin() + 1); + if (this->intSig == 0x4154) + { + this->size = ntohs(this->size); + this->zoneNameLength = ntohs(this->zoneNameLength); + } + copy(data->begin(), data->begin() + this->zoneNameLength, (unsigned char*)&this->zoneName); + data->erase(data->begin(), data->begin() + this->zoneNameLength); +} + +ZoneSubMod::ZoneSubMod(const ZoneSubMod &toCopy) +{ + intSig = toCopy.intSig; + size = toCopy.size; + zoneNameLength = toCopy.zoneNameLength; + zoneName = toCopy.zoneName; +} + +void ZoneSubMod::printModule() +{ + cout << "========Colliding Zones Sub Module ========" << endl; + + cout << "Zone Sub Module Size: " << this->size << endl; + cout << "Colliding Zone Name length " << this->zoneNameLength << endl; + cout << "Colliding Zone Name " << this->zoneName << endl; + + cout << "========Colliding Zones Module ========" << endl; +} + +class ZoneSubMod +{ +public: + uint16_t intSig; + uint8_t size; + uint8_t zoneNameLength; + std::string zoneName; + ZoneSubMod(); + ZoneSubMod(std::vector *data, uint16_t intSig); + ZoneSubMod(const ZoneSubMod &toCopy); + ~ZoneSubMod(); + + void printModule(); +}; From 9cc0699661da37cf29a49dd66bbead546715f8ae Mon Sep 17 00:00:00 2001 From: robsblacktrax <38221291+robsblacktrax@users.noreply.github.com> Date: Wed, 21 Jul 2021 16:48:10 -0400 Subject: [PATCH 10/10] Update LICENSE --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index abd292d..8558229 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 CAST Group of Companies Inc +Copyright (c) 2020 CAST Group of Companies Inc Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal