From e6b31d0772094bf0f0675438621a67ebc782a7d3 Mon Sep 17 00:00:00 2001 From: Adam Shapiro Date: Fri, 22 May 2026 12:17:15 -0400 Subject: [PATCH] Bumped PoseMessage version to 1.3 for FLAG_RECEIVER_SOLUTION addition. --- python/fusion_engine_client/messages/solution.py | 2 +- python/tests/test_encoder.py | 6 +++--- src/point_one/fusion_engine/messages/solution.h | 12 +++++++++--- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/python/fusion_engine_client/messages/solution.py b/python/fusion_engine_client/messages/solution.py index 785f1329..51224b72 100644 --- a/python/fusion_engine_client/messages/solution.py +++ b/python/fusion_engine_client/messages/solution.py @@ -15,7 +15,7 @@ class PoseMessage(MessagePayload): @brief Platform pose solution (position, velocity, attitude). """ MESSAGE_TYPE = MessageType.POSE - MESSAGE_VERSION = 2 + MESSAGE_VERSION = 3 INVALID_UNDULATION = -32768 diff --git a/python/tests/test_encoder.py b/python/tests/test_encoder.py index 8e0c12cf..7c76add1 100644 --- a/python/tests/test_encoder.py +++ b/python/tests/test_encoder.py @@ -11,9 +11,8 @@ format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') logging.getLogger('point_one').setLevel(logging.DEBUG) - -P1_POSE_MESSAGE1 = b".1\x00\x00\xb1&\xc8\xfe\x02\x02\x10'\x00\x00\x00\x00\x8c\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\x00\x00\x00\x00\xf0?\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x08@\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f" -P1_POSE_MESSAGE2 = b".1\x00\x00\x00\xf3\xeen\x02\x02\x10'\x01\x00\x00\x00\x8c\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\x00\x00\x00\x00\xf0?\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x08@\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f" +P1_POSE_MESSAGE1 = b".1\x00\x00\xa1\x06\x16\x14\x02\x03\x10\'\x00\x00\x00\x00\x8c\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\x00\x00\x00\x00\xf0?\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x08@\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f" +P1_POSE_MESSAGE2 = b".1\x00\x00\x10\xd30\x84\x02\x03\x10\'\x01\x00\x00\x00\x8c\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\x00\x00\x00\x00\xf0?\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x08@\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f" P1_POSE_AUX_MESSAGE3 = b".1\x00\x00\xac\xa4\x08\x94\x02\x00\x13'\x02\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\x00\x00\x00\x00\xf8\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f\x00\x00\xc0\x7f" @@ -25,6 +24,7 @@ def test_pose_encode(): data = encoder.encode_message(pose) assert data == P1_POSE_MESSAGE1 + # Same message, but sequence number incremented automatically by the encoder. data = encoder.encode_message(pose) assert data == P1_POSE_MESSAGE2 data = encoder.encode_message(pose_aux) diff --git a/src/point_one/fusion_engine/messages/solution.h b/src/point_one/fusion_engine/messages/solution.h index 720ce80e..727d3058 100644 --- a/src/point_one/fusion_engine/messages/solution.h +++ b/src/point_one/fusion_engine/messages/solution.h @@ -28,7 +28,7 @@ namespace messages { /** * @brief Platform pose solution: position, velocity, attitude (@ref - * MessageType::POSE, version 1.2). + * MessageType::POSE, version 1.3). * @ingroup solution_messages * * @note @@ -39,15 +39,21 @@ namespace messages { */ struct P1_ALIGNAS(4) PoseMessage : public MessagePayload { static constexpr MessageType MESSAGE_TYPE = MessageType::POSE; - static constexpr uint8_t MESSAGE_VERSION = 2; + static constexpr uint8_t MESSAGE_VERSION = 3; static constexpr int16_t INVALID_UNDULATION = INT16_MIN; - /** Set if the device is stationary. */ + /** + * Set if the device is stationary. + * + * Added in @ref PoseMessage version 1.2. + */ static constexpr uint8_t FLAG_STATIONARY = 0x01; /** * Set if the output temporarily contains the GNSS receiver's native position * solution. This can happen during initial calibration, during boot, and in * extremely poor signal environments. + * + * Added in @ref PoseMessage version 1.3. */ static constexpr uint8_t FLAG_RECEIVER_SOLUTION = 0x02;