Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

GPSPosition Class Reference

#include <gps_position.hh>

Inheritance diagram for GPSPosition:

LocalProperty Property MetaObject ObjectExciseListener List of all members.

Public Member Functions

Static Public Member Functions

Protected Attributes

Static Protected Attributes


Constructor & Destructor Documentation

GPSPosition::GPSPosition MetaObject super  )  throw (ServerCommError)
 

Constructor: initializes values and oens socket to gpsd.

Definition at line 39 of file gps_position.cc.

Referenced by new_GPSPosition().

GPSPosition::~GPSPosition  ) 
 

Destructor: closes socket.

Definition at line 64 of file gps_position.cc.


Member Function Documentation

void GPSPosition::fixAltitude double  val  )  [inline]
 

Fix altitude (Y position) to some value.

Definition at line 164 of file gps_position.hh.

int GPSPosition::getStatus  )  throw (ServerCommError)
 

Send status command to gpsd and return response.

-1 is returned on connection/communicaiton error.

Definition at line 128 of file gps_position.cc.

MetaObject* GPSPosition::new_GPSPosition MetaObject super,
const string &  type
[inline, static]
 

This method is used by MetaFactory to create a new instance of this class.

Definition at line 124 of file gps_position.hh.

Referenced by registerExtenders().

void GPSPosition::registerExtenders  )  [inline, static]
 

Register GPSPosition with MetaFactory by typeid(GPSPosition).name, as a local object extension.

You must also call Property::registerExtenders()!

Reimplemented from Property.

Definition at line 119 of file gps_position.hh.

void GPSPosition::setOffsets double  latitude,
double  longitude,
double  altitude
 

Set offsets.

( (Final value) = (Original value + Offset) * Scaling ).

Definition at line 149 of file gps_position.cc.

void GPSPosition::setPrecision int  precision  )  throw (range_error)
 

Set precision of values.

The default value is 15 decimal places. Must be an integer value >= 0 and <= 15. new precision value

Exceptions:
range_error if requested precision value is > 15 or < 0.

Definition at line 121 of file gps_position.cc.

void GPSPosition::setScaling double  latitude,
double  longitude,
double  altitude
 

Set scaling multipliers.

( (Final value) = (Original value + Offset) * Scaling ).

Definition at line 142 of file gps_position.cc.

void GPSPosition::setServer char *  host = "127.0.0.1",
int  port = GPSD_DEFAULT_PORT
[inline, static]
 

Set default gpsd server for future GPSPosition objects.

Parameters:
host Numerical host address. Default is "127.0.0.1"
port Port number. Default is GPSD_DEFAULT_PORT (2947).

Definition at line 152 of file gps_position.hh.

void GPSPosition::setThreshold double  t  )  [inline]
 

Set threshold of change before property value is replaced on update() (and therefore update messages sent to listeners).

Definition at line 136 of file gps_position.hh.

void GPSPosition::update  )  throw (ServerCommError)
 

Update value from gpsd after which you can use read() to get the new value.

Call at intervals, or right before a read. Only changes the property value (with a call to replace()) if the difference from the last update is greater than the threshold.

See also:
setThreshold()

setPrecision()

Definition at line 88 of file gps_position.cc.


Member Data Documentation

double GPSPosition::alt_off [protected]
 

Definition at line 91 of file gps_position.hh.

Referenced by setOffsets().

double GPSPosition::alt_scale [protected]
 

Definition at line 86 of file gps_position.hh.

Referenced by setScaling().

bool GPSPosition::fix_alt [protected]
 

Definition at line 94 of file gps_position.hh.

Referenced by fixAltitude().

double GPSPosition::fixed_alt_val [protected]
 

Definition at line 95 of file gps_position.hh.

Referenced by fixAltitude().

char * GPSPosition::gpsd_host = "127.0.0.1" [static, protected]
 

Definition at line 34 of file gps_position.cc.

Referenced by setServer().

int GPSPosition::gpsd_port = GPSD_DEFAULT_PORT [static, protected]
 

Definition at line 35 of file gps_position.cc.

Referenced by setServer().

double GPSPosition::last_alt [protected]
 

Definition at line 100 of file gps_position.hh.

double GPSPosition::last_lat [protected]
 

Definition at line 98 of file gps_position.hh.

double GPSPosition::last_lon [protected]
 

Definition at line 99 of file gps_position.hh.

double GPSPosition::lat_off [protected]
 

Definition at line 89 of file gps_position.hh.

Referenced by setOffsets().

double GPSPosition::lat_scale [protected]
 

Definition at line 84 of file gps_position.hh.

Referenced by setScaling().

double GPSPosition::lon_off [protected]
 

Definition at line 90 of file gps_position.hh.

Referenced by setOffsets().

double GPSPosition::lon_scale [protected]
 

Definition at line 85 of file gps_position.hh.

Referenced by setScaling().

char GPSPosition::position_format[64] [protected]
 

Definition at line 107 of file gps_position.hh.

int GPSPosition::socket_fd [protected]
 

Definition at line 79 of file gps_position.hh.

Referenced by ~GPSPosition().

double GPSPosition::threshold [protected]
 

Definition at line 104 of file gps_position.hh.

Referenced by setThreshold().


The documentation for this class was generated from the following files:
Generated on Tue Aug 12 03:55:54 2003 for Interreality Project - VOS by doxygen 1.3.2