AIM
 All Classes Functions Variables Typedefs Enumerations
PositionDistanceMeasure Class Reference

#include <PositionDistanceMeasure.h>

Inheritance diagram for PositionDistanceMeasure:
AIM

Public Member Functions

 PositionDistanceMeasure (std::string name="position_distance_measure")
 
void doTick ()
 
- Public Member Functions inherited from AIM
 AIM (std::string name="")
 
 AIM (const AIM &other)
 
AIMoperator= (const AIM &rhs)
 
virtual void addDataSubscriber (const std::string &key, AIM *subscriber)
 
virtual void removeDataSubscriber (const std::string &key)
 
virtual AIMValue setProperty (const std::string &key, AIMValue value)
 
virtual AIMValue getProperty (std::string key) const
 
virtual void sendData ()
 
virtual void addData (const AIMData &data)
 
virtual std::string exportProperties ()
 
virtual std::vector< std::pair
< std::string, AIMValue > > 
getOutputData (bool clear_output=false)
 
virtual std::vector< std::pair
< std::string, AIMValue > > 
getInputData (bool clear_input=false)
 
virtual AIMgetDataSubscriber (std::string subscriber)
 
virtual const std::map
< std::string, AIMValue > & 
getProperties ()
 
virtual std::string getName () const
 
virtual std::vector< AIMValuegetRequirements () const
 
virtual bool requirementsAreUpdated (bool reset=true) const
 
virtual void setProperties (const std::map< std::string, AIMValue > &properties)
 

Static Public Attributes

static const std::string PROP_GOAL_POSITION = "goal position"
 
- Static Public Attributes inherited from AIM
static const std::string VERSION = AIM_VERSION
 

Additional Inherited Members

- Public Types inherited from AIM
typedef std::pair< std::string,
AIMValue
AIMData
 
typedef std::queue< AIMDataAIMDataQueue
 
typedef std::queue< AIMValueAIMValueQueue
 
typedef std::map< std::string,
AIMValueQueue
InputDataQueue
 
- Protected Member Functions inherited from AIM
void setDataSubscribers (const std::map< std::string, AIM * > &subscribers)
 
void setInputDataQueue (const InputDataQueue &inputDataQueue)
 
void setOutputDataQueue (const AIMDataQueue &outputDataQueue)
 
- Protected Attributes inherited from AIM
std::string name
 
std::vector< AIMValuerequirements
 
bool requirementsUpdated
 
std::map< std::string, AIM * > dataSubscribers
 
std::map< std::string, AIMValueproperties
 
InputDataQueue inputDataQueue
 
AIMDataQueue outputDataQueue
 

Detailed Description

PositionDistanceMeasure.h

Created on: Feb 15, 2013 Author: Ted Schmidt

This is the wrapper class of the Position Distance Measure (PDM) module.
The PDM module calculates the distance from an incoming latitude, longitude point
to a predefined latitude, longitude position in meters.
This module expects position data input with the following AIMValue structure
{"position":{"latitude", 4.112345, "longitude", 53.322134, "accuracy":100}}
Where position is the AIMData key.
To set the position to compute the distance from property key PROP_GOAL_POSITION should be used with latitude longitude data
{"goal position":{"latitude", 4.112345, "longitude", 53.321134}}
This modules returns the distance in meters as a double it uses as output key the same value as the input data key.

Member Function Documentation

void PositionDistanceMeasure::doTick ( )
virtual

Do an AIM tick

This method is called to tick the AI-module to do its processing. During this tick the AI module grabs it's input data, does its processing, and sends the data to its data receivers. This method can be used in combination with AIM priorities, to streamline the data flow and timers for timed AI modules.

Reimplemented from AIM.

Member Data Documentation

const std::string PositionDistanceMeasure::PROP_GOAL_POSITION = "goal position"
static

Property key for the goal position


The documentation for this class was generated from the following files: