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 "./DataTypeBase.h"
46 class KDIS_EXPORT BeamData
: public DataTypeBase
62 static const KUINT16 BEAM_DATA_SIZE
= 20;
66 BeamData( KDataStream
& stream
) ;
68 BeamData( KFLOAT32 AziCtr
, KFLOAT32 AziSwp
, KFLOAT32 EleCtr
,
69 KFLOAT32 EleSwp
, KFLOAT32 SwpSyn
);
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;
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;
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;
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;
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;
130 //************************************
131 // FullName: KDIS::DATA_TYPE::BeamData::GetAsString
132 // Description: Returns a string representation
133 //************************************
134 virtual KString
GetAsString() const;
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
) ;
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;
151 KBOOL
operator == ( const BeamData
& Value
) const;
152 KBOOL
operator != ( const BeamData
& Value
) const;
155 } // END namespace DATA_TYPES
156 } // END namespace KDIS