WSF
MapPlotVariable.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 The Boeing 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 MAPPLOTVARIABLE_HPP
13#define MAPPLOTVARIABLE_HPP
14
15class WsfSensor;
16class WsfSensorResult;
17class WsfSimulation;
18class UtInput;
20
27{
28public:
29 MapPlotVariable(double aInitValue)
30 : mInitValue(aInitValue)
31 {
32 }
33 virtual ~MapPlotVariable() = default;
34
36 {
37 public:
39 void SetCrossRange(double aCrossRange) { mCrossRange = aCrossRange; }
40
42 void SetDownRange(double aDownRange) { mDownRange = aDownRange; }
43
45 void SetRangeScale(double aRangeScale) { mRangeScale = aRangeScale; }
46
48 double GetCrossRange() const { return mCrossRange; }
49
51 double GetDownRange() const { return mDownRange; }
52
54 double GetRangeScale() const { return mRangeScale; }
55
56 private:
57 double mCrossRange{0.0};
58 double mDownRange{0.0};
59 double mRangeScale{1.0};
60 };
61
65 double GetInitialValue() const { return mInitValue; };
66
72 virtual bool ProcessInput(UtInput& aInput) { return false; }
73
79 virtual bool Initialize(WsfSimulation& aSimulation, const SharedData& aSharedData)
80 {
81 mSharedDataPtr = &aSharedData;
82 return true;
83 }
84
93 virtual double Evaluate(double aSimTime,
94 WsfSimulation* aSimulationPtr,
95 double aValue,
96 WsfSensor* aSensorPtr,
97 WsfSensorResult& aResult) const = 0;
98
99protected:
100 const SharedData* mSharedDataPtr{nullptr};
101
102private:
103 const double mInitValue{0.0};
104};
105
106#endif
Definition MapPlotVariable.hpp:36
double GetDownRange() const
Get accessor for private member data mDownRange.
Definition MapPlotVariable.hpp:51
double GetCrossRange() const
Get accessor for private member data mCrossRange.
Definition MapPlotVariable.hpp:48
void SetRangeScale(double aRangeScale)
Set accessor for private member data mRangeScale.
Definition MapPlotVariable.hpp:45
void SetDownRange(double aDownRange)
Set accessor for private member data mDownRange.
Definition MapPlotVariable.hpp:42
void SetCrossRange(double aCrossRange)
Set accessor for private member data mCrossRange.
Definition MapPlotVariable.hpp:39
double GetRangeScale() const
Get accessor for private member data mRangeScale.
Definition MapPlotVariable.hpp:54
double GetInitialValue() const
Definition MapPlotVariable.hpp:65
const SharedData * mSharedDataPtr
Definition MapPlotVariable.hpp:100
virtual bool ProcessInput(UtInput &aInput)
Definition MapPlotVariable.hpp:72
virtual ~MapPlotVariable()=default
virtual bool Initialize(WsfSimulation &aSimulation, const SharedData &aSharedData)
Definition MapPlotVariable.hpp:79
MapPlotVariable(double aInitValue)
Definition MapPlotVariable.hpp:29
virtual double Evaluate(double aSimTime, WsfSimulation *aSimulationPtr, double aValue, WsfSensor *aSensorPtr, WsfSensorResult &aResult) const =0
Definition MapPlotVariables.hpp:34
Definition WsfSensorResult.hpp:27
Definition WsfSensor.hpp:92
The main controller for a simulation.
Definition WsfSimulation.hpp:109
Copyrights Multiple, All Rights Reserved