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. (type: Angle or NoneType.)
Instance Variable correctedHeading 0 The heading, corrected for variation. If the variation is unknown (None), is None. This attribute is read-only (its value is determined by the angle and variation attributes). The value is coerced to being between 0 (inclusive) and 360 (exclusive).
Method __init__ Initializes a angle with an optional variation.
Class Method fromFloats Constructs a Heading from the float values of the angle and variation.
Method correctedHeading Corrects the heading by the given variation. This is sometimes known as the true heading.
Method setSign Sets the sign of the variation of this heading.
Method __repr__ Returns a string representation of this angle.

Inherited from FancyEqMixin (via Angle):

Method __eq__ Undocumented
Method __ne__ Undocumented

Inherited from FancyEqMixin (via Angle):

Method __eq__ Undocumented
Method __ne__ Undocumented
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. (type: Angle or NoneType.)
correctedHeading 0 =
The heading, corrected for variation. If the variation is unknown (None), is None. This attribute is read-only (its value is determined by the angle and variation attributes). The value is coerced to being between 0 (inclusive) and 360 (exclusive).
def __init__(self, angle=None, variation=None): (source)

Initializes a 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 @return A Heading with the given values.)
@property
def correctedHeading(self): (source)

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

ReturnsThe heading, corrected by the variation. If the variation or the angle are unknown, returns None. (type: float or NoneType)
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.
def __repr__(self): (source)

Returns a string representation of this angle.

ReturnsThe string representation. (type: str)
API Documentation for Twisted, generated by pydoctor at 2015-11-29 11:40:45.