WSF
LatLon.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2019 Infoscitex, a DCS Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef LATLON_HPP
13#define LATLON_HPP
14
15#include "usmtf_export.h"
16
17#include <string>
18
19#include "FFIRN_Validator.hpp"
20#include "UtLLPos.hpp"
21
22namespace usmtf
23{
27
30
49
50
52
77class USMTF_EXPORT LatLon : public FFIRN_Validator
78{
79public:
80 LatLon() = default;
81 bool ParseAndValidate(const Field& aField) override;
82 const std::string& GetLatDegree() const noexcept;
83 const std::string& GetLonDegree() const noexcept;
84 const std::string& GetLatSeconds() const noexcept;
85 const std::string& GetLonSeconds() const noexcept;
86 const std::string& GetLatMinutes() const noexcept;
87 const std::string& GetLonMinutes() const noexcept;
88 const std::string& GetLatHemisphere() const noexcept;
89 const std::string& GetLonHemisphere() const noexcept;
93 const UtLLPos& GetUtLLPos() const noexcept;
94 std::string GetFormattedLatLon() const noexcept;
95 static std::string GetFormattedLatLon(const UtLLPos& position) noexcept;
96
97protected:
98 void SetUtLLPos() noexcept;
99 bool IsValidLatLonMinutes() noexcept;
100 bool IsValidLatLonSeconds() noexcept;
101 bool IsValidLattitudinalDegree(const std::string& aValue) noexcept;
102 bool IsValidLongitudinalDegree(const std::string& aValue) noexcept;
103 bool IsValidMinuteOrSecond(const std::string& aValue) noexcept;
104 bool IsValidLattitudinalHemisphere(const std::string& aValue) noexcept;
105 bool IsValidLongitudinalHemisphere(const std::string& aValue) noexcept;
114 UtLLPos mUtLLPos;
115};
116} // namespace usmtf
117#endif
Definition Field.hpp:48
std::string mLonMinutes
Definition LatLon.hpp:109
LatLon()=default
const std::string & GetLonDegree() const noexcept
Definition LatLon.cpp:40
const std::string & GetLatSeconds() const noexcept
Definition LatLon.cpp:45
bool ParseAndValidate(const Field &aField) override
Definition LatLon.cpp:22
std::string mLonHemisphere
Definition LatLon.hpp:113
const std::string & GetLatMinutes() const noexcept
Definition LatLon.cpp:55
bool IsValidLattitudinalHemisphere(const std::string &aValue) noexcept
Definition LatLon.cpp:334
const UtLLPos & GetUtLLPos() const noexcept
Definition LatLon.cpp:75
const std::string & GetLonHemisphere() const noexcept
Definition LatLon.cpp:70
std::string mLatSeconds
Definition LatLon.hpp:110
const std::string & GetLonMinutes() const noexcept
Definition LatLon.cpp:60
bool IsValidLongitudinalDegree(const std::string &aValue) noexcept
Definition LatLon.cpp:286
std::string mLongitudinalDegree
Definition LatLon.hpp:107
bool IsValidLongitudinalHemisphere(const std::string &aValue) noexcept
Definition LatLon.cpp:345
void SetUtLLPos() noexcept
Definition LatLon.cpp:94
bool IsValidMinuteOrSecond(const std::string &aValue) noexcept
Definition LatLon.cpp:314
const std::string & GetLatDegree() const noexcept
Definition LatLon.cpp:35
std::string mLattitudinalDegree
Definition LatLon.hpp:106
std::string mLatHemisphere
Definition LatLon.hpp:112
bool IsValidLatLonMinutes() noexcept
Definition LatLon.cpp:131
std::string mLonSeconds
Definition LatLon.hpp:111
bool IsValidLatLonSeconds() noexcept
Definition LatLon.cpp:192
const std::string & GetLatHemisphere() const noexcept
Definition LatLon.cpp:65
bool IsValidLattitudinalDegree(const std::string &aValue) noexcept
Definition LatLon.cpp:266
const std::string & GetLonSeconds() const noexcept
Definition LatLon.cpp:50
std::string mLatMinutes
Definition LatLon.hpp:108
UtLLPos mUtLLPos
Definition LatLon.hpp:114
std::string GetFormattedLatLon() const noexcept
Definition LatLon.cpp:80
Template specialization for wsf::comm::Address. Allows usage of Address in std::unordered_map/set.
Definition WsfCommAddress.hpp:185
Definition Acmid.cpp:17
Copyrights Multiple, All Rights Reserved