WSF
WsfCoverageDistanceSteppedGrid.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 2020 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 WSFCOVERAGEDISTANCESTEPPEDGRID_HPP
13#define WSFCOVERAGEDISTANCESTEPPEDGRID_HPP
14
15#include "wsf_coverage_export.h"
16
18
19namespace wsf
20{
21namespace coverage
22{
23
25class WSF_COVERAGE_EXPORT DistanceSteppedGrid : public RectangularGrid
26{
27public:
28 explicit DistanceSteppedGrid(const WsfScenario& aScenario)
29 : RectangularGrid(aScenario)
30 {
31 }
32 DistanceSteppedGrid(const DistanceSteppedGrid& aOther) = default;
33 ~DistanceSteppedGrid() override = default;
34
35 DistanceSteppedGrid* Clone() const override { return new DistanceSteppedGrid{*this}; }
36 bool ProcessInput(UtInput& aInput) override;
37
39 double GetLatStepDistance() const { return mLatStepDistance; }
40
42 double GetLonStepDistance() const { return mLonStepDistance; }
43
45 int GetNumLatSteps() const { return mNumLatSteps; }
46
48 int GetNumLonSteps() const { return mNumLonSteps; }
49
51 int GetLatOriginIndex() const { return mLatOriginIndex; }
52
54 int GetLonOriginIndex() const { return mLonOriginIndex; }
55
56 constexpr static const char* cTYPE{"WSF_DISTANCE_STEPPED_GRID"};
57
58protected:
59 bool InitializeP() override;
60
61private:
62 double TakeLatitudeStep(double aLatitude, bool aForward) const;
63 double TakeLongitudeStep(double aLongitude, double aLatitude, bool aForward) const;
64 std::vector<double> GetLatitudeLoopValues() const override;
65 std::vector<double> GetLongitudeLoopValues(double aLatitudeDeg) const override;
66
67 double mLatStepDistance{-1.0};
68 double mLonStepDistance{-1.0};
69 int mNumLatSteps{-1};
70 int mNumLonSteps{-1};
71 int mLatOriginIndex{0};
72 int mLonOriginIndex{0};
73};
74
75} // namespace coverage
76} // namespace wsf
77
78#endif // WSFCOVERAGEDISTANCESTEPPEDGRID_HPP
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
int GetLatOriginIndex() const
Return the index in the grid of the origin in the N-S direction.
Definition WsfCoverageDistanceSteppedGrid.hpp:51
int GetLonOriginIndex() const
Return the index in the grid of the origin in the E-W direction.
Definition WsfCoverageDistanceSteppedGrid.hpp:54
DistanceSteppedGrid * Clone() const override
Definition WsfCoverageDistanceSteppedGrid.hpp:35
double GetLonStepDistance() const
Return the distance in meters between adjacent grid points in the E-W direction.
Definition WsfCoverageDistanceSteppedGrid.hpp:42
DistanceSteppedGrid(const WsfScenario &aScenario)
Definition WsfCoverageDistanceSteppedGrid.hpp:28
int GetNumLatSteps() const
Return the number of grid points in the N-S direction.
Definition WsfCoverageDistanceSteppedGrid.hpp:45
double GetLatStepDistance() const
Return the distance in meters between adjacent grid points in the N-S direction.
Definition WsfCoverageDistanceSteppedGrid.hpp:39
DistanceSteppedGrid(const DistanceSteppedGrid &aOther)=default
~DistanceSteppedGrid() override=default
int GetNumLonSteps() const
Return the number of grid points in the E-W direction.
Definition WsfCoverageDistanceSteppedGrid.hpp:48
static constexpr const char * cTYPE
Definition WsfCoverageDistanceSteppedGrid.hpp:56
RectangularGrid(const WsfScenario &aScenario)
Definition WsfCoverageRectangularGrid.hpp:32
Definition WsfCoverage.cpp:35
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Copyrights Multiple, All Rights Reserved