KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
OrientationError.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: OrientationError
32  created: 29/07/2010
33  author: Karl Jones
34 
35  purpose: The error components that are associated with the orientation
36  measurement for an entity. These errors are measured in radians.
37 
38  The binary point is defined by the sub-protocol, but for the
39  purposes of this standard the binary point shall be 8
40  (i.e., the least significant bit shall represent 0.0039062 radians).
41 
42  size: 48 bits / 6 octets
43 *********************************************************************/
44 
45 #pragma once
46 
47 #include "./KFIXED.h"
48 
49 namespace KDIS {
50 namespace DATA_TYPE {
51 
53 {
54 protected:
55 
57 
59 
61 
62 public:
63 
64  static const KUINT16 ORIENTATION_ERROR_SIZE = 6;
65 
67 
69 
70  OrientationError( KDataStream & stream ) throw( KException );
71 
72  virtual ~OrientationError();
73 
74  //************************************
75  // FullName: KDIS::DATA_TYPE::OrientationError::SetAzimuthError
76  // KDIS::DATA_TYPE::OrientationError::GetAzimuthError
77  //!Description: Azimuth orientation error in radians.
78  // Parameter: KFIXED16_8 AE
79  //************************************
80  void SetAzimuthError( KFIXED16_8 AE );
81  KFIXED16_8 GetAzimuthError() const;
82 
83  //************************************
84  // FullName: KDIS::DATA_TYPE::OrientationError::SetElevationError
85  // KDIS::DATA_TYPE::OrientationError::GetElevationError
86  //!Description: Elevation orientation error in radians.
87  // Parameter: KFIXED16_8 EE
88  //************************************
89  void SetElevationError( KFIXED16_8 EE );
90  KFIXED16_8 GetElevationError() const;
91 
92  //************************************
93  // FullName: KDIS::DATA_TYPE::OrientationError::SetRotationError
94  // KDIS::DATA_TYPE::OrientationError::GetRotationError
95  //!Description: Rotation orientation error in radians.
96  // Parameter: KFIXED16_8 RE
97  //************************************
98  void SetRotationError( KFIXED16_8 RE );
99  KFIXED16_8 GetRotationError() const;
100 
101  //************************************
102  // FullName: KDIS::DATA_TYPE::OrientationError::GetAsString
103  //!Description: Returns a string representation
104  //************************************
105  virtual KString GetAsString() const;
106 
107  //************************************
108  // FullName: KDIS::DATA_TYPE::DataTypeBase::Decode
109  //!Description: Convert From Network Data.
110  // Parameter: KDataStream & stream
111  //************************************
112  virtual void Decode( KDataStream & stream ) throw( KException );
113 
114  //************************************
115  // FullName: KDIS::DATA_TYPE::OrientationError::Encode
116  //!Description: Convert To Network Data.
117  // Parameter: KDataStream & stream
118  //************************************
119  virtual KDataStream Encode() const;
120  virtual void Encode( KDataStream & stream ) const;
121 
122  KBOOL operator == ( const OrientationError & Value ) const;
123  KBOOL operator != ( const OrientationError & Value ) const;
124 };
125 
126 } // END namespace DATA_TYPES
127 } // END namespace KDIS
128 
KFIXED16_8 m_ElvErr
Definition: OrientationError.h:58
KFIXED16_8 m_AziErr
Definition: OrientationError.h:56
Definition: EnumEntityInfoInteraction.h:432
unsigned short int KUINT16
Definition: KDefines.h:101
KFIXED16_8 m_RotErr
Definition: OrientationError.h:60
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
Definition: EnumEntityInfoInteraction.h:424
Definition: OrientationError.h:52
Definition: EnumEntityInfoInteraction.h:428
#define KDIS_EXPORT
Definition: KDefines.h:82