1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- /*
- * @brief Defines the inbound
- * @file aman/types/Inbound.h
- * @author Sven Czarnian <devel@svcz.de>
- * @copyright Copyright 2021 Sven Czarnian
- * @license This project is published under the GNU General Public License v3 (GPLv3)
- */
- #pragma once
- #include <list>
- #pragma warning(push, 0)
- #include <EuroScopePlugIn.h>
- #pragma warning(pop)
- #pragma warning(disable: 4127)
- #pragma warning(disable: 5054)
- #include <protobuf/Communication.pb.h>
- #pragma warning(default: 5054)
- #pragma warning(default: 4127)
- #include <aman/types/AircraftPerformanceData.h>
- #include <aman/types/ArrivalWaypoint.h>
- namespace aman {
- class Inbound {
- private:
- std::vector<float> m_windLevels;
- std::vector<float> m_windDirections;
- std::vector<float> m_windSpeeds;
- AircraftPerformanceData m_performanceData;
- bool m_fixedPlan;
- std::string m_star;
- std::string m_runway;
- Velocity m_groundSpeed;
- std::size_t m_nextStarWaypoint;
- std::vector<ArrivalWaypoint> m_arrivalRoute;
- Time m_timeToLose;
- UtcTime::Point m_waypointEstimatedTimeOfArrival;
- bool m_resetFilter;
- void updatePrediction(EuroScopePlugIn::CRadarTarget& target, const aman::AircraftSchedule& inbound);
- Velocity indicatedAirspeed(const Length& altitude) const noexcept;
- Velocity groundSpeed(const Length& altitude, const Velocity& ias, const Angle& heading);
- void createWindTables(const google::protobuf::RepeatedPtrField<aman::WindData>& wind);
- void predictETA(const EuroScopePlugIn::CRadarTarget& target, const EuroScopePlugIn::CFlightPlanPositionPredictions& predictions);
- public:
- Inbound(EuroScopePlugIn::CRadarTarget& target, const aman::AircraftSchedule& inbound, const google::protobuf::RepeatedPtrField<aman::WindData>& wind);
- void update(EuroScopePlugIn::CRadarTarget& target, const aman::AircraftSchedule& inbound,
- const google::protobuf::RepeatedPtrField<aman::WindData>& wind);
- void update(EuroScopePlugIn::CRadarTarget& target);
- void directTo(EuroScopePlugIn::CRadarTarget& radarTarget, const std::string& waypoint);
- bool fixedPlan() const noexcept;
- UtcTime::Point eta() const;
- UtcTime::Point pta() const;
- const Time& timeToLose() const noexcept;
- const std::string& nextWaypoint() const noexcept;
- const std::vector<ArrivalWaypoint>& arrivalRoute() const noexcept;
- static int matchToPredictedPath(const EuroScopePlugIn::CFlightPlanPositionPredictions& predictions, const GeoCoordinate& position,
- const Velocity& groundspeed, Length& trackmiles);
- };
- }
|