class documentation

class twisted.positioning.base.Heading(Angle): (source)

View In Hierarchy

The heading of a mobile object.

Instance Variable variation The (optional) magnetic variation. The sign of the variation is positive for variations towards the east (clockwise from north), and negative for variations towards the west (counterclockwise from north). If the variation is unknown or not applicable, this is None.
Property correctedHeading Corrects the heading by the given variation. This is sometimes known as the true heading.
Method __init__ Initializes an angle with an optional variation.
Class Method fromFloats Constructs a Heading from the float values of the angle and variation.
Method setSign Sets the sign of the variation of this heading.
Class Variable compareAttributes Undocumented
Method __repr__ Returns a string representation of this angle.

Inherited from Angle:

Instance Variable angleType Undocumented
Property inDecimalDegrees The value of this angle in decimal degrees. This value is immutable.
Property inDegreesMinutesSeconds The value of this angle as a degrees, minutes, seconds tuple. This value is immutable.
Method __float__ Returns this angle as a float.
Class Variable _RANGE_EXPRESSIONS A collection of expressions for the allowable range for the angular value of a particular coordinate value.
Class Variable _ANGLE_TYPE_NAMES English names for angle types.
Instance Variable _angle Undocumented
Property _angleValueRepr Returns a string representation of the angular value of this angle.
Property _angleTypeNameRepr Returns a string representation of the type of this angle.

Inherited from FancyEqMixin (via Angle):

Method __eq__ Undocumented
Method __ne__ Undocumented
variation = (source)
The (optional) magnetic variation. The sign of the variation is positive for variations towards the east (clockwise from north), and negative for variations towards the west (counterclockwise from north). If the variation is unknown or not applicable, this is None.
(type: Angle or None.)
@property
correctedHeading = (source)

Corrects the heading by the given variation. This is sometimes known as the true heading.

(type: float or None)
def __init__(self, angle=None, variation=None): (source)

Initializes an angle with an optional variation.

@classmethod
def fromFloats(cls, angleValue=None, variationValue=None): (source)

Constructs a Heading from the float values of the angle and variation.

ParametersangleValueThe angle value of this heading. (type: float)
variationValueThe value of the variation of this heading. (type: float)
ReturnsA Heading with the given values.
def setSign(self, sign): (source)

Sets the sign of the variation of this heading.

ParameterssignThe new sign. 1 for positive and -1 for negative signs, respectively. (type: int)
RaisesValueErrorIf the sign parameter is not -1 or 1.
compareAttributes = (source)
def __repr__(self): (source)

Returns a string representation of this angle.

ReturnsThe string representation. (type: str)
API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.