KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
LE_DeadReckoningParameter.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: LE_DeadReckoningParameter
32  created: 2008/09/18
33  author: Karl Jones
34 
35  purpose: Parameters for dead reckoning the position and orientation
36  of the entity. For Live Entities the acceleration and velocity
37  vectors are using KFIXED data types.
38  size: 56 bits / 7 octets
39 *********************************************************************/
40 
41 #pragma once
42 
43 #include "./DataTypeBase.h"
44 #include "./LE_Vector.h"
45 #include "./LE_EulerAngles.h"
46 
47 namespace KDIS {
48 namespace DATA_TYPE {
49 
51 {
52 protected:
53 
55 
57 
59 
60 public:
61 
62  static const KUINT16 LE_DEAD_RECKONING_PARAMETER_SIZE = 7;
63 
65 
67 
69  const LE_Vector8_3 & AngularVelocity );
70 
71  virtual ~LE_DeadReckoningParameter();
72 
73  //************************************
74  // FullName: KDIS::DATA_TYPE::LE_DeadReckoningParameter::SetDeadReckoningAlgorithm
75  // KDIS::DATA_TYPE::LE_DeadReckoningParameter::GetDeadReckoningAlgorithm
76  //!Description: Dead Reckoning Algorithm
77  // Parameter: DeadReckoningAlgorithm DRA
78  //************************************
79  void SetDeadReckoningAlgorithm( KDIS::DATA_TYPE::ENUMS::DeadReckoningAlgorithm DRA );
80  KDIS::DATA_TYPE::ENUMS::DeadReckoningAlgorithm GetDeadReckoningAlgorithm() const;
81 
82  //************************************
83  // FullName: KDIS::DATA_TYPE::LE_DeadReckoningParameter::SetLinearAcceleration
84  // KDIS::DATA_TYPE::LE_DeadReckoningParameter::GetLinearAcceleration
85  //!Description: Linear acceleration in decimeters per second.
86  // Parameter: const LE_Vector8_3 & LA
87  //************************************
88  void SetLinearAcceleration( const LE_Vector8_3 & LA );
89  const LE_Vector8_3 & GetLinearAcceleration() const;
90  LE_Vector8_3 & GetLinearAcceleration();
91 
92  //************************************
93  // FullName: KDIS::DATA_TYPE::LE_DeadReckoningParameter::SetAngularVelocity
94  // KDIS::DATA_TYPE::LE_DeadReckoningParameter::GetAngularVelocity
95  //!Description: Angular velocity in radians per second.
96  // Parameter: const EulerAngles & AV
97  //************************************
98  void SetAngularVelocity( const LE_Vector8_3 & AV );
99  const LE_Vector8_3 & GetAngularVelocity() const;
100  LE_Vector8_3 & GetAngularVelocity();
101 
102  //************************************
103  // FullName: KDIS::DATA_TYPE::LE_DeadReckoningParameter::GetAsString
104  //!Description: Returns a string representation
105  //************************************
106  virtual KString GetAsString() const;
107 
108  //************************************
109  // FullName: KDIS::DATA_TYPE::LE_DeadReckoningParameter::Decode
110  //!Description: Convert From Network Data.
111  // Parameter: KDataStream & stream
112  //************************************
113  virtual void Decode( KDataStream & stream ) throw( KException );
114 
115  //************************************
116  // FullName: KDIS::DATA_TYPE::LE_DeadReckoningParameter::Encode
117  //!Description: Convert To Network Data.
118  // Parameter: KDataStream & stream
119  //************************************
120  virtual KDataStream Encode() const;
121  virtual void Encode( KDataStream & stream ) const;
122 
123  KBOOL operator == ( const LE_DeadReckoningParameter & Value ) const;
124  KBOOL operator != ( const LE_DeadReckoningParameter & Value ) const;
125 };
126 
127 } // END namespace DATA_TYPES
128 } // END namespace KDIS
unsigned short int KUINT16
Definition: KDefines.h:101
Definition: LE_DeadReckoningParameter.h:50
LE_Vector8_3 m_LinearAcceleration
Definition: LE_DeadReckoningParameter.h:56
Definition: KDefines.h:182
Definition: KDataStream.h:48
Definition: DataTypeBase.h:49
bool KBOOL
Definition: KDefines.h:119
LE_Vector8_3 m_AngularVelocity
Definition: LE_DeadReckoningParameter.h:58
std::string KString
Definition: KDefines.h:116
unsigned char KUINT8
Definition: KDefines.h:99
KUINT8 m_ui8DeadRecknoningAlgorithm
Definition: LE_DeadReckoningParameter.h:54
DeadReckoningAlgorithm
Definition: EnumEntityInfoInteraction.h:841
#define KDIS_EXPORT
Definition: KDefines.h:82