KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
PositionError.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: PositionError
32  created: 21/07/2010
33  author: Karl Jones
34 
35  purpose: The error components that are associated with the location
36  measurement for an entity. These errors are measured in
37  entity-centered tangent planes.
38  size: 32 bits / 4 octets
39 *********************************************************************/
40 
41 #pragma once
42 
43 #include "./KFIXED.h"
44 
45 namespace KDIS {
46 namespace DATA_TYPE {
47 
49 {
50 protected:
51 
53 
55 
56 public:
57 
58  static const KUINT16 POSITION_ERROR_SIZE = 4;
59 
60  PositionError();
61 
62  PositionError( KFIXED16_8 Horizontal, KFIXED16_8 Vertical );
63 
64  PositionError( KDataStream & stream ) throw( KException );
65 
66  virtual ~PositionError();
67 
68  //************************************
69  // FullName: KDIS::DATA_TYPE::PositionError::SetHorizontalError
70  // KDIS::DATA_TYPE::PositionError::GetHorizontalError
71  //!Description: The error components that are associated with the
72  //! location measurement for an entity. These errors
73  //! are measured in entity-centered tangent planes.
74  // Parameter: KFIXED16_8 HE
75  //************************************
76  void SetHorizontalError( KFIXED16_8 HE );
77  KFIXED16_8 GetHorizontalError() const;
78 
79  //************************************
80  // FullName: KDIS::DATA_TYPE::PositionError::SetVerticalError
81  // KDIS::DATA_TYPE::PositionError::GetVerticalError
82  //!Description: The error components that are associated with the
83  //! location measurement for an entity. These errors
84  //! are measured in entity-centered tangent planes.
85  // Parameter: KFIXED16_8 VE
86  //************************************
87  void SetVerticalError( KFIXED16_8 VE );
88  KFIXED16_8 GetVerticalError() const;
89 
90  //************************************
91  // FullName: KDIS::DATA_TYPE::PositionError::GetAsString
92  //!Description: Returns a string representation
93  //************************************
94  virtual KString GetAsString() const;
95 
96  //************************************
97  // FullName: KDIS::DATA_TYPE::DataTypeBase::Decode
98  //!Description: Convert From Network Data.
99  // Parameter: KDataStream & stream
100  //************************************
101  virtual void Decode( KDataStream & stream ) throw( KException );
102 
103  //************************************
104  // FullName: KDIS::DATA_TYPE::PositionError::Encode
105  //!Description: Convert To Network Data.
106  // Parameter: KDataStream & stream
107  //************************************
108  virtual KDataStream Encode() const;
109  virtual void Encode( KDataStream & stream ) const;
110 
111  KBOOL operator == ( const PositionError & Value ) const;
112  KBOOL operator != ( const PositionError & Value ) const;
113 };
114 
115 } // END namespace DATA_TYPES
116 } // END namespace KDIS
117 
unsigned short int KUINT16
Definition: KDefines.h:101
KFIXED16_8 m_HorzErr
Definition: PositionError.h:52
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
KFIXED16_8 m_VertErr
Definition: PositionError.h:54
Definition: PositionError.h:48
#define KDIS_EXPORT
Definition: KDefines.h:82