FMXXXX Parser Documentation 0.1
FM2100, FM2200, FM4100 and FM4200 Data Parser

GPSElement Class Reference

Public Member Functions

 __construct ($args=array())
 getLatitude ()
 getLongitude ()
 getAltitude ()
 getAngle ()
 getSatellites ()
 getSpeed ($unit= 'kmph')
 setLatitude ($val)
 setLongitude ($val)
 setAltitude ($val)
 setAngle ($val)
 setSatellites ($val)
 setSpeed ($val)
 isValid ()

Detailed Description

GPS Element object for Teltonika's FMXXXX GPS device.

Author:
Thierno Ib. Barry < >
Date:
26 Feb 2011
See also:
Teltonika FMXXXX Protocols GNU/LGPL v2.1
Todo:
Add getters to get Hex values (getHexVaribleName). Example: getHexLatitude()

Constructor & Destructor Documentation

__construct ( args = array())

Constructor

Parameters:
array$argsConstructor arguments

Member Function Documentation

getAltitude ( )

Get altitude value converted in integer

Returns:
int Return the altitude value converted in integer
getAngle ( )

Get angle value converted in integer

Returns:
int Return the angle value converted in integer
getLatitude ( )

Get latitude value converted in integer.

See also:
Two's compliment arithmetics.
Returns:
int Return the latitude value converted in integer

Todo:
Binary conversion
Todo:
Test on first bit
Todo:
See two's compliment arithmetics

getLongitude ( )

Get longitude value converted in integer.

See also:
Two's compliment arithmetics.
Returns:
int Return the longitude value converted in integer

Todo:
Binary conversion
Todo:
Test on first bit
Todo:
See two's compliment arithmetics

getSatellites ( )

Get satellites number converted in integer

Returns:
int Return the satellites number converted in integer
getSpeed ( unit = 'kmph')

Get speed value converted in integer (kmph or mph)

Parameters:
string$unitThe unit in which the speed have to be converted The unit must be: + kpmh -> Km/h + mph -> Milles/h
Returns:
int Return the speed value converted in integer

Todo:
Conversion in Km/h or Milles/h

isValid ( )

Check if the GPSElement is valid or not. Note: The GPSElement is valid only if the speed is different of 0.

See also:
FMXXXX protocols for more informations
Returns:
boolean Return true if the GPS Element is valid and false if not.
setAltitude ( val)

Setter for altitude attribute. Note: The value must be in Hexadecimal.

Parameters:
string$valThe altitude value in Hex base (16)
setAngle ( val)

Setter for angle attribute. Note: The value must be in Hexadecimal.

Parameters:
string$valThe angle value in Hex base (16)
setLatitude ( val)

Setter for latitude attribute. Note: The value must be in Hexadecimal.

Parameters:
string$valThe latitude value in Hex base (16)
setLongitude ( val)

Setter for longitude attribute. Note: The value must be in Hexadecimal.

Parameters:
string$valThe longitude value in Hex base (16)
setSatellites ( val)

Setter for satellites attribute. Note: The value must be in Hexadecimal.

Parameters:
string$valThe satellites value in Hex base (16)
setSpeed ( val)

Setter for speed attribute. Note: The value must be in Hexadecimal.

Parameters:
string$valThe speed value in Hex base (16)

The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables Enumerations