Vanetza
 
Loading...
Searching...
No Matches
position_confidence.hpp
1#ifndef POSITION_CONFIDENCE_HPP_FNHKVJZL
2#define POSITION_CONFIDENCE_HPP_FNHKVJZL
3
4#include <vanetza/units/angle.hpp>
5#include <vanetza/units/length.hpp>
6#include <cmath>
7#include <limits>
8
9namespace vanetza
10{
11
13{
15 semi_major(units::Length::from_value(std::numeric_limits<units::Length::value_type>::infinity())),
16 semi_minor(units::Length::from_value(std::numeric_limits<units::Length::value_type>::infinity()))
17 {}
18
19 operator bool() const
20 {
21 return !std::isinf(semi_major.value()) && semi_minor.value() <= semi_major.value() && semi_minor.value() >= 0.0;
22 }
23
24 units::Length semi_major;
25 units::Length semi_minor;
26 units::TrueNorth orientation;
27};
28
29} // namespace vanetza
30
31#endif /* POSITION_CONFIDENCE_HPP_FNHKVJZL */
32