KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
BeamData.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: BeamData
32  created: 23/03/2009
33  author: Karl Jones
34 
35  purpose: Contains specific infomation to describe a sensors scan volume.
36  size: 160 bits / 20 octets
37 *********************************************************************/
38 
39 #pragma once
40 
41 #include "./DataTypeBase.h"
42 
43 namespace KDIS {
44 namespace DATA_TYPE {
45 
47 {
48 protected:
49 
51 
53 
55 
57 
59 
60 public:
61 
62  static const KUINT16 BEAM_DATA_SIZE = 20;
63 
64  BeamData();
65 
66  BeamData( KDataStream & stream ) throw( KException );
67 
68  BeamData( KFLOAT32 AziCtr, KFLOAT32 AziSwp, KFLOAT32 EleCtr,
69  KFLOAT32 EleSwp, KFLOAT32 SwpSyn );
70 
71  virtual ~BeamData();
72 
73  //************************************
74  // FullName: KDIS::DATA_TYPE::BeamData::SetAzimuthCenter
75  // KDIS::DATA_TYPE::BeamData::GetAzimuthCenter
76  //!Description: Beam azimuth center angle in radians. All angles shall be measured in
77  //! relation to the emitter coordinate system.
78  //! The azimuth center for 360� scan systems shall be 0�.
79  // Parameter: KFLOAT32 AC
80  //************************************
81  void SetAzimuthCenter( KFLOAT32 AC );
82  KFLOAT32 GetAzimuthCenter()const;
83 
84  //************************************
85  // FullName: KDIS::DATA_TYPE::BeamData::SetAzimuthSweep
86  // KDIS::DATA_TYPE::BeamData::GetAzimuthSweep
87  //!Description: Azimuth sweep angle in radians.
88  //! All angles shall be measured in
89  //! relation to the emitter coordinate system.
90  // Parameter: KFLOAT32 AS
91  //************************************
92  void SetAzimuthSweep( KFLOAT32 AS );
93  KFLOAT32 GetAzimuthSweep()const;
94 
95  //************************************
96  // FullName: KDIS::DATA_TYPE::BeamData::SetElevationCenter
97  // KDIS::DATA_TYPE::BeamData::GetElevationCenter
98  //!Description: Elevation center angle in radians.
99  //! All angles shall be measured in
100  //! relation to the emitter coordinate system.
101  // Parameter: KFLOAT32 EC
102  //************************************
103  void SetElevationCenter( KFLOAT32 EC );
104  KFLOAT32 GetElevationCenter()const;
105 
106  //************************************
107  // FullName: KDIS::DATA_TYPE::BeamData::SetElevationSweep
108  // KDIS::DATA_TYPE::BeamData::GetElevationSweep
109  //!Description: Elevation sweep angle in radians.
110  //! All angles shall be measured in
111  //! relation to the emitter coordinate system.
112  // Parameter: KFLOAT32 ES
113  //************************************
114  void SetElevationSweep( KFLOAT32 ES );
115  KFLOAT32 GetElevationSweep()const;
116 
117  //************************************
118  // FullName: KDIS::DATA_TYPE::BeamData::SetBeamSweepSync
119  // KDIS::DATA_TYPE::BeamData::GetBeamSweepSync
120  //!Description: Specifies the percentage of time a scan is through its
121  //! pattern from its origin. The pattern and origin data
122  //! shall be derived from database parameters.
123  //! Provided to allow a receiver to synchronize its regeneration
124  //! scan pattern to that of the emitter.
125  // Parameter: KFLOAT32 BSS
126  //************************************
127  void SetBeamSweepSync( KFLOAT32 BSS );
128  KFLOAT32 GetBeamSweepSync()const;
129 
130  //************************************
131  // FullName: KDIS::DATA_TYPE::BeamData::GetAsString
132  //!Description: Returns a string representation
133  //************************************
134  virtual KString GetAsString() const;
135 
136  //************************************
137  // FullName: KDIS::DATA_TYPE::BeamData::Decode
138  //!Description: Convert From Network Data.
139  // Parameter: KDataStream & stream
140  //************************************
141  virtual void Decode( KDataStream & stream ) throw( KException );
142 
143  //************************************
144  // FullName: KDIS::DATA_TYPE::BeamData::Encode
145  //!Description: Convert To Network Data.
146  // Parameter: KDataStream & stream
147  //************************************
148  virtual KDataStream Encode() const;
149  virtual void Encode( KDataStream & stream ) const;
150 
151  KBOOL operator == ( const BeamData & Value ) const;
152  KBOOL operator != ( const BeamData & Value ) const;
153 };
154 
155 } // END namespace DATA_TYPES
156 } // END namespace KDIS
157 
Definition: BeamData.h:46
KFLOAT32 m_f32EleCtr
Definition: BeamData.h:54
unsigned short int KUINT16
Definition: KDefines.h:101
KFLOAT32 m_f32EleSwp
Definition: BeamData.h:56
float KFLOAT32
Definition: KDefines.h:113
KFLOAT32 m_f32AziSwp
Definition: BeamData.h:52
KFLOAT32 m_f32SwpSyn
Definition: BeamData.h:58
KFLOAT32 m_f32AziCtr
Definition: BeamData.h:50
Definition: KDefines.h:182
Definition: KDataStream.h:48
Definition: DataTypeBase.h:49
bool KBOOL
Definition: KDefines.h:119
std::string KString
Definition: KDefines.h:116
#define KDIS_EXPORT
Definition: KDefines.h:82