| |
- __builtin__.object
-
- Data
- Location
- NMEA
- Value
-
- Course
- Distance
- HDOP
- Position
- Speed
class Data(__builtin__.object) |
|
Reads and stores data from the GPS |
|
Methods defined here:
- __init__(self, pins=('P3', 'P4'), baud=9600)
- get_location(self)
- Returns the location-data. Should be used when new_location returns True.
- new_location(self, ttw=5)
- Waits for the GPS to return data with an 'time to wait'-interval.
Returns True if there is a new VALID location.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class HDOP(Value) |
|
HDOP: Horizontal dilution of precision. |
|
- Method resolution order:
- HDOP
- Value
- __builtin__.object
Methods defined here:
- __init__(self, v, t)
- __repr__(self)
- __str__(self)
Methods inherited from Value:
- __float__(self)
- rad(self)
- Returns the value in radians.
- time(self)
- Returns the measurment time.
- unit(self)
- Returns the unit
- value(self)
- Returns the value
Data descriptors inherited from Value:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Location(__builtin__.object) |
|
Location:
Tries to read data received from the GPS.
Sometimes the GPS will return data for som
of the segments, e.g it may happens that
it wont receive the GPGGA-segment every time. |
|
Methods defined here:
- __init__(self)
- __repr__(self)
- altitude(self)
- Returns the altitude
- course(self)
- Returns the course
- hdop(self)
- Returns the precision
- height(self)
- Returns the height
- latitude(self)
- Returns the latitude
- longitude(self)
- Returns the longitude.
- satellites(self)
- Returns the amount of satellites the GPS is connected to.
- set(self, msgid, segment)
- Sets data based on the segment received
msgid, []byte: the segment type, e.g b'$GPGGA'
segment, []byte: the segment itself
- speed(self)
- Returns the speed
- valid(self)
- Returns wether or not the location is valid
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class NMEA(__builtin__.object) |
|
Just a class to describe the type of the received entry.
We should consider removing this to save space. |
|
Methods defined here:
- __init__(self, id)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Value(__builtin__.object) |
|
Defines a value received from the GPS
v, float: floating value
u, string: unit (e.g m, knot etc)
t, tuple: time when measured. |
|
Methods defined here:
- __float__(self)
- __init__(self, v, u, t=(0, 0, 0.0))
- __repr__(self)
- rad(self)
- Returns the value in radians.
- time(self)
- Returns the measurment time.
- unit(self)
- Returns the unit
- value(self)
- Returns the value
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |