obu-firmware builds against the vanetza-idf C-ITS library, which until now came from the colleague's microbu-esp32c5 tree beside the repository and was not tracked here, so a clone of this repository could not build the firmware it ships. The library alone is now part of obu-firmware, as obu-firmware/external/vanetza-idf: their external/vanetza-idf at commit cf4b99f, unchanged (9775 files; see its PROVENANCE.md). CMake takes it from there by default; -DVANETZA_IDF_DIR still points the build elsewhere. The rest of the colleague's tree (their own VAM firmware, PKI tooling, station-link Python tools, the V2X2MAP bridge) stays out of this repository and gitignored; nothing is pushed to their repository. NOTES.md, docs/06, TODO.md and the pcap verifier's usage line point at the new location.
64 lines
1.6 KiB
C++
64 lines
1.6 KiB
C++
#pragma once
|
|
#include <vanetza/security/v3/asn1_types.hpp>
|
|
|
|
namespace vanetza
|
|
{
|
|
|
|
// forward declaration
|
|
struct PositionFix;
|
|
|
|
namespace security
|
|
{
|
|
namespace v3
|
|
{
|
|
|
|
/**
|
|
* Check if a TwoDLocation is valid
|
|
*
|
|
* \param location TwoDLocation to be checked
|
|
* \return true if latitude and longitude are within valid range
|
|
*/
|
|
bool is_valid(const asn1::TwoDLocation& location);
|
|
|
|
/**
|
|
* Check if position is inside a circular region
|
|
*
|
|
* \param pos position to be checked
|
|
* \param region circular region
|
|
* \return true if position is inside region
|
|
*/
|
|
bool is_inside(const PositionFix& pos, const asn1::CircularRegion& region);
|
|
|
|
/**
|
|
* Check if position is inside at least one of the given regions
|
|
*
|
|
* \param pos position to be checked
|
|
* \param regions sequence of rectangular regions
|
|
* \return true if position is inside at least one region
|
|
*/
|
|
bool is_inside(const PositionFix& pos, const asn1::SequenceOfRectangularRegion& region);
|
|
|
|
/**
|
|
* Check if position is inside a rectangular region
|
|
*
|
|
* \param pos position to be checked
|
|
* \param region rectangular region
|
|
* \return true if position is inside region
|
|
*/
|
|
bool is_inside(const PositionFix& pos, const asn1::RectangularRegion& region);
|
|
|
|
/**
|
|
* \brief Check if a location is inside a polygonal region.
|
|
*
|
|
* \param location The location to check.
|
|
* \param region The polygonal region to check against.
|
|
* \return true if the location is inside the region, false otherwise.
|
|
*/
|
|
bool is_inside(const PositionFix& location, const asn1::PolygonalRegion& region);
|
|
bool is_inside(const asn1::TwoDLocation* location, const asn1::PolygonalRegion* region);
|
|
|
|
} // namespace v3
|
|
} // namespace security
|
|
} // namespace vanetza
|
|
|