obu-firmware builds against vanetza-idf from microbu-esp32c5/external, but that tree was gitignored, so a clone of this repository could not build the firmware it ships. It is now committed here as ordinary files in its own folder, microbu-esp32c5/: the colleague's commit cf4b99f plus the V2X2MAP bridge's signature verification (--trust) used on the bench. Nothing is fetched from or pushed to the colleague's repository; this repository and its remotes carry everything. The folder's own .gitignore keeps build output, downloaded components and private key material out, as it did there; the committed file set is identical to that repository's tracked files. The ESP32-C5 is still flashed from obu-firmware/, which only takes vanetza-idf from microbu-esp32c5/, so the two stay separate folders. FLASHING.md says how to take a newer version of the colleague's tree (copy it over the folder, rebuild, test, commit).
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
|
|
|