I-Seed drone's onboard service  0.0.9
Public Types | Public Member Functions | List of all members
mission_cell Class Reference

Component of the polygon, trapezoid or triangle. More...

#include <mission_cell.h>

Public Types

using point = utils::point
 
using polygon = utils::polygon
 

Public Member Functions

 mission_cell (const polygon &poly)
 
 ~mission_cell ()
 
std::size_t waypoint_count () const
 The minimum number of waypoints the cell can be covered by. More...
 
bool visited () const
 Once the build_path is used the instance is marked as visited. More...
 
double distance (const point &start) const
 The distance from point start to the closest cell waypoint from where path can be constructed. More...
 
void build_path (const point &start, std::vector< point > *result)
 Build mission path. More...
 

Detailed Description

Component of the polygon, trapezoid or triangle.

For each edge of the cell the mission_directed_cell instance will be created. Each such instance will be checked for the number of waypoints, and only those with a minimal number of waypoints will be kept. When build_path is called we will use closest instance of mission_directed_cell for path construction

Member Typedef Documentation

◆ point

◆ polygon

Constructor & Destructor Documentation

◆ mission_cell()

mission_cell::mission_cell ( const polygon poly)
explicit

◆ ~mission_cell()

mission_cell::~mission_cell ( )
default

Member Function Documentation

◆ waypoint_count()

auto mission_cell::waypoint_count ( ) const

The minimum number of waypoints the cell can be covered by.

Note
Zero number of waypoints can be returned in case if the effective cell area is zero, i.e. cell is the result of approximation error

◆ visited()

auto mission_cell::visited ( ) const

Once the build_path is used the instance is marked as visited.

Returns
true build_path is called already
false build_path is not called yet

◆ distance()

auto mission_cell::distance ( const point start) const

The distance from point start to the closest cell waypoint from where path can be constructed.

◆ build_path()

void mission_cell::build_path ( const point start,
std::vector< point > *  result 
)

Build mission path.

Parameters
startStarting point of the mission path
resultvector where mission path will be saved
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: