Christian Burri / Mbed 2 deprecated autonomousRobotAndroid

Dependencies:   mbed

Fork of autonomousRobotAndroid by Christian Burri

Embed: (wiki syntax)

« Back to documentation index

MotionState Class Reference

MotionState Class Reference

This help class is for calculate and save the actual or desired value. There have the setter and the getter methode to change the value. More...

#include <MotionState.h>

Public Member Functions

 MotionState ()
 Creates a MotionState object.
 MotionState (float xposition, float yposition, float theta, float speed, float omega)
 Creates a MotionState object with given values for position and speed.
virtual ~MotionState ()
 Destructor of the Object to destroy the Object.
void setState (float xposition, float yposition, float theta, float speed, float omega)
 Sets the values for xPosition, yPostion and .
void setState (MotionState *motionState)
 Sets the values for X-Position, Y-Postion and .
void setxPosition (float xposition)
 Sets the X-position value.
float getxPosition ()
 Gets the X-position value.
void setyPosition (float yposition)
 Sets the Y-position value.
float getyPosition ()
 Gets the Y-position value.
void setTheta (float theta)
 Sets the value.
float getTheta ()
 Gets the value.
void setSpeed (float speed)
 Sets the speed value.
float getSpeed ()
 Gets the speed value.
void setOmega (float omega)
 Sets the value.
float getOmega ()
 Gets the value.

Data Fields

float xposition
 The xposition value of this motion state.
float yposition
 The yposition value of this motion state.
float theta
 The of this motion state.
float speed
 The speed value of this motion state.
float omega
 The speed rotational value of this motion state.

Detailed Description

This help class is for calculate and save the actual or desired value. There have the setter and the getter methode to change the value.

Author:
Christian Burri

Copyright (c) 2013 HSLU Pren Team #1 Cruising Crêpe All rights reserved.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition at line 25 of file MotionState.h.


Constructor & Destructor Documentation

MotionState (  )

Creates a MotionState object.

The values for position and speed are set to 0.

Definition at line 5 of file MotionState.cpp.

MotionState ( float  xposition,
float  yposition,
float  theta,
float  speed,
float  omega 
)

Creates a MotionState object with given values for position and speed.

Parameters:
xpositionthe initial position value of this motion state, given in [m]
ypositionthe initial position value of this motion state, given in [m]
thetathe initial value of this motion state, given in [rad]
speedthe initial speed value of this motion state, given in [m/s]
omegathe initial speed value of this motion state, given in [rad/s]

Definition at line 15 of file MotionState.cpp.

~MotionState (  ) [virtual]

Destructor of the Object to destroy the Object.

Definition at line 28 of file MotionState.cpp.


Member Function Documentation

float getOmega (  )

Gets the value.

Returns:
the value of this motion state, given in [rad/s]

Definition at line 100 of file MotionState.cpp.

float getSpeed (  )

Gets the speed value.

Returns:
the speed value of this motion state, given in [m/s]

Definition at line 90 of file MotionState.cpp.

float getTheta (  )

Gets the value.

Returns:
the value of this motion state, given in [rad]

Definition at line 80 of file MotionState.cpp.

float getxPosition (  )

Gets the X-position value.

Returns:
the xposition value of this motion state, given in [m]

Definition at line 60 of file MotionState.cpp.

float getyPosition (  )

Gets the Y-position value.

Returns:
the xposition value of this motion state, given in [m]

Definition at line 70 of file MotionState.cpp.

void setOmega ( float  omega )

Sets the value.

Parameters:
omegathe desired value of this motion state, given in [rad/s]

Definition at line 95 of file MotionState.cpp.

void setSpeed ( float  speed )

Sets the speed value.

Parameters:
speedthe desired speed value of this motion state, given in [m/s]

Definition at line 85 of file MotionState.cpp.

void setState ( MotionState motionState )

Sets the values for X-Position, Y-Postion and .

Parameters:
motionStateanother MotionState object to copy the state values from

Definition at line 46 of file MotionState.cpp.

void setState ( float  xposition,
float  yposition,
float  theta,
float  speed,
float  omega 
)

Sets the values for xPosition, yPostion and .

Parameters:
xpositionthe initial position value of this motion state, given in [m]
ypositionthe initial position value of this motion state, given in [m]
thetathe initial value of this motion state, given in [rad]
speedthe initial speed value of this motion state, given in [m/s]
omegathe initial speed value of this motion state, given in [rad/s]

Definition at line 33 of file MotionState.cpp.

void setTheta ( float  theta )

Sets the value.

Parameters:
thetathe desired value of this motion state, given in [rad]

Definition at line 75 of file MotionState.cpp.

void setxPosition ( float  xposition )

Sets the X-position value.

Parameters:
xpositionthe desired xposition value of this motion state, given in [m]

Definition at line 55 of file MotionState.cpp.

void setyPosition ( float  yposition )

Sets the Y-position value.

Parameters:
ypositionthe desired yposition value of this motion state, given in [m]

Definition at line 65 of file MotionState.cpp.


Field Documentation

float omega

The speed rotational value of this motion state.

Definition at line 39 of file MotionState.h.

float speed

The speed value of this motion state.

Definition at line 37 of file MotionState.h.

float theta

The of this motion state.

Definition at line 35 of file MotionState.h.

float xposition

The xposition value of this motion state.

Definition at line 31 of file MotionState.h.

float yposition

The yposition value of this motion state.

Definition at line 33 of file MotionState.h.