Vanetza
Loading...
Searching...
No Matches
geodesy.hpp
1#pragma once
2
3#include <vanetza/geodesy/position.hpp>
4
5namespace vanetza
6{
7namespace geodesy
8{
9
10/**
11 * Get distance between two geodetic positions.
12 * Delegates to the best available backend (GeographicLib if available, else haversine).
13 * \param a first position
14 * \param b second position
15 * \return distance in meters (always positive) or NaN for invalid input
16 */
17units::Length distance(const GeodeticPosition& a, const GeodeticPosition& b);
18
19/**
20 * Derive cartesian position ENU from geodetic WGS84 coordinates
21 * and a WGS84 reference point which becomes the cartesian origin.
22 * Delegates to the best available backend.
23 * \param origin WGS84 reference point becoming origin
24 * \param position Calculate cartesian coordinates for this point
25 * \return Cartesian coordinates of position relative to origin
26 */
27CartesianPosition local_cartesian(
28 const GeodeticPosition& origin,
29 const GeodeticPosition& position);
30
31} // namespace geodesy
32} // namespace vanetza
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