1 /*********************************************************************
2 Copyright 2013 Karl Jones
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
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.
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.
25 For Further Information Please Contact me at
27 http://p.sf.net/kdis/UserGuide
28 *********************************************************************/
30 /********************************************************************
35 purpose: Contains specific infomation to describe a sensors scan volume.
36 size: 160 bits / 20 octets
37 *********************************************************************/
41 #include "KDIS/DataTypes/DataTypeBase.hpp"
46 class KDIS_EXPORT BeamData
: public DataTypeBase
{
59 static const KUINT16 BEAM_DATA_SIZE
= 20;
63 BeamData(KDataStream
& stream
);
65 BeamData(KFLOAT32 AziCtr
, KFLOAT32 AziSwp
, KFLOAT32 EleCtr
, KFLOAT32 EleSwp
,
70 //************************************
71 // FullName: KDIS::DATA_TYPE::BeamData::SetAzimuthCenter
72 // KDIS::DATA_TYPE::BeamData::GetAzimuthCenter
73 // Description: Beam azimuth center angle in radians. All angles shall be
75 // relation to the emitter coordinate system.
76 // The azimuth center for 360° scan systems shall be 0°.
77 // Parameter: KFLOAT32 AC
78 //************************************
79 void SetAzimuthCenter(KFLOAT32 AC
);
80 KFLOAT32
GetAzimuthCenter() const;
82 //************************************
83 // FullName: KDIS::DATA_TYPE::BeamData::SetAzimuthSweep
84 // KDIS::DATA_TYPE::BeamData::GetAzimuthSweep
85 // Description: Azimuth sweep angle in radians.
86 // All angles shall be measured in
87 // relation to the emitter coordinate system.
88 // Parameter: KFLOAT32 AS
89 //************************************
90 void SetAzimuthSweep(KFLOAT32 AS
);
91 KFLOAT32
GetAzimuthSweep() const;
93 //************************************
94 // FullName: KDIS::DATA_TYPE::BeamData::SetElevationCenter
95 // KDIS::DATA_TYPE::BeamData::GetElevationCenter
96 // Description: Elevation center angle in radians.
97 // All angles shall be measured in
98 // relation to the emitter coordinate system.
99 // Parameter: KFLOAT32 EC
100 //************************************
101 void SetElevationCenter(KFLOAT32 EC
);
102 KFLOAT32
GetElevationCenter() const;
104 //************************************
105 // FullName: KDIS::DATA_TYPE::BeamData::SetElevationSweep
106 // KDIS::DATA_TYPE::BeamData::GetElevationSweep
107 // Description: Elevation sweep angle in radians.
108 // All angles shall be measured in
109 // relation to the emitter coordinate system.
110 // Parameter: KFLOAT32 ES
111 //************************************
112 void SetElevationSweep(KFLOAT32 ES
);
113 KFLOAT32
GetElevationSweep() const;
115 //************************************
116 // FullName: KDIS::DATA_TYPE::BeamData::SetBeamSweepSync
117 // KDIS::DATA_TYPE::BeamData::GetBeamSweepSync
118 // Description: Specifies the percentage of time a scan is through its
119 // pattern from its origin. The pattern and origin data
120 // shall be derived from database parameters.
121 // Provided to allow a receiver to synchronize its regeneration
122 // scan pattern to that of the emitter.
123 // Parameter: KFLOAT32 BSS
124 //************************************
125 void SetBeamSweepSync(KFLOAT32 BSS
);
126 KFLOAT32
GetBeamSweepSync() const;
128 //************************************
129 // FullName: KDIS::DATA_TYPE::BeamData::GetAsString
130 // Description: Returns a string representation
131 //************************************
132 virtual KString
GetAsString() const;
134 //************************************
135 // FullName: KDIS::DATA_TYPE::BeamData::Decode
136 // Description: Convert From Network Data.
137 // Parameter: KDataStream & stream
138 //************************************
139 virtual void Decode(KDataStream
& stream
);
141 //************************************
142 // FullName: KDIS::DATA_TYPE::BeamData::Encode
143 // Description: Convert To Network Data.
144 // Parameter: KDataStream & stream
145 //************************************
146 virtual KDataStream
Encode() const;
147 virtual void Encode(KDataStream
& stream
) const;
149 KBOOL
operator==(const BeamData
& Value
) const;
150 KBOOL
operator!=(const BeamData
& Value
) const;
153 } // namespace DATA_TYPE
154 } // END namespace KDIS