VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
weatherLocalNetInterface.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
17 #include <vlutil/vlString.h>
18 #include <vlutil/vlList.h>
19 #include <vl/globalObjectDesignator.h>
22 #include <vlpi/metocEnums.h>
23 
25 class DtTroposphereLayerPublisher;
26 class DtSurface;
27 class DtObjectType;
28 
29 class DtTroposphereLayerPublisher;
30 class DtSubsurfaceLayerPublisher;
31 class DtLandSurfacePublisher;
32 class DtWaterSurfacePublisher;
33 class DtServicePublisher;
34 class DtWeatherStateRepository;
35 class DtEnvironmentConditionStateRepository;
36 
44 
45 
46 namespace makVrf
47 {
48  class DtTroposphereStateComponent;
49  class DtLandSurfaceStateComponent;
50  class DtWaterSurfaceStateComponent;
51  class DtSubsurfaceStateComponent;
52 
54  {
59 
60  bool allComponentsValid() const;
61  bool isModified() const;
62  };
63 
68  public DtLocalExtendedPropertiesNetInterface<DtSimLocalControlObjectNetInterface, DtWeatherObjectRepository>
69  {
70  private:
74  const DtWeatherLocalNetInterface & operator=(const
76 
77  public:
78 
80  DtWeatherLocalNetInterface(DtStateData* vrfObject, DtVrlinkNetworkInterface*, bool publishObject = true);
81 
83  virtual ~DtWeatherLocalNetInterface();
84 
85  virtual bool init(const DtEntityIdentifier& id = DtEntityIdentifier::nullId());
86 
88  virtual void updatePublisher();
89 
91  virtual DtString type() const;
92 
93  static DtSimObjectNetInterface* creator(
94  DtStateData* vrfObject, DtVrlinkNetworkInterface*, bool publishObject);
95 
96  virtual void destroyPublisher();
97 
98  protected:
100  virtual DtEnvironmentProcessRepository* epsr() const;
101 
103  virtual void setupRecords();
104 
105  virtual void updateGeometryRecord();
106  virtual void updateWindLayers();
107 
108  virtual DtVrfExtControlObjectPublisher* _createVrfExtPublisher() override;
109 
111  virtual void setupMetocPublisher();
112 
113  virtual void metocTick();
114 
116  virtual void updateMetocPublishers();
117 
119  virtual void updateMetocLandSurfacePublishers(const DtWeatherStateComponents&);
120 
122  virtual void updateMetocSubsurfacePublishers(const DtWeatherStateComponents&);
123 
125  virtual void updateMetocWaterSurfacePublishers(const DtWeatherStateComponents&);
126 
128  virtual void updateMetocTropospherePublishers(const DtWeatherStateComponents&);
129 
131  virtual void updateCommonMetocWeatherRepository(const DtWeatherStateComponents&, DtWeatherStateRepository* repo);
132 
134  virtual void updateMetocGeoreference(const DtWeatherStateComponents&, DtEnvironmentConditionStateRepository* repo);
135  public:
138 
139  virtual std::vector<unsigned> mapCloudStateToLayerAltitudes(DtVrfWeatherCloudState cloudState) const;
140  virtual DtCloudTypeEnum32 mapVrvCloudTypeToMetocCloudType(int) const;
141  virtual DtCloudTypeEnum32 mapCloudStateToCloudType(DtVrfWeatherCloudState cloudState, unsigned altitude) const;
142  virtual float mapCloudStateToCloudCoverage(DtVrfWeatherCloudState cloudState, unsigned altitude) const;
143  virtual float mapCloudStateToCloudDensity(DtVrfWeatherCloudState cloudState, unsigned altitude) const;
144 
145  virtual DtPrecipitationTypeEnum32 mapVrfPrecipitationtypeToMetocPrecipitationType(int vrfPrecipitationType) const;
146 
147  virtual DtHazeTypeEnum32 mapFogColorToHazeType(const DtVector& fogColor);
148  virtual DtHazeTypeEnum32 mapObscurantToHazeType(int obscurant);
149 
150  static float mapSwellStateToSwellHeight(int state);
151  static float mapSwellStateToSwellLength(int state);
152  static int mapSwellStateToSwellPeriod(int state);
153 
154  static float mapSeaStateToWaveHeight(int state);
155  static float mapSeaStateToWaveLength(int state);
156  static int mapSeaStateToWavePeriod(int state);
157  virtual DtGeoLocationTypeEnum32 mapEntityTypeToGeoLocationType(const DtObjectType& type);
159  protected:
160  virtual DtSubsurfaceLayerPublisher* createAndInitMetocSubsurfacePublisher() const;
161  virtual DtLandSurfacePublisher* createAndInitMetocLandSurfacePublisher() const;
162  virtual DtWaterSurfacePublisher* createAndInitMetocWaterSurfacePublisher() const;
163  virtual DtTroposphereLayerPublisher* createAndInitMetocTropospherePublisher() const;
164  virtual void initializeMetocStateRep(DtEnvironmentConditionStateRepository* sr) const;
165 
166 
167  virtual void onTick() override;
168 
169  protected:
170  DtLandSurfacePublisher* myMetocSurfacePublisher;
171  DtWaterSurfacePublisher* myMetocWaterPublisher;
172  std::vector<DtTroposphereLayerPublisher*> myMetocTropospherePublishers;
173  std::vector<DtSubsurfaceLayerPublisher*> myMetocSubsurfacePublishers;
174 
176  DtGeoLocationTypeEnum32 myMetocGeoLocationType;
177  static DtObjectType theAreaType;
178  static DtObjectType theBoxType;
179  static DtObjectType theCircleType;
180  };
181 }
bool mySetMetocGeoreference
Definition: weatherLocalNetInterface.h:175
Contains the DtSimEnvironmentalModelType class declaration.
static DtObjectType theBoxType
Definition: weatherLocalNetInterface.h:178
DtWaterSurfacePublisher * myMetocWaterPublisher
Definition: weatherLocalNetInterface.h:171
Local network interface for weather state objects. These objects must have a DtWeatherStateRepository...
Definition: weatherLocalNetInterface.h:67
std::vector< DtSubsurfaceLayerPublisher * > myMetocSubsurfacePublishers
Definition: weatherLocalNetInterface.h:173
Contains the DtWeatherObjectRepository class declaration.
Definition: surface.h:181
static DtObjectType theCircleType
Definition: weatherLocalNetInterface.h:179
const DtSubsurfaceStateComponent * subsurfaceStateComp
Definition: weatherLocalNetInterface.h:58
1) Define the interface class that will be used to represent the next and current frames...
Definition: waterSurfaceStateComponent.h:76
const DtLandSurfaceStateComponent * landSurfaceStateComp
Definition: weatherLocalNetInterface.h:56
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:339
Extends an existing local net interface class to give it the ability to publish extended properties...
Definition: localExtendedPropertiesNetInterface.h:39
Class Description: DtSimObjectNetInterface.
Definition: simObjectNetInterface.h:50
static DtObjectType theAreaType
Definition: weatherLocalNetInterface.h:177
1) Define the interface class that will be used to represent the next and current frames...
Definition: subsurfaceStateComponent.h:103
This class extends DtVrfControlObjectPublisher to support the publishing of VR-Forces state propertie...
Definition: vrfExtControlObjectPublisher.h:16
DtVrfWeatherCloudState
Definition: vrfWeatherStateEnums.h:24
DtLandSurfacePublisher * myMetocSurfacePublisher
Definition: weatherLocalNetInterface.h:170
DtGeoLocationTypeEnum32 myMetocGeoLocationType
Definition: weatherLocalNetInterface.h:176
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
1) Define the interface class that will be used to represent the next and current frames...
Definition: landSurfaceStateComponent.h:86
std::vector< DtTroposphereLayerPublisher * > myMetocTropospherePublishers
Definition: weatherLocalNetInterface.h:172
Definition: weatherLocalNetInterface.h:53
const DtWaterSurfaceStateComponent * waterSurfaceStateComp
Definition: weatherLocalNetInterface.h:57
1) Define the interface class that will be used to represent the next and current frames...
Definition: troposphereStateComponent.h:46
const DtTroposphereStateComponent * troposphereStateComp
Definition: weatherLocalNetInterface.h:55

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)