KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
GaussianPlumeRecord.h
Go to the documentation of this file.
1 /*********************************************************************
2 Copyright 2013 Karl Jones
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7 
8 1. Redistributions of source code must retain the above copyright notice, this
9  list of conditions and the following disclaimer.
10 2. Redistributions in binary form must reproduce the above copyright notice,
11  this list of conditions and the following disclaimer in the documentation
12  and/or other materials provided with the distribution.
13 
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 
25 For Further Information Please Contact me at
26 Karljj1@yahoo.com
27 http://p.sf.net/kdis/UserGuide
28 *********************************************************************/
29 
30 /********************************************************************
31  class: GaussianPlumeRecord
32  created: 17:08:2009
33  author: Karl Jones
34 
35  purpose: A geometry record representing a gaussian plume.
36  size: 704 bits / 88 octets
37 *********************************************************************/
38 
39 #pragma once
40 
41 #include "./EnvironmentRecord.h"
42 #include "./WorldCoordinates.h"
43 #include "./EulerAngles.h"
44 #include "./Vector.h"
45 
46 namespace KDIS {
47 namespace DATA_TYPE {
48 
50 {
51 protected:
52 
54 
56 
58 
60 
62 
64 
66 
67 public:
68 
69  static const KUINT16 GAUSSIAN_PLUME_RECORD_SIZE = 88;
70 
72 
73  GaussianPlumeRecord( KDataStream & stream ) throw( KException );
74 
75  GaussianPlumeRecord( KUINT8 Index, const WorldCoordinates & Location, const EulerAngles & Orientation,
76  const Vector & LWH, const Vector & DDT, KFLOAT32 LECH, const Vector & LEV );
77 
78  virtual ~GaussianPlumeRecord();
79 
80  //************************************
81  // FullName: KDIS::DATA_TYPE::GaussianPlumeRecord::SetSourceLocation
82  // KDIS::DATA_TYPE::GaussianPlumeRecord::GetSourceLocation
83  //!Description: Specifies the plumes location.
84  // Parameter: const WorldCoordinates & L, void
85  //************************************
86  void SetSourceLocation( const WorldCoordinates & L );
87  const WorldCoordinates & GetSourceLocation() const;
88  WorldCoordinates & GetSourceLocation();
89 
90  //************************************
91  // FullName: KDIS::DATA_TYPE::GaussianPlumeRecord::SetOrientation
92  // KDIS::DATA_TYPE::GaussianPlumeRecord::GetOrientation
93  //!Description: Orientation of the plume.
94  // Parameter: const EulerAngles & O
95  //************************************
96  void SetOrientation( const EulerAngles & O );
97  const EulerAngles & GetOrientation() const;
98  EulerAngles & GetOrientation();
99 
100  //************************************
101  // FullName: KDIS::DATA_TYPE::GaussianPlumeRecord::SetPlumeLengthWidthHeight
102  // KDIS::DATA_TYPE::GaussianPlumeRecord::GetPlumeLengthWidthHeight
103  //!Description: The length, width and height of the plume in meters.
104  //! X = Length, Y = Width, Z = Height
105  // Parameter: const Vector & LWH
106  //************************************
107  void SetPlumeLengthWidthHeight( const Vector & LWH );
108  const Vector & GetPlumeLengthWidthHeight() const;
109  Vector & GetPlumeLengthWidthHeight();
110 
111  //************************************
112  // FullName: KDIS::DATA_TYPE::GaussianPlumeRecord::SetPlumeLengthWidthHeight
113  // KDIS::DATA_TYPE::GaussianPlumeRecord::GetPlumeLengthWidthHeight
114  //!Description: The length, width and height of the plume in meters.
115  //! X = d(Plume Length)/dt
116  //! Y = d(Plume Width)/dt
117  //! Z = d(Plume Height)/dt
118  // Parameter: const Vector & DDT
119  //************************************
120  void SetDOverDtLengthWidthHeight( const Vector & DDT );
121  const Vector & GetDOverDtLengthWidthHeight() const;
122  Vector & GetDOverDtLengthWidthHeight();
123 
124  //************************************
125  // FullName: KDIS::DATA_TYPE::GaussianPlumeRecord::SetLeadingEdgeCentroidHeight
126  // KDIS::DATA_TYPE::GaussianPlumeRecord::GetLeadingEdgeCentroidHeight
127  //!Description: The leading edge centroid height in meters.
128  // Parameter: KFLOAT32 LECH, void
129  //************************************
130  void SetLeadingEdgeCentroidHeight( KFLOAT32 LECH );
131  KFLOAT32 GetLeadingEdgeCentroidHeight() const;
132 
133  //************************************
134  // FullName: KDIS::DATA_TYPE::GaussianPlumeRecord::SetLeadingEdgeVelocity
135  // KDIS::DATA_TYPE::GaussianPlumeRecord::GetLeadingEdgeVelocity
136  //!Description: Specifies the velocity of the leading edge of the plume.
137  //! Represented as a Linear Velocity Vector.
138  // Parameter: const Vector & DDT
139  //************************************
140  void SetLeadingEdgeVelocity( const Vector & LEV );
141  const Vector & GetLeadingEdgeVelocity() const;
142  Vector & GetLeadingEdgeVelocity();
143 
144  //************************************
145  // FullName: KDIS::DATA_TYPE::GaussianPlumeRecord::GetAsString
146  //!Description: Returns a string representation
147  //************************************
148  virtual KString GetAsString() const;
149 
150  //************************************
151  // FullName: KDIS::DATA_TYPE::GaussianPlumeRecord::Decode
152  //!Description: Convert From Network Data.
153  // Parameter: KDataStream & stream
154  //************************************
155  virtual void Decode( KDataStream & stream ) throw( KException );
156 
157  //************************************
158  // FullName: KDIS::DATA_TYPE::GaussianPlumeRecord::Encode
159  //!Description: Convert To Network Data.
160  // Parameter: KDataStream & stream
161  //************************************
162  virtual KDataStream Encode() const;
163  virtual void Encode( KDataStream & stream ) const;
164 
165  KBOOL operator == ( const GaussianPlumeRecord & Value )const;
166  KBOOL operator != ( const GaussianPlumeRecord & Value )const;
167 };
168 
169 } // END namespace DATA_TYPES
170 } // END namespace KDIS
unsigned int KUINT32
Definition: KDefines.h:103
WorldCoordinates m_SrcLocation
Definition: GaussianPlumeRecord.h:53
Vector m_LdEdgeVel
Definition: GaussianPlumeRecord.h:63
unsigned short int KUINT16
Definition: KDefines.h:101
float KFLOAT32
Definition: KDefines.h:113
EulerAngles m_Ori
Definition: GaussianPlumeRecord.h:55
Definition: Vector.h:71
Definition: KDefines.h:182
Definition: KDataStream.h:48
Definition: WorldCoordinates.h:52
bool KBOOL
Definition: KDefines.h:119
KFLOAT32 m_f32LdEdgeCenHght
Definition: GaussianPlumeRecord.h:61
Definition: EulerAngles.h:46
std::string KString
Definition: KDefines.h:116
unsigned char KUINT8
Definition: KDefines.h:99
Vector m_PlumeLWH
Definition: GaussianPlumeRecord.h:57
#define KDIS_EXPORT
Definition: KDefines.h:82
Vector m_DDTLEH
Definition: GaussianPlumeRecord.h:59
Definition: GaussianPlumeRecord.h:49
KUINT32 m_ui32Padding
Definition: GaussianPlumeRecord.h:65
Definition: EnvironmentRecord.h:59