40 namespace data_processing {
49 const std::shared_ptr<std::vector<uint8_t>
const> vec_ptr = buffer.
getBuffer();
50 std::vector<uint8_t>::const_iterator data_ptr = vec_ptr->begin();
52 std::vector<uint16_t> geometry_distance_mm;
53 for (uint32_t i = 0; i < array_length; i++)
61 float res = 275.0 / array_length;
74 uint32_t elem_number)
const A packetbuffer for the raw data from the sensor.
std::shared_ptr< std::vector< uint8_t > const > getBuffer() const
Getter to return a copy of the data saved in the PacketBuffer.
bool parseTCPSequence(const datastructure::PacketBuffer &buffer, datastructure::FieldData &field_data) const
Parses a tcp sequence and return the field geometry data of the warning and protective fields...
ParseFieldGeometryData()
Constructor of the parser.
void setStartAngleDegrees(const float &start_angle)
Set the start angle of the scan from degrees.
uint32_t readArrayLength(std::vector< uint8_t >::const_iterator data_ptr) const
Field data for warning and protective fields.
uint32_t readUint32LittleEndian(std::vector< uint8_t >::const_iterator it)
Read an unsigned 32-bit integer at offset in little endian encoding.
void setAngularBeamResolutionDegrees(const float &angular_beam_resolution)
Set the angular resolution between beams from degrees.
uint16_t readArrayElement(std::vector< uint8_t >::const_iterator data_ptr, uint32_t elem_number) const
void setBeamDistances(const std::vector< uint16_t > &beam_distances)
Sets vector with beam distances for field.
uint16_t readUint16LittleEndian(std::vector< uint8_t >::const_iterator it)
Read an unsigned 16-bit integer at offset in little endian encoding.