define the arrival waypoint
This commit is contained in:
56
include/aman/types/ArrivalWaypoint.h
Normal file
56
include/aman/types/ArrivalWaypoint.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* @brief Defines a waypoint of a route
|
||||
* @file types/ArrivalWaypoint.h
|
||||
* @author Sven Czarnian <devel@svcz.de>
|
||||
* @copyright Copyright 2020-2021 Sven Czarnian
|
||||
* @license This project is published under the GNU General Public License v3 (GPLv3)
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <aman/helper/UtcTime.h>
|
||||
#include <aman/types/GeoCoordinate.h>
|
||||
|
||||
namespace aman {
|
||||
/**
|
||||
* @brief Describes a waypoint of a route
|
||||
* @ingroup types
|
||||
*/
|
||||
class ArrivalWaypoint {
|
||||
private:
|
||||
std::string m_name;
|
||||
GeoCoordinate m_position;
|
||||
Length m_altitude;
|
||||
Velocity m_indicatedAirspeed;
|
||||
UtcTime::Point m_plannedArrivalTime;
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief Creates an empty waypoint
|
||||
*/
|
||||
ArrivalWaypoint() noexcept;
|
||||
/**
|
||||
* @brief Creates a waypoint
|
||||
* @param[in] name The waypoint's name
|
||||
* @param[in] position The waypoint's position
|
||||
* @param[in] altitude The planned altitude
|
||||
* @param[in] indicatedAirspeed The planned IAS
|
||||
* @param[in] pta The planned time of arrival
|
||||
*/
|
||||
ArrivalWaypoint(const std::string& name, const GeoCoordinate& position, const Length& altitude,
|
||||
const Velocity& indicatedAirspeed, const UtcTime::Point& pta);
|
||||
|
||||
/**
|
||||
* @brief Returns the waypoint's name
|
||||
* @return The name
|
||||
*/
|
||||
const std::string& name() const noexcept;
|
||||
/**
|
||||
* @brief Returns the waypoint's position
|
||||
* @return The position
|
||||
*/
|
||||
const GeoCoordinate& position() const noexcept;
|
||||
};
|
||||
}
|
||||
@@ -46,6 +46,7 @@ SET(SOURCE_CONFIG_FILES
|
||||
)
|
||||
|
||||
SET(SOURCE_TYPES_FILES
|
||||
types/ArrivalWaypoint.cpp
|
||||
types/GeoCoordinate.cpp
|
||||
)
|
||||
|
||||
@@ -73,6 +74,7 @@ SET(INCLUDE_HELPER_FILES
|
||||
|
||||
SET(INCLUDE_TYPES_FILES
|
||||
${CMAKE_SOURCE_DIR}/include/aman/types/AltitudeWindData.h
|
||||
${CMAKE_SOURCE_DIR}/include/aman/types/ArrivalWaypoint.h
|
||||
${CMAKE_SOURCE_DIR}/include/aman/types/Communication.h
|
||||
${CMAKE_SOURCE_DIR}/include/aman/types/GeoCoordinate.h
|
||||
${CMAKE_SOURCE_DIR}/include/aman/types/Quantity.hpp
|
||||
|
||||
37
src/types/ArrivalWaypoint.cpp
Normal file
37
src/types/ArrivalWaypoint.cpp
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Author:
|
||||
* Sven Czarnian <devel@svcz.de>
|
||||
* Brief:
|
||||
* Implements the waypoint
|
||||
* Copyright:
|
||||
* 2020-2021 Sven Czarnian
|
||||
* License:
|
||||
* GNU General Public License v3 (GPLv3)
|
||||
*/
|
||||
|
||||
#include <aman/types/ArrivalWaypoint.h>
|
||||
|
||||
using namespace aman;
|
||||
|
||||
ArrivalWaypoint::ArrivalWaypoint() noexcept :
|
||||
m_name(),
|
||||
m_position(),
|
||||
m_altitude(),
|
||||
m_indicatedAirspeed(),
|
||||
m_plannedArrivalTime() { }
|
||||
|
||||
ArrivalWaypoint::ArrivalWaypoint(const std::string& name, const GeoCoordinate& position, const Length& altitude,
|
||||
const Velocity& indicatedAirspeed, const UtcTime::Point& pta) :
|
||||
m_name(name),
|
||||
m_position(position),
|
||||
m_altitude(altitude),
|
||||
m_indicatedAirspeed(indicatedAirspeed),
|
||||
m_plannedArrivalTime(pta) { }
|
||||
|
||||
const std::string& ArrivalWaypoint::name() const noexcept {
|
||||
return this->m_name;
|
||||
}
|
||||
|
||||
const GeoCoordinate& ArrivalWaypoint::position() const noexcept {
|
||||
return this->m_position;
|
||||
}
|
||||
Reference in New Issue
Block a user