diff --git a/python/fusion_engine_client/analysis/analyzer.py b/python/fusion_engine_client/analysis/analyzer.py index 17078158..3f4eb570 100755 --- a/python/fusion_engine_client/analysis/analyzer.py +++ b/python/fusion_engine_client/analysis/analyzer.py @@ -1943,24 +1943,24 @@ def _plot_imu_data(self, message_cls, filename, figure_title): self._add_figure(name=filename, figure=figure, title=figure_title) - def plot_gnss_heading_measurements(self): + def plot_gnss_attitude_measurements(self): """! - @brief Generate time series plots for GNSS heading (degrees) and baseline distance (meters) data. + @brief Generate time series plots for GNSS attitude (degrees) and baseline distance (meters) data. """ if self.output_dir is None: return - # Read the heading measurement data. - result = self.reader.read(message_types=[RawGNSSHeadingOutput, GNSSHeadingOutput], **self.params) - raw_heading_data = result[RawGNSSHeadingOutput.MESSAGE_TYPE] - heading_data = result[GNSSHeadingOutput.MESSAGE_TYPE] + # Read the attitude measurement data. + result = self.reader.read(message_types=[RawGNSSAttitudeOutput, GNSSAttitudeOutput], **self.params) + raw_heading_data = result[RawGNSSAttitudeOutput.MESSAGE_TYPE] + heading_data = result[GNSSAttitudeOutput.MESSAGE_TYPE] if (len(heading_data.p1_time) == 0) and (len(raw_heading_data.p1_time) == 0): - self.logger.info('No GNSS heading measurement data available. Skipping plot.') + self.logger.info('No GNSS attitude measurement data available. Skipping plot.') return - # Note that we read the pose data after heading, that way we don't bother reading pose data from disk if there's - # no heading data in the log. + # Note that we read the pose data after attitude, that way we don't bother reading pose data from disk if + # there's no heading data in the log. result = self.reader.read(message_types=[PoseMessage], source_ids=self.default_source_id, **self.params) primary_pose_data = result[PoseMessage.MESSAGE_TYPE] @@ -2187,7 +2187,7 @@ def plot_gnss_heading_measurements(self): row=3, col=1 ) - self._add_figure(name='gnss_heading_measurement', figure=fig, title='Measurements: GNSS Heading') + self._add_figure(name='gnss_attitude_measurement', figure=fig, title='Measurements: GNSS Attitude') def plot_system_status_profiling(self): """! @@ -3001,9 +3001,9 @@ def main(args=None): analyzer.plot_gnss_corrections_status() analyzer.plot_dop() - # By default, we always plot heading measurements (i.e., output from a secondary heading device like an + # By default, we always plot attitude measurements (i.e., output from a secondary GNSS attitude sensor like an # LG69T-AH), separate from other sensor measurements controlled by --measurements. - analyzer.plot_gnss_heading_measurements() + analyzer.plot_gnss_attitude_measurements() if truth_lla_deg is not None: analyzer.plot_stationary_position_error(truth_lla_deg) diff --git a/python/fusion_engine_client/messages/defs.py b/python/fusion_engine_client/messages/defs.py index 49429d9d..23bd6904 100644 --- a/python/fusion_engine_client/messages/defs.py +++ b/python/fusion_engine_client/messages/defs.py @@ -99,9 +99,9 @@ class MessageType(IntEnum): # Sensor measurement messages. IMU_OUTPUT = 11000 - RAW_GNSS_HEADING_OUTPUT = 11001 + RAW_GNSS_ATTITUDE_OUTPUT = 11001 RAW_IMU_OUTPUT = 11002 - GNSS_HEADING_OUTPUT = 11003 + GNSS_ATTITUDE_OUTPUT = 11003 IMU_INPUT = 11004 # Vehicle measurement messages. diff --git a/python/fusion_engine_client/messages/measurements.py b/python/fusion_engine_client/messages/measurements.py index ac6dd533..bf831924 100644 --- a/python/fusion_engine_client/messages/measurements.py +++ b/python/fusion_engine_client/messages/measurements.py @@ -1169,11 +1169,11 @@ def to_numpy(cls, messages): ################################################################################ -class GNSSHeadingOutput(MessagePayload): +class GNSSAttitudeOutput(MessagePayload): """! - @brief Multi-antenna GNSS heading sensor measurement output with offset corrections applied. + @brief Multi-antenna GNSS attitude sensor measurement output with offset corrections applied. """ - MESSAGE_TYPE = MessageType.GNSS_HEADING_OUTPUT + MESSAGE_TYPE = MessageType.GNSS_ATTITUDE_OUTPUT MESSAGE_VERSION = 0 _STRUCT = struct.Struct(' int: return cls._STRUCT.size + MeasurementDetails.calcsize() @classmethod - def to_numpy(cls, messages: Sequence['GNSSHeadingOutput']): + def to_numpy(cls, messages: Sequence['GNSSAttitudeOutput']): result = { 'solution_type': np.array([int(m.solution_type) for m in messages], dtype=int), 'flags': np.array([int(m.flags) for m in messages], dtype=np.uint32), @@ -1270,11 +1270,11 @@ def to_numpy(cls, messages: Sequence['GNSSHeadingOutput']): return result -class RawGNSSHeadingOutput(MessagePayload): +class RawGNSSAttitudeOutput(MessagePayload): """! - @brief Raw (uncorrected) GNSS heading sensor measurement output. + @brief Raw (uncorrected) GNSS attitude sensor measurement output. """ - MESSAGE_TYPE = MessageType.RAW_GNSS_HEADING_OUTPUT + MESSAGE_TYPE = MessageType.RAW_GNSS_ATTITUDE_OUTPUT MESSAGE_VERSION = 0 _STRUCT = struct.Struct(' int: return cls._STRUCT.size + MeasurementDetails.calcsize() @classmethod - def to_numpy(cls, messages: Sequence['RawGNSSHeadingOutput']): + def to_numpy(cls, messages: Sequence['RawGNSSAttitudeOutput']): result = { 'solution_type': np.array([int(m.solution_type) for m in messages], dtype=int), 'flags': np.array([int(m.flags) for m in messages], dtype=np.uint32), diff --git a/python/fusion_engine_client/messages/solution.py b/python/fusion_engine_client/messages/solution.py index c607ebc5..e6b910be 100644 --- a/python/fusion_engine_client/messages/solution.py +++ b/python/fusion_engine_client/messages/solution.py @@ -818,7 +818,7 @@ class RelativeENUPositionMessage(MessagePayload): This message represents the relationship between the navigation engine's position solution and a nearby RTK base station. It is not used to convey unfiltered vehicle body orientation measurements generated using multiple - GNSS antennas. See @ref GNSSHeadingOutput instead. + GNSS antennas. See @ref GNSSAttitudeOutput instead. """ MESSAGE_TYPE = MessageType.RELATIVE_ENU_POSITION MESSAGE_VERSION = 0 diff --git a/src/point_one/fusion_engine/messages/configuration.h b/src/point_one/fusion_engine/messages/configuration.h index b3bb010f..042160d6 100644 --- a/src/point_one/fusion_engine/messages/configuration.h +++ b/src/point_one/fusion_engine/messages/configuration.h @@ -1222,7 +1222,7 @@ struct P1_ALIGNAS(4) HardwareTickConfig { * If one value is NOT set, the system will not output the corrected * heading message. * - * @ref GNSSHeadingOutput + * @ref GNSSAttitudeOutput */ struct P1_ALIGNAS(4) HeadingBias { /** diff --git a/src/point_one/fusion_engine/messages/defs.h b/src/point_one/fusion_engine/messages/defs.h index 7e7df482..bcf22dd1 100644 --- a/src/point_one/fusion_engine/messages/defs.h +++ b/src/point_one/fusion_engine/messages/defs.h @@ -47,9 +47,10 @@ enum class MessageType : uint16_t { // Sensor measurement messages. IMU_OUTPUT = 11000, ///< @ref IMUOutput - RAW_GNSS_HEADING_OUTPUT = 11001, ///< @ref RawGNSSHeadingOutput + RAW_GNSS_ATTITUDE_OUTPUT = 11001, ///< @ref RawGNSSAttitudeOutput RAW_IMU_OUTPUT = 11002, ///< @ref RawIMUOutput - GNSS_HEADING_OUTPUT = 11003, ///< @ref GNSSHeadingOutput + // TODO Change the numbers + GNSS_ATTITUDE_OUTPUT = 11003, ///< @ref GNSSAttitudeOutput IMU_INPUT = 11004, ///< @ref IMUInput // Vehicle measurement messages. @@ -151,14 +152,14 @@ P1_CONSTEXPR_FUNC const char* to_string(MessageType type) { case MessageType::IMU_OUTPUT: return "IMU Output"; - case MessageType::RAW_GNSS_HEADING_OUTPUT: - return "Raw GNSS Heading Output"; + case MessageType::RAW_GNSS_ATTITUDE_OUTPUT: + return "Raw GNSS Attitude Output"; case MessageType::RAW_IMU_OUTPUT: return "Raw IMU Output"; - case MessageType::GNSS_HEADING_OUTPUT: - return "GNSS Heading Output"; + case MessageType::GNSS_ATTITUDE_OUTPUT: + return "GNSS Attitude Output"; case MessageType::IMU_INPUT: return "IMU Input"; @@ -330,9 +331,9 @@ P1_CONSTEXPR_FUNC bool IsCommand(MessageType message_type) { case MessageType::RELATIVE_ENU_POSITION: case MessageType::SYSTEM_STATUS: case MessageType::IMU_OUTPUT: - case MessageType::RAW_GNSS_HEADING_OUTPUT: + case MessageType::RAW_GNSS_ATTITUDE_OUTPUT: case MessageType::RAW_IMU_OUTPUT: - case MessageType::GNSS_HEADING_OUTPUT: + case MessageType::GNSS_ATTITUDE_OUTPUT: case MessageType::IMU_INPUT: case MessageType::DEPRECATED_WHEEL_SPEED_MEASUREMENT: case MessageType::DEPRECATED_VEHICLE_SPEED_MEASUREMENT: diff --git a/src/point_one/fusion_engine/messages/measurements.h b/src/point_one/fusion_engine/messages/measurements.h index 22b1e113..d7f74bb0 100644 --- a/src/point_one/fusion_engine/messages/measurements.h +++ b/src/point_one/fusion_engine/messages/measurements.h @@ -1134,20 +1134,20 @@ struct P1_ALIGNAS(4) DeprecatedVehicleSpeedMeasurement : public MessagePayload { }; //////////////////////////////////////////////////////////////////////////////// -// Heading Sensor Definitions +// Attitude Sensor Definitions //////////////////////////////////////////////////////////////////////////////// /** - * @brief Multi-antenna GNSS heading sensor measurement output with offset - * corrections applied (@ref MessageType::GNSS_HEADING_OUTPUT, version + * @brief Multi-antenna GNSS attitude sensor measurement output with offset + * corrections applied (@ref MessageType::GNSS_ATTITUDE_OUTPUT, version * 1.0). * @ingroup measurement_messages * - * This message is an output from the device contaning heading/orientation - * measurements generated using multiple GNSS antennas/receivers. On supported - * devices, the device will measure vehicle yaw (heading) and pitch based on the - * relative positions of two GNSS antennas. When more than two antennas are - * present, the device may additionally measure roll angle. + * This message is an output from the device contaning orientation measurements + * generated using multiple GNSS antennas/receivers. On supported devices, the + * device will measure vehicle yaw (heading) and pitch based on the relative + * positions of two GNSS antennas. When more than two antennas are present, the + * device may additionally measure roll angle. * * @note * This message contains vehicle body angle measurements generated from GNSS @@ -1157,10 +1157,10 @@ struct P1_ALIGNAS(4) DeprecatedVehicleSpeedMeasurement : public MessagePayload { * * The measurements in this message have user-specified corrections applied for * the horizontal and vertical offsets between the two GNSS antennas. See also - * @ref RawGNSSHeadingOutput. + * @ref RawGNSSAttitudeOutput. */ -struct P1_ALIGNAS(4) GNSSHeadingOutput : public MessagePayload { - static constexpr MessageType MESSAGE_TYPE = MessageType::GNSS_HEADING_OUTPUT; +struct P1_ALIGNAS(4) GNSSAttitudeOutput : public MessagePayload { + static constexpr MessageType MESSAGE_TYPE = MessageType::GNSS_ATTITUDE_OUTPUT; static constexpr uint8_t MESSAGE_VERSION = 0; /** @@ -1205,8 +1205,8 @@ struct P1_ALIGNAS(4) GNSSHeadingOutput : public MessagePayload { }; /** - * @brief Raw (uncorrected) GNSS heading sensor measurement output (@ref - * MessageType::RAW_GNSS_HEADING_OUTPUT, version 1.0). + * @brief Raw (uncorrected) GNSS attitude sensor measurement output (@ref + * MessageType::RAW_GNSS_ATTITUDE_OUTPUT, version 1.0). * @ingroup measurement_messages * * This message is an output from the device contaning raw orientation @@ -1216,11 +1216,11 @@ struct P1_ALIGNAS(4) GNSSHeadingOutput : public MessagePayload { * secondary GNSS antenna. * * For vehicle body angle measurements, and for measurements corrected for - * horizontal/vertical offsets, see @ref GNSSHeadingOutput. + * horizontal/vertical offsets, see @ref GNSSAttitudeOutput. */ -struct P1_ALIGNAS(4) RawGNSSHeadingOutput : public MessagePayload { +struct P1_ALIGNAS(4) RawGNSSAttitudeOutput : public MessagePayload { static constexpr MessageType MESSAGE_TYPE = - MessageType::RAW_GNSS_HEADING_OUTPUT; + MessageType::RAW_GNSS_ATTITUDE_OUTPUT; static constexpr uint8_t MESSAGE_VERSION = 0; /** diff --git a/src/point_one/fusion_engine/messages/solution.h b/src/point_one/fusion_engine/messages/solution.h index 956da115..f66422d8 100644 --- a/src/point_one/fusion_engine/messages/solution.h +++ b/src/point_one/fusion_engine/messages/solution.h @@ -507,7 +507,7 @@ struct P1_ALIGNAS(4) CalibrationStatusMessage : public MessagePayload { * This message represents the relationship between the navigation engine's * position solution and a nearby RTK base station. It is not used to convey * unfiltered vehicle body orientation measurements generated using multiple - * GNSS antennas. See @ref GNSSHeadingOutput instead. + * GNSS antennas. See @ref GNSSAttitudeOutput instead. */ struct P1_ALIGNAS(4) RelativeENUPositionMessage : public MessagePayload { static constexpr MessageType MESSAGE_TYPE =