Illustrated C/C++ source sheets, symbol index, API relationship graph, compiler console and debug trace

LIVE AI / FLEXIBLE SENSING / FLIGHT CONTEXT

Sensoraia API

Live AI and sensing, connected to the flight.
See, listen, inspect and return supported results while airborne.

Loading...
Searching...
No Matches
dipla::aigenlib::Point Struct Reference

Three-dimensional value type for route arithmetic. More...

#include <aigenlib.hpp>

Inheritance diagram for dipla::aigenlib::Point:

Public Member Functions

 Point (double east=0.0, double north=0.0, double altitude=0.0)
 Construct a point.
double & x () noexcept
 Access east.
double x () const noexcept
 Access east.
double & y () noexcept
 Access north.
double y () const noexcept
 Access north.
double & z () noexcept
 Access altitude.
double z () const noexcept
 Access altitude.
double & operator[] (std::size_t index)
 Checked coordinate access.
double operator[] (std::size_t index) const
 Checked coordinate access.
double norm () const noexcept
 Euclidean length.
bool finite () const noexcept
 Check every coordinate.
Point & operator+= (const Point &other) noexcept
 Add coordinates.
Point & operator-= (const Point &other) noexcept
 Subtract coordinates.

Data Fields

std::array< double, 3 > coordinates {}

Detailed Description

Three-dimensional value type for route arithmetic.

Coordinates use metres; norm uses overflow-resistant hypot.

Definition at line 43 of file aigenlib.hpp.

Constructor & Destructor Documentation

◆ Point()

dipla::aigenlib::Point::Point ( double east = 0.0,
double north = 0.0,
double altitude = 0.0 )

Construct a point.

Parameters
eastEast.
northNorth.
altitudeHeight.

Definition at line 187 of file aigenlib.cpp.

Member Function Documentation

◆ finite()

bool dipla::aigenlib::Point::finite ( ) const
noexcept

Check every coordinate.

Returns
True if finite.

Definition at line 197 of file aigenlib.cpp.

◆ norm()

double dipla::aigenlib::Point::norm ( ) const
noexcept

Euclidean length.

Returns
Nonnegative length.

Definition at line 196 of file aigenlib.cpp.

◆ operator+=()

Point & dipla::aigenlib::Point::operator+= ( const Point & other)
noexcept

Add coordinates.

Parameters
otherAddend.
Returns
This point.

Definition at line 198 of file aigenlib.cpp.

◆ operator-=()

Point & dipla::aigenlib::Point::operator-= ( const Point & other)
noexcept

Subtract coordinates.

Parameters
otherSubtrahend.
Returns
This point.

Definition at line 202 of file aigenlib.cpp.

◆ operator[]() [1/2]

double & dipla::aigenlib::Point::operator[] ( std::size_t index)

Checked coordinate access.

Parameters
indexCoordinate 0..2.
Returns
Mutable value.

Definition at line 194 of file aigenlib.cpp.

◆ operator[]() [2/2]

double dipla::aigenlib::Point::operator[] ( std::size_t index) const

Checked coordinate access.

Parameters
indexCoordinate 0..2.
Returns
Value.

Definition at line 195 of file aigenlib.cpp.

◆ x() [1/2]

double dipla::aigenlib::Point::x ( ) const
noexcept

Access east.

Returns
Coordinate.

Definition at line 189 of file aigenlib.cpp.

◆ x() [2/2]

double & dipla::aigenlib::Point::x ( )
noexcept

Access east.

Returns
Mutable coordinate.

Definition at line 188 of file aigenlib.cpp.

◆ y() [1/2]

double dipla::aigenlib::Point::y ( ) const
noexcept

Access north.

Returns
Coordinate.

Definition at line 191 of file aigenlib.cpp.

◆ y() [2/2]

double & dipla::aigenlib::Point::y ( )
noexcept

Access north.

Returns
Mutable coordinate.

Definition at line 190 of file aigenlib.cpp.

◆ z() [1/2]

double dipla::aigenlib::Point::z ( ) const
noexcept

Access altitude.

Returns
Coordinate.

Definition at line 193 of file aigenlib.cpp.

◆ z() [2/2]

double & dipla::aigenlib::Point::z ( )
noexcept

Access altitude.

Returns
Mutable coordinate.

Definition at line 192 of file aigenlib.cpp.

Field Documentation

◆ coordinates

std::array<double, 3> dipla::aigenlib::Point::coordinates {}

East, north, altitude.

Definition at line 44 of file aigenlib.hpp.


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