WSF
ClutterTableFunction.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 2003-2015 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 CLUTTERTABLEFUNCTION_HPP
13#define CLUTTERTABLEFUNCTION_HPP
14
15#include <string>
16#include <vector>
17
18#include "Function.hpp"
19#include "Sensor.hpp"
20#include "Target.hpp"
21
23{
24public:
25 explicit ClutterTableFunction(WsfScenario& aScenario);
26
27 bool Execute(WsfSimulation& aSimulation) override;
28 bool ProcessInput(UtInput& aInput) override;
29
30 class Point
31 {
32 public:
34 : range(0.0)
35 , bearing(0.0)
36 , clutter(0.0)
37 {
38 }
39 bool operator<(const Point& aRHS) const { return range < aRHS.range; }
40 double range;
41 double bearing;
42 double clutter;
43 };
44
46 {
47 public:
49 : altitude(0.0)
50 , data()
51 {
52 }
53 bool operator<(const PointArray& aRHS) const { return altitude < aRHS.altitude; }
54 double altitude;
55 std::vector<Point> data;
56 };
57
58 typedef std::vector<PointArray> Envelope;
59
61 double Altitude(Envelope& aEnvelope, size_t aAltIndex) const { return aEnvelope[aAltIndex].altitude; }
62
64 double GroundRange(Envelope& aEnvelope, size_t aAltIndex, size_t aRangeIndex) const
65 {
66 return mEnvelope[aAltIndex].data[aRangeIndex].range;
67 }
68
69protected:
70 void PrintCluttertable(Envelope& aEnvelope);
71
72private:
73 void ProcessRangeBearingInput(UtInput& aInput, const std::string& aBlockTerminator, PointArray& aRanges);
74
75 WsfSimulation* mSimulationPtr;
76 Envelope mEnvelope;
77 Sensor mSensor;
78 Target mTarget;
79
80 double mSensorPlatformYaw;
81 double mSensorPlatformPitch;
82 double mSensorPlatformRoll;
83 double mSensorPlatformLat;
84 double mSensorPlatformLon;
85 double mSensorPlatformAlt;
86 bool mSensorPlatformAltSet;
87 std::string mOutputObjectName;
88 std::string mOutputFileName;
89 std::string mAltUnitsStr;
90 std::string mBearingUnitsStr;
91 double mAltUnitsScale;
92 std::string mRangeUnitsStr;
93 double mRangeUnitsScale;
94 double mBearingUnitsScale;
95 std::vector<double> mBearings;
96};
97
98#endif
Definition ClutterTableFunction.hpp:46
double altitude
Definition ClutterTableFunction.hpp:54
PointArray()
Definition ClutterTableFunction.hpp:48
std::vector< Point > data
Definition ClutterTableFunction.hpp:55
bool operator<(const PointArray &aRHS) const
Definition ClutterTableFunction.hpp:53
double bearing
Definition ClutterTableFunction.hpp:41
double range
Definition ClutterTableFunction.hpp:40
double clutter
Definition ClutterTableFunction.hpp:42
bool operator<(const Point &aRHS) const
Definition ClutterTableFunction.hpp:39
Point()
Definition ClutterTableFunction.hpp:33
double Altitude(Envelope &aEnvelope, size_t aAltIndex) const
return the altitude at an index within the envelope
Definition ClutterTableFunction.hpp:61
ClutterTableFunction(WsfScenario &aScenario)
Definition ClutterTableFunction.cpp:32
bool ProcessInput(UtInput &aInput) override
Definition ClutterTableFunction.cpp:156
double GroundRange(Envelope &aEnvelope, size_t aAltIndex, size_t aRangeIndex) const
return the range at an altitude/range index within the envelope
Definition ClutterTableFunction.hpp:64
void PrintCluttertable(Envelope &aEnvelope)
bool Execute(WsfSimulation &aSimulation) override
Definition ClutterTableFunction.cpp:57
std::vector< PointArray > Envelope
Definition ClutterTableFunction.hpp:58
Function(const Function &)=default
Definition Sensor.hpp:30
Definition Target.hpp:27
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
The main controller for a simulation.
Definition WsfSimulation.hpp:109
Copyrights Multiple, All Rights Reserved