upoints.nmea.Fix

Package upoints :: Module nmea :: Class Fix |
[hide private]
[frames] | no frames]

# Class Fix

     object --+
              |
    point.Point --+
                  |
                 Fix

Class for representing a GPS NMEA-formatted system fix

Since: 0.8.0

Instance Methods | [hide private]
__init__(self, time, latitude, longitude, quality, satellites, dilution, altitude, geoid_delta, dgps_delta=None, dgps_station=None, mode=None) Initialise a new Fix object |
`str` |
__str__(self) Pretty printed location string |
`str` |
quality_string(self) Return a string version of the quality information |
Inherited from `point.Point`: `__dict__`, `__eq__`, `__hash__`, `__ne__`, `__repr__`, `__unicode__`, `bearing`, `destination`, `distance`, `final_bearing`, `forward`, `inverse`, `midpoint`, `sun_events`, `sunrise`, `sunset`, `to_grid_locator` Inherited from `point.Point` (private): `_set_location` Inherited from `object`: `__delattr__`, `__getattribute__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`

Static Methods | [hide private]
Fix |
parse_elements(elements) Parse essential fix's data elements |

Instance Variables | [hide private]
| fix_quality = ``[``'``Invalid``'``,` `'``GPS``'``,` `'``DGPS``'``,` `'``PPS``'``,` `'``Real Time Kin``...`` List of fix quality integer to string representations
| altitude Altitude above MSL
| dgps_delta Number of seconds since last DGPS sync
| dgps_station Identifier of the last synced DGPS station
| dilution Horizontal dilution at reported position
| geoid_delta Height of geoid's MSL above WGS84 ellipsoid
| latitude Location's latitude
| longitude Locations's longitude
| mode Type of reading
| quality Mode under which the fix was taken
| satellites Number of tracked satellites
| time Time the fix was taken
Inherited from `point.Point`: `rad_latitude`, `rad_longitude`, `timezone`, `units`

Properties | [hide private]
Inherited from `point.Point` (private): `_angle`, `_latitude`, `_longitude`, `_rad_latitude`, `_rad_longitude` Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, time, latitude, longitude, quality, satellites, dilution, altitude, geoid_delta, dgps_delta=None, dgps_station=None, mode=None) (Constructor) |
Initialise a new Fix object
    >>> Fix(datetime.time(14, 20, 27), 52.1380333333, -2.56861166667, 1, 4,
    ...     5.6, 1052.3, 34.5)
    Fix(datetime.time(14, 20, 27), 52.1380333333, -2.56861166667, 1, 4, 5.6,
        1052.3, 34.5, None, None, None)
    >>> Fix(datetime.time(14, 20, 27), 52.1380333333, -2.56861166667, 1, 4,
    ...     5.6, 1052.3, 34.5, 12, 4, None)
    Fix(datetime.time(14, 20, 27), 52.1380333333, -2.56861166667, 1, 4,
        5.6, 1052.3, 34.5, 12, 4, None)
Parameters: `time` (`datetime.time`) - Time the fix was taken `latitude` (`float` or coercible to `float`) - Fix's latitude `longitude` (`float` or coercible to `float`) - Fix's longitude `quality` (`int`) - Mode under which the fix was taken `satellites` (`int`) - Number of tracked satellites `dilution` (`float`) - Horizontal dilution at reported position `altitude` (`float` or coercible to `float`) - Altitude above MSL `geoid_delta` (`float` or coercible to `float`) - Height of geoid's MSL above WGS84 ellipsoid `dgps_delta` (`float` or coercible to `float`) - Number of seconds since last DGPS sync `dgps_station` (`int`) - Identifier of the last synced DGPS station `mode` (`str`) - Type of reading Raises: `ValueError` - Unknown value for `angle` `ValueError` - Unknown value for units `ValueError` - Invalid value for latitude or longitude Overrides: object.__init__

### __str__(self) (Informal representation operator) |
Pretty printed location string
    >>> print(Fix(datetime.time(14, 20, 27), 52.1380333333, -2.56861166667,
    ...           1, 4, 5.6, 1052.3, 34.5))
    $GPGGA,142027,5208.2820,N,00234.1167,W,1,04,5.6,1052.3,M,34.5,M,,*61
    >>> print(Fix(datetime.time(14, 20, 27), 52.1380333333, -2.56861166667,
    ...           1, 4, 5.6, 1052.3, 34.5, 12, 4))
    $GPGGA,142027,5208.2820,N,00234.1167,W,1,04,5.6,1052.3,M,34.5,M,12.0,0004*78
Parameters: `mode` - Coordinate formatting system to use Returns: `str` Human readable string representation of Fix object Raises: `ValueError` - Unknown value for mode Overrides: object.__str__

### quality_string(self) |
Return a string version of the quality information
    >>> fix = Fix(datetime.time(14, 20, 58), 53.1440233333, -3.01542833333,
    ...           1, 4, 5.6, 1374.6, 34.5, None, None)
    >>> print(fix.quality_string())
    GPS
Returns: `str` Quality information as string

### parse_elements(elements) Static Method |
Parse essential fix's data elements
    >>> Fix.parse_elements(["142058", "5308.6414", "N", "00300.9257", "W", "1",
    ...                     "04", "5.6", "1374.6", "M", "34.5", "M", "", ""])
    Fix(datetime.time(14, 20, 58), 53.1440233333, -3.01542833333, 1, 4, 5.6,
        1374.6, 34.5, None, None, None)
    >>> Fix.parse_elements(["142100", "5200.9000", "N", "00316.6600", "W", "1",
    ...                     "04", "5.6", "1000.0", "M", "34.5", "M", "", ""])
    Fix(datetime.time(14, 21), 52.015, -3.27766666667, 1, 4, 5.6, 1000.0, 34.5,
        None, None, None)
Parameters: `elements` (`list`) - Data values for fix Returns: Fix Fix object representing data

Instance Variable Details | [hide private]

  ### fix_quality List of fix quality integer to string representations Value:
      ['Invalid',
       'GPS',
       'DGPS',
       'PPS',
       'Real Time KinematicFloat RTK',
       'Estimated',
       'Manual',
       'Simulation']