Skip to content

Class astrea::trace::Grid

ClassList > astrea > trace > Grid

Class representing a grid of ground points. More...

  • #include <Grid.hpp>

Public Types

Type Name
typedef std::vector< GroundPoint >::const_iterator const_iterator
Constant iterator types for the Grid class.
typedef std::vector< GroundPoint >::iterator iterator
Iterator types for the Grid class.

Public Functions

Type Name
Grid () = default
Default constructor for the Grid class.
Grid (const std::vector< GroundPoint > & groundPoints)
Construct a Grid with a vector of ground stations.
Grid (const astro::CelestialBody * parent, const LatLon & corner1, const LatLon & corner4, const GridType & gridType, const Angle & spacing=5.0 *mp_units::angular::unit_symbols::deg, const Unitless & weight=0.0 *mp_units::one)
Construct a Grid with specified corner points and grid type.
iterator begin ()
Returns an iterator to the beginning of the ground points in the grid.
const_iterator begin () const
Returns a constant iterator to the beginning of the ground points in the grid.
const_iterator cbegin () const
Returns a constant iterator to the beginning of the ground points in the grid.
const_iterator cend () const
Returns a constant iterator to the end of the ground points in the grid.
iterator end ()
Returns an iterator to the end of the ground points in the grid.
const_iterator end () const
Returns a constant iterator to the end of the ground points in the grid.
GridType get_grid_type () const
Get the type of grid.
const astro::CelestialBody * get_parent () const
Get the parent celestial body of the grid.
GroundPoint & operator[] (const std::size_t index)
Access ground points in the grid by index.
const GroundPoint & operator[] (const std::size_t index) const
Access ground points in the grid by index (constant version).
std::size_t size () const
Get the number of ground points in the grid.
virtual ~Grid () = default
Default destructor for the Grid class.

Detailed Description

The Grid class manages a collection of ground points, allowing for various grid configurations such as uniform, equal area, and weighted grids. It provides methods to iterate over the ground stations and access their properties.

Public Types Documentation

typedef const_iterator

Constant iterator types for the Grid class.

using astrea::trace::Grid::const_iterator =  std::vector<GroundPoint>::const_iterator;


typedef iterator

Iterator types for the Grid class.

using astrea::trace::Grid::iterator =  std::vector<GroundPoint>::iterator;


Public Functions Documentation

function Grid [1/3]

Default constructor for the Grid class.

astrea::trace::Grid::Grid () = default

Initializes an empty grid with no ground points.


function Grid [2/3]

Construct a Grid with a vector of ground stations.

inline astrea::trace::Grid::Grid (
    const std::vector< GroundPoint > & groundPoints
) 

Parameters:

  • groundPoints Vector of GroundPoint objects representing the grid.

function Grid [3/3]

Construct a Grid with specified corner points and grid type.

inline astrea::trace::Grid::Grid (
    const astro::CelestialBody * parent,
    const LatLon & corner1,
    const LatLon & corner4,
    const GridType & gridType,
    const Angle & spacing=5.0 *mp_units::angular::unit_symbols::deg,
    const Unitless & weight=0.0 *mp_units::one
) 

Parameters:

  • corner1 First corner point of the grid (latitude, longitude).
  • corner4 Fourth corner point of the grid (latitude, longitude).
  • gridType Type of grid to create (uniform, equal area, etc.).
  • spacing Spacing between points in the grid (default is 5 degrees).
  • weight Weighting factor for the grid (default is 0).

function begin [1/2]

Returns an iterator to the beginning of the ground points in the grid.

inline iterator astrea::trace::Grid::begin () 

Returns:

An iterator to the first ground point.


function begin [2/2]

Returns a constant iterator to the beginning of the ground points in the grid.

inline const_iterator astrea::trace::Grid::begin () const

Returns:

A constant iterator to the first ground point.


function cbegin

Returns a constant iterator to the beginning of the ground points in the grid.

inline const_iterator astrea::trace::Grid::cbegin () const

Returns:

A constant iterator to the first ground point.


function cend

Returns a constant iterator to the end of the ground points in the grid.

inline const_iterator astrea::trace::Grid::cend () const

Returns:

A constant iterator to one past the last ground point.


function end [1/2]

Returns an iterator to the end of the ground points in the grid.

inline iterator astrea::trace::Grid::end () 

Returns:

An iterator to one past the last ground point.


function end [2/2]

Returns a constant iterator to the end of the ground points in the grid.

inline const_iterator astrea::trace::Grid::end () const

Returns:

A constant iterator to one past the last ground point.


function get_grid_type

Get the type of grid.

inline GridType astrea::trace::Grid::get_grid_type () const

Returns:

GridType The type of grid (uniform, equal area, etc.).


function get_parent

Get the parent celestial body of the grid.

inline const astro::CelestialBody * astrea::trace::Grid::get_parent () const

Returns:

const CelestialBody* Pointer to the parent celestial body.


function operator[]

Access ground points in the grid by index.

inline GroundPoint & astrea::trace::Grid::operator[] (
    const std::size_t index
) 

Parameters:

  • index Index of the ground point to access.

Returns:

Reference to the GroundPoint at the specified index.


function operator[]

Access ground points in the grid by index (constant version).

inline const GroundPoint & astrea::trace::Grid::operator[] (
    const std::size_t index
) const

Parameters:

  • index Index of the ground point to access.

Returns:

Constant reference to the GroundPoint at the specified index.


function size

Get the number of ground points in the grid.

inline std::size_t astrea::trace::Grid::size () const

Returns:

std::size_t The number of ground points in the grid.


function ~Grid

Default destructor for the Grid class.

virtual astrea::trace::Grid::~Grid () = default



The documentation for this class was generated from the following file astrea/trace/trace/platforms/ground/Grid.hpp