Vanetza
Loading...
Searching...
No Matches
units.hpp
1#ifndef UNITS_HPP_O254IL9W
2#define UNITS_HPP_O254IL9W
3
4#include <boost/units/make_scaled_unit.hpp>
5#include <boost/units/quantity.hpp>
6#include <boost/units/systems/angle/degrees.hpp>
7#include <boost/units/systems/si/length.hpp>
8#include <cstdint>
9
10namespace vanetza
11{
12namespace geonet
13{
14
15// distance given in meter
16typedef boost::units::quantity<boost::units::si::length, uint16_t> distance_u16t;
17
18// geographical angles with 1/10 micro degree resolution
19typedef boost::units::quantity<boost::units::make_scaled_unit<
20 boost::units::degree::plane_angle,
21 boost::units::scale<10, boost::units::static_rational<-7>>
22 >::type, int32_t> geo_angle_i32t;
23
24// angle with 1 degree resolution
25typedef boost::units::quantity<boost::units::degree::plane_angle, uint16_t> angle_u16t;
26
27// heading with 0.1 degree resolution
28typedef boost::units::quantity<boost::units::make_scaled_unit<
29 boost::units::degree::plane_angle,
30 boost::units::scale<10, boost::units::static_rational<-1>>
31 >::type, uint16_t> heading_u16t;
32
33} // namespace geonet
34} // namespace vanetza
35
36#endif /* UNITS_HPP_O254IL9W */
ChunckPacket is a packet consisting of several memory chunks.
ByteBufferConvertible & operator[](OsiLayer ol)
ChunkPacket & merge(ChunkPacket &packet, OsiLayer from, OsiLayer to)
std::size_t size() const
const ByteBufferConvertible & layer(OsiLayer ol) const
const ByteBufferConvertible & operator[](OsiLayer ol) const
ByteBufferConvertible & layer(OsiLayer ol)
std::size_t size(OsiLayer from, OsiLayer to) const
ChunkPacket extract(OsiLayer from, OsiLayer to)
std::size_t size(OsiLayer from, OsiLayer to) const
buffer_const_range operator[](OsiLayer layer) const
std::size_t size() const
void set_boundary(OsiLayer, unsigned bytes)
const ByteBuffer & buffer() const
CohesivePacket(const ByteBuffer &buffer, OsiLayer layer)
void trim(OsiLayer from, unsigned bytes)
std::size_t size(OsiLayer single_layer) const
value_type operator[](size_type) const
Definition byte_view.cpp:48
byte_view_range(ByteBuffer &&)
Definition byte_view.cpp:37
byte_view_range(const ByteBuffer::const_iterator &, const ByteBuffer::const_iterator &)
Definition byte_view.cpp:27
ByteBuffer::const_pointer data() const
Definition byte_view.cpp:42
void encode(units::Duration)
Definition lifetime.cpp:45
units::Duration decode() const
Definition lifetime.cpp:59
bool after(const Timestamp &other) const
Definition timestamp.cpp:76
bool before(const Timestamp &other) const
Definition timestamp.cpp:71