twisted.positioning.base.PositionError(FancyEqMixin, object) class documentationtwisted.positioning.base
          View Source
          (View In Hierarchy)
        
      Position error information.
| Instance Variable | pdop | The position dilution of precision. None if unknown. (type: float or NoneType) | 
  
| Instance Variable | hdop | The horizontal dilution of precision. None if unknown. (type: float or NoneType) | 
  
| Instance Variable | vdop | The vertical dilution of precision. None if unknown. (type: float or NoneType) | 
  
| Method | __init__ | Initializes a positioning error object. | 
| Method | __repr__ | Returns a string representation of positioning information object. | 
| Class Variable | _ALLOWABLE_THRESHOLD | The maximum allowable difference between PDOP and the geometric mean of 
VDOP and HDOP. That difference is supposed to be zero, but can be non-zero 
because of rounding error and limited reporting precision. You should never
have to change this value. (type: float) | 
  
| Class Variable | _DOP_EXPRESSIONS | A mapping of DOP types (C[hvp]dop) to a list of callables that take self 
and return that DOP type, or raise TypeError. This allows a 
DOP value to either be returned directly if it's know, or computed from 
other DOP types if it isn't. (type: dict of str to callables) | 
  
| Method | _testDilutionOfPositionInvariant | Tests if this positioning error object satisfies the dilution of 
position invariant (PDOP = (HDOP**2 + VDOP**2)*.5), unless the 
self._testInvariant instance variable is 
False. | 
  
| Method | _getDOP | Gets a particular dilution of position value. | 
| Method | _setDOP | Sets a particular dilution of position value. | 
Inherited from FancyEqMixin:
| Method | __eq__ | Undocumented | 
| Method | __ne__ | Undocumented | 
float)
  TypeError. This allows a 
DOP value to either be returned directly if it's know, or computed from 
other DOP types if it isn't. (type: dict of str to callables)
  Initializes a positioning error object.
| Parameters | pdop | The position dilution of precision. None if unknown. (type: float or NoneType) | 
| hdop | The horizontal dilution of precision. None if unknown. (type: float or NoneType) | |
| vdop | The vertical dilution of precision. None if unknown. (type: float or NoneType) | |
| testInvariant | Flag to test if the DOP invariant is valid or not. If True, 
the invariant (PDOP = (HDOP**2 + VDOP**2)*.5) is checked at every mutation.
By default, this is false, because the vast majority of DOP-providing 
devices ignore this invariant. (type: c{bool}) | 
Tests if this positioning error object satisfies the dilution of 
position invariant (PDOP = (HDOP**2 + VDOP**2)*.5), unless the 
self._testInvariant instance variable is 
False.
| Returns | None if the invariant was not satisfied or not tested. | |
| Raises | ValueError | Raised if the invariant was tested but not satisfied. | 
Gets a particular dilution of position value.
| Parameters | dopType | The type of dilution of position to get. One of ('pdop', 'hdop', 'vdop'). (type: str) | 
| Returns | The DOP if it is known, None otherwise. (type: float or NoneType) | |
Sets a particular dilution of position value.
| Parameters | dopType | The type of dilution of position to set. One of ('pdop', 'hdop', 'vdop'). (type: str) | 
| value | The value to set the dilution of position type to. (type: float
If this position error tests dilution of precision invariants, it will 
be checked. If the invariant is not satisfied, the assignment will be 
undone and   | 
Returns a string representation of positioning information object.
| Returns | The string representation. (type: str) | |