WSF
WsfEM_ALARM_Terrain.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI//REL TO USA ONLY
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// ****************************************************************************
13// This module was designed by Science Applications International
14// Corporation (SAIC) for the US Air Force, for use in the
15// Advanced Low Altitude Radar Model (ALARM), owned by Wright
16// Labs, Analysis and Evaluation Branch (WL/AAWA-1).
17// ****************************************************************************
18
19#ifndef WSFEM_ALARM_TERRAIN_HPP
20#define WSFEM_ALARM_TERRAIN_HPP
21
22#include <string>
23#include <vector>
24
25class WsfPlatform;
26class WsfEnvironment;
27
28namespace wsf
29{
30class Terrain;
31}
32
34// TODO Remove statics.
36{
37public:
38 static void Initialize(wsf::Terrain& aTerrain);
39
40 static void ResetState();
41
42 static void SetUseAFSIM_TerrainMasking(bool aUse);
43
44 static void AdjustAltitude(WsfPlatform* aPlatformPtr, double aLat, double aLon, double& aAlt);
45
47
48 static int get_nprofile(double ground_range);
49
50 static bool get_terrain_sw() { return terrain_sw; }
51
52 static double get_terrain_height(wsf::Terrain& aTerrain, double lat, double lon, const std::string& units);
53
54 static void profil(wsf::Terrain& aTerrain,
55 WsfEnvironment& aEnvironment,
56 double aztrad,
57 double eltrad,
58 double hammsl,
59 double htmmsl,
60 int nprofl,
61 double rkfact,
62 double sitlam,
63 double sitphi,
64 double tarlam,
65 double tarphi,
66 std::vector<double>& elvmsl,
67 bool& masked,
68 std::vector<double>& tanepp,
69 double& tanmax,
70 std::vector<bool>& visibl,
71 std::vector<double>& xprofl,
72 std::vector<double>& zprofl);
73
74 static void visclt(wsf::Terrain& aTerrain,
75 WsfEnvironment& aEnvironment,
76 double alphac,
77 double hammsl,
78 int nprofile,
79 double rkfact,
80 double sitlam,
81 double sitphi,
82 std::vector<double>& elvmsl,
83 std::vector<int>& iend,
84 std::vector<int>& istart,
85 int& nareas,
86 std::vector<double>& rngter,
87 std::vector<double>& tanepp,
88 std::vector<bool>& visibl,
89 std::vector<double>& xprofl,
90 std::vector<double>& zprofl,
91 std::vector<int>& lcprofl); // added for site-specific land cover
92
93 static void visble2(wsf::Terrain& aTerrain,
94 WsfEnvironment& aEnvironment,
95 double azin,
96 double eltrad,
97 double hammsl,
98 int nprofl,
99 double rkfact,
100 double sitlam,
101 double sitphi,
102 bool quick_flag,
103 bool variable_flag,
104 std::vector<double>& elvmsl,
105 std::vector<double>& tanepp,
106 double& tanmax,
107 std::vector<bool>& visibl,
108 std::vector<double>& xprofl,
109 std::vector<double>& zprofl,
110 std::vector<int>& lcprofl, // added for site-specific land cover
111 bool& masked);
113
115
116 static double get_cell_height_deg(wsf::Terrain& aTerrain, double lat_deg, double lon_deg);
117
118 static double get_ground_range_incr(int level_in = -1);
119
120 static int get_land_cover(WsfEnvironment& aEnvironment, double lat_deg, double lon_deg);
122
123private:
124 static const int min_points_var;
125 static const double deltag;
126 static bool terrain_sw;
127 static bool use_AFSIM_terrain_masking;
128
129 // Moved there to deal with statics
130 static bool initialized;
131 static int aprofile;
132 static double last_rkfact;
133 static double rearth;
134 static std::vector<double> cbetap;
135 static std::vector<double> cosbet;
136 static std::vector<double> sbetap;
137 static std::vector<double> sinbet;
138};
139#endif
Terrain handling code from ALARM (terrrain.f90 and friends).
Definition WsfEM_ALARM_Terrain.hpp:36
static double get_ground_range_incr(int level_in=-1)
Definition WsfEM_ALARM_Terrain.cpp:994
static void visble2(wsf::Terrain &aTerrain, WsfEnvironment &aEnvironment, double azin, double eltrad, double hammsl, int nprofl, double rkfact, double sitlam, double sitphi, bool quick_flag, bool variable_flag, std::vector< double > &elvmsl, std::vector< double > &tanepp, double &tanmax, std::vector< bool > &visibl, std::vector< double > &xprofl, std::vector< double > &zprofl, std::vector< int > &lcprofl, bool &masked)
Definition WsfEM_ALARM_Terrain.cpp:650
static void AdjustAltitude(WsfPlatform *aPlatformPtr, double aLat, double aLon, double &aAlt)
Definition WsfEM_ALARM_Terrain.cpp:92
static int get_nprofile(double ground_range)
Definition WsfEM_ALARM_Terrain.cpp:106
static void ResetState()
Definition WsfEM_ALARM_Terrain.cpp:61
static void profil(wsf::Terrain &aTerrain, WsfEnvironment &aEnvironment, double aztrad, double eltrad, double hammsl, double htmmsl, int nprofl, double rkfact, double sitlam, double sitphi, double tarlam, double tarphi, std::vector< double > &elvmsl, bool &masked, std::vector< double > &tanepp, double &tanmax, std::vector< bool > &visibl, std::vector< double > &xprofl, std::vector< double > &zprofl)
! public
Definition WsfEM_ALARM_Terrain.cpp:284
static void SetUseAFSIM_TerrainMasking(bool aUse)
Definition WsfEM_ALARM_Terrain.cpp:54
static bool get_terrain_sw()
Definition WsfEM_ALARM_Terrain.hpp:50
static int get_land_cover(WsfEnvironment &aEnvironment, double lat_deg, double lon_deg)
Definition WsfEM_ALARM_Terrain.cpp:988
static void Initialize(wsf::Terrain &aTerrain)
Definition WsfEM_ALARM_Terrain.cpp:47
static void visclt(wsf::Terrain &aTerrain, WsfEnvironment &aEnvironment, double alphac, double hammsl, int nprofile, double rkfact, double sitlam, double sitphi, std::vector< double > &elvmsl, std::vector< int > &iend, std::vector< int > &istart, int &nareas, std::vector< double > &rngter, std::vector< double > &tanepp, std::vector< bool > &visibl, std::vector< double > &xprofl, std::vector< double > &zprofl, std::vector< int > &lcprofl)
! public
Definition WsfEM_ALARM_Terrain.cpp:436
static double get_terrain_height(wsf::Terrain &aTerrain, double lat, double lon, const std::string &units)
Definition WsfEM_ALARM_Terrain.cpp:150
static double get_cell_height_deg(wsf::Terrain &aTerrain, double lat_deg, double lon_deg)
Definition WsfEM_ALARM_Terrain.cpp:978
Definition WsfEnvironment.hpp:37
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
Definition WsfTerrain.hpp:336
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Copyrights Multiple, All Rights Reserved