livox_mid360_core
C++ driver library for the Livox Mid-360 LiDAR
Toggle main menu visibility
Loading...
Searching...
No Matches
tag.hpp
Go to the documentation of this file.
1
3
#pragma once
4
5
#include <cstdint>
6
#include <string>
7
#include <string_view>
8
9
#include "
livox/mid360/export.hpp
"
10
11
LIVOX_MID360_API_BEGIN
12
namespace
livox::mid360
13
{
14
16
enum class
TagConfidence
: std::uint8_t
17
{
18
kHigh = 0,
19
kMedium = 1,
20
kLow = 2,
21
kReserved = 3,
22
};
23
24
[[nodiscard]] std::string_view
to_string
(
TagConfidence
c)
noexcept
;
25
27
struct
TagInfo
28
{
29
TagConfidence
adjacent_glue
;
30
TagConfidence
particles
;
31
TagConfidence
other
;
32
TagConfidence
reserved
;
33
};
34
35
[[nodiscard]] std::string
to_string
(
const
TagInfo
& t);
36
40
[[nodiscard]]
constexpr
TagInfo
decode_tag
(std::uint8_t tag)
noexcept
41
{
42
return
{
43
static_cast<
TagConfidence
>
(tag & 0x3u),
static_cast<
TagConfidence
>
((tag >> 2) & 0x3u),
44
static_cast<
TagConfidence
>
((tag >> 4) & 0x3u),
static_cast<
TagConfidence
>
((tag >> 6) & 0x3u)};
45
}
46
49
[[nodiscard]]
constexpr
bool
is_noise
(
50
std::uint8_t tag,
TagConfidence
worst_accepted = TagConfidence::kHigh)
noexcept
51
{
52
const
TagInfo
t =
decode_tag
(tag);
53
return
t.
adjacent_glue
> worst_accepted || t.
particles
> worst_accepted;
54
}
55
56
}
// namespace livox::mid360
57
LIVOX_MID360_API_END
export.hpp
Symbol visibility helpers.
livox::mid360
The livox_mid360_core library: everything declared by the public headers.
Definition
bytes.hpp:14
livox::mid360::TagConfidence
TagConfidence
Confidence that a point is a normal return for one tag category; higher = more likely noise.
Definition
tag.hpp:17
livox::mid360::decode_tag
constexpr TagInfo decode_tag(std::uint8_t tag) noexcept
Splits a raw tag byte into its four fields.
Definition
tag.hpp:40
livox::mid360::is_noise
constexpr bool is_noise(std::uint8_t tag, TagConfidence worst_accepted=TagConfidence::kHigh) noexcept
True when the adjacent-glue or particle confidence is worse than worst_accepted; the other and reserv...
Definition
tag.hpp:49
livox::mid360::to_string
std::string_view to_string(Event::Kind kind) noexcept
Name of an event kind, e.g. "state_changed".
livox::mid360::TagInfo
Decoded tag byte: bit 0-1 adjacent glue, 2-3 rain / fog / dust, 4-5 other, 6-7 reserved.
Definition
tag.hpp:28
livox::mid360::TagInfo::particles
TagConfidence particles
bit 2-3: rain, fog, dust
Definition
tag.hpp:30
livox::mid360::TagInfo::adjacent_glue
TagConfidence adjacent_glue
bit 0-1: glue points between adjacent objects
Definition
tag.hpp:29
livox::mid360::TagInfo::other
TagConfidence other
bit 4-5: other properties
Definition
tag.hpp:31
livox::mid360::TagInfo::reserved
TagConfidence reserved
bit 6-7
Definition
tag.hpp:32
livox
mid360
tag.hpp
Generated by
1.18.0