Voyant API 0.2.1
|
Wrapper for PointData messages. More...
#include <voyant_point_data_wrapper.hpp>
Public Member Functions | |
~PointDataWrapper () override | |
Destructor. | |
void | fromProto (PointData::Reader reader) override |
Update wrapper fields from a Cap'n Proto reader. | |
void | toProto (PointData::Builder &builder) const override |
Write wrapper fields to a Cap'n Proto builder. | |
void | debugString (std::ostream &os) const override |
Generate a debug string representation. | |
int32_t | timestamp_nanosecs () const |
Get timestamp in nanoseconds since frame start. | |
void | set_timestamp_nanosecs (int32_t value) |
Set timestamp in nanoseconds. | |
uint32_t | point_index () const |
Get point index within frame. | |
void | set_point_index (uint32_t value) |
Set point index. | |
float | x () const |
Get X position in meters. | |
void | set_x (float value) |
Set X position. | |
float | y () const |
Get Y position in meters. | |
void | set_y (float value) |
Set Y position. | |
float | z () const |
Get Z position in meters. | |
void | set_z (float value) |
Set Z position. | |
float | radial_vel () const |
Get radial velocity in m/s. | |
void | set_radial_vel (float value) |
Set radial velocity. | |
float | snr_linear () const |
Get signal-to-noise ratio (linear) | |
void | set_snr_linear (float value) |
Set signal-to-noise ratio. | |
float | calibrated_reflectance () const |
Get calibrated reflectance. | |
void | set_calibrated_reflectance (float value) |
Set calibrated reflectance. | |
float | noise_mean_estimate () const |
Get noise mean estimate. | |
void | set_noise_mean_estimate (float value) |
Set noise mean estimate. | |
float | min_ramp_snr () const |
Get minimum ramp SNR. | |
void | set_min_ramp_snr (float value) |
Set minimum ramp SNR. | |
DropReason | drop_reason () const |
Get point drop reason. | |
void | set_drop_reason (DropReason value) |
Set point drop reason. | |
bool | is_valid () const |
Check if point is valid based on drop reason. | |
void | set_point_index_components (uint16_t azimuth, uint16_t elevation) |
Encode azimuth and elevation into the point_index field. | |
uint16_t | azimuth_index () const |
Extract azimuth index from point_index. | |
uint16_t | elevation_index () const |
Extract elevation index from point_index. | |
float | range () const |
Calculate the range (Euclidean distance from origin) of the point. | |
virtual void | fromProto (typename T::Reader reader)=0 |
Update wrapper fields from a Cap'n Proto reader. | |
virtual void | toProto (typename T::Builder &builder) const=0 |
Write wrapper fields to a Cap'n Proto builder. | |
void | fromBuffer (const uint8_t *buffer, size_t size) |
Update wrapper fields from a serialized message buffer. | |
size_t | toBuffer (uint8_t *buffer, size_t buffer_size) const |
Serialize this wrapper to a buffer using Cap'n Proto format. | |
Wrapper for PointData messages.
Provides a C++ interface for handling LiDAR point data with position, velocity, signal quality, and validity information.
|
override |
Destructor.
uint16_t PointDataWrapper::azimuth_index | ( | ) | const |
Extract azimuth index from point_index.
|
inline |
Get calibrated reflectance.
|
overridevirtual |
Generate a debug string representation.
os | The output stream to write to |
Implements CapnpWrapper< PointData >.
|
inline |
Get point drop reason.
uint16_t PointDataWrapper::elevation_index | ( | ) | const |
Extract elevation index from point_index.
|
inlineinherited |
Update wrapper fields from a serialized message buffer.
buffer | Pointer to the buffer containing serialized Cap'n Proto data |
size | Size of the buffer in bytes |
|
override |
Update wrapper fields from a Cap'n Proto reader.
reader | The PointData reader to extract data from |
|
pure virtualinherited |
Update wrapper fields from a Cap'n Proto reader.
reader | The Cap'n Proto reader to extract data from |
|
inline |
Check if point is valid based on drop reason.
|
inline |
Get minimum ramp SNR.
|
inline |
Get noise mean estimate.
|
inline |
Get point index within frame.
|
inline |
Get radial velocity in m/s.
float PointDataWrapper::range | ( | ) | const |
Calculate the range (Euclidean distance from origin) of the point.
|
inline |
Set calibrated reflectance.
value | Reflectivity value |
|
inline |
Set point drop reason.
value | Drop reason enum value |
|
inline |
Set minimum ramp SNR.
value | Minimum ramp SNR value |
|
inline |
Set noise mean estimate.
value | Noise mean value |
|
inline |
Set point index.
value | Point index value |
void PointDataWrapper::set_point_index_components | ( | uint16_t | azimuth, |
uint16_t | elevation | ||
) |
Encode azimuth and elevation into the point_index field.
azimuth | Azimuth index (16 bits) |
elevation | Elevation index (12 bits) |
|
inline |
Set radial velocity.
value | Velocity in m/s |
|
inline |
Set signal-to-noise ratio.
value | SNR value |
|
inline |
Set timestamp in nanoseconds.
value | Timestamp value |
|
inline |
Set X position.
value | X coordinate in meters |
|
inline |
Set Y position.
value | Y coordinate in meters |
|
inline |
Set Z position.
value | Z coordinate in meters |
|
inline |
Get signal-to-noise ratio (linear)
|
inline |
Get timestamp in nanoseconds since frame start.
|
inlineinherited |
Serialize this wrapper to a buffer using Cap'n Proto format.
buffer | Pointer to the buffer to write serialized data to |
buffer_size | Size of the buffer in bytes |
std::runtime_error | if the buffer is too small |
|
override |
Write wrapper fields to a Cap'n Proto builder.
builder | The PointData builder to write data to |
|
pure virtualinherited |
Write wrapper fields to a Cap'n Proto builder.
builder | The Cap'n Proto builder to write data to |
|
inline |
Get X position in meters.
|
inline |
Get Y position in meters.
|
inline |
Get Z position in meters.