VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
weatherStateComponent.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
11 #include <matrix/vlVector.h>
12 #include <vrfutil/rwWindLevels.h>
13 #include <vrfOM/sets/writeWeatherStateRepository.hpp>
14 #include <vrfOM/sets/readWeatherStateRepository.hpp>
15 #include <vrfOM/sets/readThermoclineLayerRepository.hpp>
16 
17 namespace makVrf
18 {
22  {
23  public:
25 
26 
29  : DtFrameStateInterface(storage)
30  , myWindLevels("wind-levels")
31  {
32  }
33 
36  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, ambientAirTemperature, AmbientAirTemperature)
37  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, ambientAirPressure, AmbientAirPressure)
39  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, precipitationIntensity, PrecipitationIntensity)
40  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(DtVrfWeatherPrecipitationType, precipitationType, PrecipitationType)
41  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(int, priority, Priority)
42  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, underwaterVisibility, UnderwaterVisibility)
43  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, surfaceTransparency, SurfaceTransparency)
44  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, waterCurrentSpeed, WaterCurrentSpeed)
45  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, waterCurrentDirection, WaterCurrentDirection)
46  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, ambientWaterTemperature, AmbientWaterTemperature)
47  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, snowAccumulation, SnowAccumulation)
48  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, rainAccumulation, RainAccumulation)
49  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, snowMinimumAltitude, SnowMinimumAltitude)
50  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, snowRoadAccumulation, SnowRoadAccumulation)
51  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, tidalOffset, TidalOffset)
52  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(int, swellState, SwellState)
53  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, swellStateDirection, SwellStateDirection)
54  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(int, seaState, SeaState)
55  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, seaStateDirection, SeaStateDirection)
56  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(bool, windDrivenSeaStateEnabled, WindDrivenSeaStateEnabled)
57  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, choppiness, Choppiness)
58  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, surgeDepth, SurgeDepth)
59  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, fogHeight, FogHeight)
60  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(unsigned int, flags, Flags)
61  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(bool, lightningPresent, LightningPresent)
62  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(DtVector, fogColor, FogColor)
63  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, airTemperatureAltitude, AirTemperatureAltitude)
64  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, airPressureAltitude, AirPressureAltitude)
65  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(bool, airTemperatureAltitudeIsSeaLevel, AirTemperatureAltitudeIsSeaLevel)
66  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(bool, airPressureAltitudeIsSeaLevel, AirPressureAltitudeIsSeaLevel)
67  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, seaLevelWaterConcentration, SeaLevelWaterConcentration)
68  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, thermoclineLayer1Depth, ThermoclineLayer1Depth)
69  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, thermoclineLayer1Permeability, ThermoclineLayer1Permeability)
70  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, thermoclineLayer2Depth, ThermoclineLayer2Depth)
71  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, thermoclineLayer2Permeability, ThermoclineLayer2Permeability)
72  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, thermoclineLayer3Depth, ThermoclineLayer3Depth)
73  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, thermoclineLayer3Permeability, ThermoclineLayer3Permeability)
74  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, thermoclineLayer4Depth, ThermoclineLayer4Depth)
75  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, thermoclineLayer4Permeability, ThermoclineLayer4Permeability)
76  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, thermoclineLayer5Depth, ThermoclineLayer5Depth)
77  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, thermoclineLayer5Permeability, ThermoclineLayer5Permeability)
79 
82 
85  virtual const double visibility(double atAlt = 0.) const { throw DtUnimplementedMethod("visibility(atAltidude) is not implemented by this class."); };
86  virtual void setVisibility(const double&) { throw DtUnimplementedMethod("setVisibility(double) is not implemented by this class."); };
87  virtual void setVisibility(const double& atAlt, const double&) { throw DtUnimplementedMethod("setVisibility(const double& atAlt, const double& vis) is not implemented by this class."); };
88 
92  virtual const double windSpeed(double atAlt = 0.) const { throw DtUnimplementedMethod("windSpeed(atAltidude) is not implemented by this class."); };
94  virtual void setWindSpeed(const double&) { throw DtUnimplementedMethod("setWindSpeed(double) is not implemented by this class."); };
97  virtual void setWindSpeed(const double& atAlt, const double&) { throw DtUnimplementedMethod("setWindSpeed(const double& atAlt, const double& vis) is not implemented by this class."); };
98 
102  virtual const double windDirection(double atAlt = 0.) const { throw DtUnimplementedMethod("windDirection(atAltidude) is not implemented by this class."); };
104  virtual void setWindDirection(const double&) { throw DtUnimplementedMethod("setWindDirection(double) is not implemented by this class."); };
107  virtual void setWindDirection(const double& atAlt, const double&) { throw DtUnimplementedMethod("setWindDirection(const double& atAlt, const double& vis) is not implemented by this class."); };
108 
112  virtual const int obscurant(double atAlt = 0.) const { throw DtUnimplementedMethod("obscurant(atAltidude) is not implemented by this class."); };
115  virtual void setObscurant(double atAlt, const int&) { throw DtUnimplementedMethod("setObscurant(double, int) is not implemented by this class."); };
116 
126  virtual void addWindLevel(double altitude, double windSpeed, double windDirection,
127  double visibleDistance, int obscurant, int cloudType, double cloudDensity, double skyCoverage) { throw DtUnimplementedMethod("addWindLevel is not implemented by this class."); };
129  virtual void clearWindLevels() { throw DtUnimplementedMethod("clearWindLevels is not implemented by this class."); };
130 
132  virtual void removeWindLevel(double baseAltitude) { throw DtUnimplementedMethod("removeWindLevel is not implemented by this class."); };
133 
135  virtual bool windSpeedAndDirectionAtAltitude(double altMSL, double& windSpeed, double& windDirection) const { throw DtUnimplementedMethod("windSpeedAndDirectionAtAltitude is not implemented by this class."); };
136  virtual void setWindSpeedAndDirectionAtAltitude(const double& altMSL, const double& windSpeed, const double& windDirection) { throw DtUnimplementedMethod("setWindSpeedAndDirectionAtAltitude is not implemented by this class."); };
137 
139  virtual bool visibilityAndObscurantAtAltitude(double altMSL, double& distance, int& obs) const { throw DtUnimplementedMethod("visibilityAndObscurantAtAltitude is not implemented by this class."); };
140  virtual void setVisibilityAndObscurantAtAltitude(const double& altMSL, const double& distance, const int& obs) { throw DtUnimplementedMethod("setVisibilityAndObscurantAtAltitude is not implemented by this class."); };
141 
142  virtual void setWindLevels(const DtRwWindLevels&){ throw DtUnimplementedMethod("setWindLevels is not implemented by this class."); };
143  virtual const DtRwWindLevels& windLevels() const { throw DtUnimplementedMethod("windLevels is not implemented by this class."); };
145 
146  protected:
148  DtRwWindLevels myWindLevels;
149  };
150 
153  {
154  public:
158 
160 
161  virtual const double ambientAirTemperature() const override;
162  virtual void setAmbientAirTemperature(const double&) override;
163 
164  virtual const double ambientAirPressure() const override;
165  virtual void setAmbientAirPressure(const double&) override;
166 
167  virtual const DtVrfWeatherCloudState cloudState() const override;
168  virtual void setCloudState(const DtVrfWeatherCloudState&) override;
169 
170  virtual const double precipitationIntensity() const override;
171  virtual void setPrecipitationIntensity(const double&) override;
172 
173  virtual const DtVrfWeatherPrecipitationType precipitationType() const override;
174  virtual void setPrecipitationType(const DtVrfWeatherPrecipitationType&) override;
175 
176  virtual const double windSpeed(double atAlt = 0.) const override;
177  virtual void setWindSpeed(const double&) override;
178  virtual void setWindSpeed(const double& atAlt, const double&) override;
179 
180  virtual const double windDirection(double atAlt = 0.) const override;
181  virtual void setWindDirection(const double&) override;
182  virtual void setWindDirection(const double& atAlt, const double&) override;
183 
184  virtual const int priority() const override;
185  virtual void setPriority(const int&) override;
186 
187  virtual const double visibility(double atAltitude) const override;
188  virtual void setVisibility(const double&) override;
189  virtual void setVisibility(const double&, const double&) override;
190 
191  virtual const int obscurant(double atAltitude) const override;
192  virtual void setObscurant(double baseAlt, const int&) override;
193 
194  virtual const double underwaterVisibility() const override;
195  virtual void setUnderwaterVisibility(const double&) override;
196 
197  virtual const double surfaceTransparency() const override;
198  virtual void setSurfaceTransparency(const double&) override;
199 
200  virtual const double waterCurrentSpeed() const override;
201  virtual void setWaterCurrentSpeed(const double&) override;
202 
203  virtual const double waterCurrentDirection() const override;
204  virtual void setWaterCurrentDirection(const double&) override;
205 
206  virtual const double ambientWaterTemperature() const override;
207  virtual void setAmbientWaterTemperature(const double&) override;
208 
209  virtual const double snowAccumulation() const override;
210  virtual void setSnowAccumulation(const double&) override;
211 
212  virtual const double rainAccumulation() const override;
213  virtual void setRainAccumulation(const double&) override;
214 
215  virtual const double snowMinimumAltitude() const override;
216  virtual void setSnowMinimumAltitude(const double&) override;
217 
218  virtual const double snowRoadAccumulation() const override;
219  virtual void setSnowRoadAccumulation(const double&) override;
220 
221  virtual const double tidalOffset() const override;
222  virtual void setTidalOffset(const double&) override;
223 
224  virtual const int swellState() const override;
225  virtual void setSwellState(const int&) override;
226 
227  virtual const double swellStateDirection() const override;
228  virtual void setSwellStateDirection(const double&) override;
229 
230  virtual const int seaState() const override;
231  virtual void setSeaState(const int&) override;
232 
233  virtual const double seaStateDirection() const override;
234  virtual void setSeaStateDirection(const double&) override;
235 
236  virtual const bool windDrivenSeaStateEnabled() const override;
237  virtual void setWindDrivenSeaStateEnabled(const bool&) override;
238 
239  virtual const double choppiness() const override;
240  virtual void setChoppiness(const double&) override;
241 
242  virtual const double surgeDepth() const override;
243  virtual void setSurgeDepth(const double&) override;
244 
245  virtual const double fogHeight() const override;
246  virtual void setFogHeight(const double&) override;
247 
248  virtual const unsigned int flags() const override;
249  virtual void setFlags(const unsigned int&) override;
250 
251  virtual const bool lightningPresent() const override;
252  virtual void setLightningPresent(const bool&) override;
253 
254  virtual const DtVector fogColor() const override;
255  virtual void setFogColor(const DtVector&) override;
256 
257  virtual const double thermoclineLayer1Depth() const override;
258  virtual void setThermoclineLayer1Depth(const double&) override;
259 
260  virtual const double thermoclineLayer1Permeability() const override;
261  virtual void setThermoclineLayer1Permeability(const double&) override;
262 
263  virtual const double thermoclineLayer2Depth() const override;
264  virtual void setThermoclineLayer2Depth(const double&) override;
265 
266  virtual const double thermoclineLayer2Permeability() const override;
267  virtual void setThermoclineLayer2Permeability(const double&) override;
268 
269  virtual const double thermoclineLayer3Depth() const override;
270  virtual void setThermoclineLayer3Depth(const double&) override;
271 
272  virtual const double thermoclineLayer3Permeability() const override;
273  virtual void setThermoclineLayer3Permeability(const double&) override;
274 
275  virtual const double thermoclineLayer4Depth() const override;
276  virtual void setThermoclineLayer4Depth(const double&) override;
277 
278  virtual const double thermoclineLayer4Permeability() const override;
279  virtual void setThermoclineLayer4Permeability(const double&) override;
280 
281  virtual const double thermoclineLayer5Depth() const override;
282  virtual void setThermoclineLayer5Depth(const double&) override;
283 
284  virtual const double thermoclineLayer5Permeability() const override;
285  virtual void setThermoclineLayer5Permeability(const double&) override;
286 
287  virtual const double airTemperatureAltitude() const override;
288  virtual void setAirTemperatureAltitude(const double&) override;
289 
290  virtual const double airPressureAltitude() const override;
291  virtual void setAirPressureAltitude(const double&) override;
292 
293  virtual const bool airTemperatureAltitudeIsSeaLevel() const override;
294  virtual void setAirTemperatureAltitudeIsSeaLevel(const bool&) override;
295 
296  virtual const bool airPressureAltitudeIsSeaLevel() const override;
297  virtual void setAirPressureAltitudeIsSeaLevel(const bool&) override;
298 
299  virtual const double seaLevelWaterConcentration() const override;
300  virtual void setSeaLevelWaterConcentration(const double&) override;
301 
304 
307  virtual void addWindLevel(double altitude, double windSpeed, double windDirection, double visibleDistance, int obscurant, int cloudType, double cloudDensity, double skyCoverage) override;
308  virtual void clearWindLevels() override;
309 
311  virtual void removeWindLevel(double baseAltitude) override;
312 
314  virtual bool windSpeedAndDirectionAtAltitude(double altMSL, double& windSpeed, double& windDirection) const override;
315  virtual void setWindSpeedAndDirectionAtAltitude(const double& altMSL, const double& windSpeed, const double& windDirection) override;
316 
318  virtual bool visibilityAndObscurantAtAltitude(double altMSL, double& distance, int& obs) const override;
319  virtual void setVisibilityAndObscurantAtAltitude(const double& altMSL, const double& distance, const int& obs) override;
320 
321  virtual void setWindLevels(const DtRwWindLevels&) override;
322  virtual const DtRwWindLevels& windLevels() const override;
324 
326  virtual void makeWritable() override;
327 
329  virtual void makeReadOnly() override;
330 
331  protected:
335  VRF::WriteThermoclineLayerRepository thermoclineLayer(int) const;
336 
341  VRF::WriteThermoclineLayerRepository getOrCreateThermoclineLayer(int);
342 
343  protected:
345  virtual void setupWindLevels();
346 
347  protected:
349  VRF::WriteWeatherStateRepository myWriteWeatherStateRepository;
350  };
351 
354  {
355  public:
359  virtual ~DtWeatherStateComponentCurrentFrame() override;
360 
362  virtual const double ambientAirTemperature() const override;
363  virtual const double ambientAirPressure() const override;
364  virtual const DtVrfWeatherCloudState cloudState() const override;
365  virtual const double precipitationIntensity() const override;
366  virtual const DtVrfWeatherPrecipitationType precipitationType() const override;
367  virtual const double windSpeed(double atAlt = 0.) const override;
368  virtual const double windDirection(double atAlt = 0.) const override;
369  virtual const int priority() const override;
370  virtual const double visibility(double atAltitude = 0.) const override;
371  virtual const int obscurant(double atAltitude) const override;
372  virtual const double underwaterVisibility() const override;
373  virtual const double surfaceTransparency() const override;
374  virtual const double waterCurrentSpeed() const override;
375  virtual const double waterCurrentDirection() const override;
376  virtual const double ambientWaterTemperature() const override;
377  virtual const double snowAccumulation() const override;
378  virtual const double rainAccumulation() const override;
379  virtual const double snowMinimumAltitude() const override;
380  virtual const double snowRoadAccumulation() const override;
381  virtual const double tidalOffset() const override;
382  virtual const int swellState() const override;
383  virtual const double swellStateDirection() const override;
384  virtual const int seaState() const override;
385  virtual const double seaStateDirection() const override;
386  virtual const bool windDrivenSeaStateEnabled() const override;
387  virtual const double choppiness() const override;
388  virtual const double surgeDepth() const override;
389  virtual const double fogHeight() const override;
390  virtual const DtVector fogColor() const override;
391  virtual const unsigned int flags() const override;
392  virtual const bool lightningPresent() const override;
393  virtual const double thermoclineLayer1Depth() const override;
394  virtual const double thermoclineLayer1Permeability() const override;
395  virtual const double thermoclineLayer2Depth() const override;
396  virtual const double thermoclineLayer2Permeability() const override;
397  virtual const double thermoclineLayer3Depth() const override;
398  virtual const double thermoclineLayer3Permeability() const override;
399  virtual const double thermoclineLayer4Depth() const override;
400  virtual const double thermoclineLayer4Permeability() const override;
401  virtual const double thermoclineLayer5Depth() const override;
402  virtual const double thermoclineLayer5Permeability() const override;
403  virtual const double airTemperatureAltitude() const override;
404  virtual const double airPressureAltitude() const override;
405  virtual const bool airTemperatureAltitudeIsSeaLevel() const override;
406  virtual const bool airPressureAltitudeIsSeaLevel() const override;
407  virtual const double seaLevelWaterConcentration() const override;
408 
410  virtual bool windSpeedAndDirectionAtAltitude(double altMSL, double& windSpeed, double& windDirection) const override;
411 
413  virtual bool visibilityAndObscurantAtAltitude(double altMSL, double& distance, int& obs) const override;
414 
415  virtual const DtRwWindLevels& windLevels() const override;
416 
418  bool readComponentValid() const;
421  bool findReadComponent();
422 
423  protected:
427  VRF::ReadThermoclineLayerRepository thermoclineLayer(int) const;
428 
429  protected:
432  virtual void updateWindLevels();
433 
437  {
438  myWindLevels = data.windLevels();
439  }
440 
441  protected:
443  VRF::ReadWeatherStateRepository myReadWeatherStateRepository;
445  unsigned int myCallbackHandle;
446  };
447 
451  {
452  public:
456 
458  bool isDoubleBuffered() { return true; };
460  virtual const DtFrameStateInterface* currentFrameState() const override { return &myCurrentFrameState; }
462  virtual DtFrameStateInterface* nextFrameState() override { return &myNextFrameState; };
464  virtual const DtFrameStateInterface* nextFrameState() const override { return &myNextFrameState; };
465 
468  virtual void updateDataStorage() override
469  {
470  if (!myFoundComponent)
471  {
472  myFoundComponent = myCurrentFrameState.findReadComponent();
473  }
474 
475  if (myNextFrameState.isWritable())
476  {
477  myNextFrameState.advancedFrame();
478  myCurrentFrameState.advanceFrame(myNextFrameState);
479  }
480 
481  myCurrentFrameState.emitComponentUpdated();
482  }
483 
486  virtual void updateStateData(DtStateData* sd) override
487  {
488  myCurrentFrameState.updateStateData(sd);
489  myNextFrameState.updateStateData(sd);
490  }
491 
493  virtual void aboutToBeDeleted() override
494  {
496  myCurrentFrameState.aboutToBeDeleted();
497  myNextFrameState.aboutToBeDeleted();
498  }
499 
502  virtual bool forceAdvance() override;
503 
505  virtual void firstFrameAdvance() override;
506 
507  protected:
514  };
515 
520 }
DtVrfWeatherPrecipitationType
Definition: vrfWeatherStateEnums.h:13
virtual void addWindLevel(double altitude, double windSpeed, double windDirection, double visibleDistance, int obscurant, int cloudType, double cloudDensity, double skyCoverage)
Adds or replaces a wind level entry at the given altitude.
Definition: weatherStateComponent.h:126
Exception thrown when a required method has not been implemented.
Definition: stateDataTypes.h:30
virtual const int obscurant(double atAlt=0.) const
Returns the obscurant type at the given altitude.
Definition: weatherStateComponent.h:112
DtWeatherStateComponentNextFrame myNextFrameState
The next (writable) frame state.
Definition: weatherStateComponent.h:511
Default creator implementation for a state component type. T_StateComponent is the concrete component...
Definition: stateComponent.h:326
virtual void setWindSpeed(const double &atAlt, const double &)
Sets the wind speed (m/s) at the given altitude.
Definition: weatherStateComponent.h:97
virtual void setObscurant(double atAlt, const int &)
Sets the obscurant type at the given altitude.
Definition: weatherStateComponent.h:115
virtual void setWindSpeed(const double &)
Sets the base wind speed (m/s).
Definition: weatherStateComponent.h:94
virtual void setVisibility(const double &atAlt, const double &)
Weather state property accessors and mutators. Derived classes provide concrete implementations.
Definition: weatherStateComponent.h:87
virtual const double windSpeed(double atAlt=0.) const
Returns the wind speed (m/s) at the given altitude.
Definition: weatherStateComponent.h:92
virtual const DtRwWindLevels & windLevels() const override
Accessors/mutators for wind level.
virtual void setWindDirection(const double &atAlt, const double &)
Sets the wind direction (degrees true) at the given altitude.
Definition: weatherStateComponent.h:107
unsigned int myCallbackHandle
Handle for the instance-updated callback registered on the read repository.
Definition: weatherStateComponent.h:445
virtual void setWindDirection(const double &)
Sets the base wind direction (degrees true).
Definition: weatherStateComponent.h:104
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: weatherStateComponent.h:21
VRF::WriteWeatherStateRepository myWriteWeatherStateRepository
Legion write repository used to publish weather state data to the network.
Definition: weatherStateComponent.h:349
virtual void aboutToBeDeleted() override
Notifies both frame states and the base class that this component is about to be destroyed.
Definition: weatherStateComponent.h:493
virtual void updateDataStorage() override
Advances the component: locates the read component on first call and promotes the next frame state in...
Definition: weatherStateComponent.h:468
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:513
DT_DLL_VRVCORE double distance(const makVrv::DtCoordinateSystem &, const DtVector &from, const DtVector &to)
Returns the distance from the two points. Coordinates are in local database coordinates The coordinat...
#define DEFINE_STATE_COMPONENT_TYPE(CreatedComponent)
Macro to define all required static and virtual state component type methods. Place in the public sec...
Definition: stateComponent.h:272
virtual const double windDirection(double atAlt=0.) const
Returns the wind direction (degrees true) at the given altitude.
Definition: weatherStateComponent.h:102
virtual void removeWindLevel(double baseAltitude)
Must be exact match.
Definition: weatherStateComponent.h:132
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:489
3) Define the current frame class. This will be used for read access.
Definition: weatherStateComponent.h:353
DtWeatherStateComponentCurrentFrame myCurrentFrameState
The current (read-only) frame state.
Definition: weatherStateComponent.h:509
2) Define the next frame class. This will be used for write access.
Definition: weatherStateComponent.h:152
#define UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(Type, Member, Set)
Defines an undefined virtual by-value accessor and an undefined virtual setter, both throwing DtUnimp...
Definition: doubleBufferedDataStorage.h:103
virtual void aboutToBeDeleted()
Called when the component is about to be deleted; emits signal_stateComponentAboutToBeDeleted.
4) Define the state component that will contain the wrappers to the next and current frame states tha...
Definition: weatherStateComponent.h:450
VRF::ReadWeatherStateRepository myReadWeatherStateRepository
Legion read repository used to access weather state data from the network.
Definition: weatherStateComponent.h:443
DtVrfWeatherCloudState
Definition: vrfWeatherStateEnums.h:24
virtual DtFrameStateInterface * nextFrameState() override
Returns the writable next frame state interface.
Definition: weatherStateComponent.h:462
bool myFoundComponent
True once the Legion read component has been successfully located.
Definition: weatherStateComponent.h:513
bool isDoubleBuffered()
Returns true, indicating this component uses double-buffered storage.
Definition: weatherStateComponent.h:458
virtual const DtFrameStateInterface * currentFrameState() const override
Returns the read-only current frame state interface.
Definition: weatherStateComponent.h:460
virtual const DtRwWindLevels & windLevels() const
Weather state property accessors and mutators. Derived classes provide concrete implementations.
Definition: weatherStateComponent.h:143
virtual void setVisibility(const double &)
Weather state property accessors and mutators. Derived classes provide concrete implementations.
Definition: weatherStateComponent.h:86
virtual bool windSpeedAndDirectionAtAltitude(double altMSL, double &windSpeed, double &windDirection) const
Given the altitude, return the wind speed and direction.
Definition: weatherStateComponent.h:135
DtStateComponentCreator< DtWeatherStateComponentImplementation > DtWeatherStateComponentCreator
5) Define the creator. This will need to be registered with the REGISTER_STATE_COMPONENT macro in the...
Definition: weatherStateComponent.h:519
virtual void clearWindLevels()
Removes all wind level entries.
Definition: weatherStateComponent.h:129
virtual void setWindLevels(const DtRwWindLevels &)
Weather state property accessors and mutators. Derived classes provide concrete implementations.
Definition: weatherStateComponent.h:142
#define DT_DLL_vrfStateData
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfStateDataDefines.h:29
virtual bool visibilityAndObscurantAtAltitude(double altMSL, double &distance, int &obs) const
Given the altitude, return the visibility and obscurant.
Definition: weatherStateComponent.h:139
virtual void updateStateData(DtStateData *sd) override
Updates the state data pointer in both the current and next frame states.
Definition: weatherStateComponent.h:486
virtual void setVisibilityAndObscurantAtAltitude(const double &altMSL, const double &distance, const int &obs)
Weather state property accessors and mutators. Derived classes provide concrete implementations.
Definition: weatherStateComponent.h:140
Contains the DtStateComponent class declaration.
Definition: rwWindLevels.h:17
virtual void setWindSpeedAndDirectionAtAltitude(const double &altMSL, const double &windSpeed, const double &windDirection)
Weather state property accessors and mutators. Derived classes provide concrete implementations.
Definition: weatherStateComponent.h:136
Base interface for accessing current or next frame state in a double-buffered state component...
Definition: stateComponent.h:354
virtual const DtFrameStateInterface * nextFrameState() const override
Returns the read-only next frame state interface.
Definition: weatherStateComponent.h:464
void advanceFrame(const DtWeatherStateComponentNextFrame &data)
Copies wind level data from the next-frame state into this current frame.
Definition: weatherStateComponent.h:436

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)