The Latitude class

class nvgr.Latitude(deg: float = 0.0)

Bases: object

The latitude in degrees N (positive) or S (negative)

Attributes

degreesfloat

the latitude in degrees: -90 <= degrees <= -90

radiansfloat, readonly

the latitude in radians: -Pi/2 <= radians <= Pi/2

Members

__add__(other) - Add a latitude

__sub__(other) - Subtract a latitude

__str__() - Returns the latitude as a string

parse(fmt: str) - Parse a string into a latitude

property degrees

Gets the latitude in degrees

Returns

float

the latitude in degrees: -90 <= degrees <= 90

classmethod parse(fmt: str) Latitude

Parse a latitude in the format: 00-00.0N or 00-00.0S

Parameters

fmtstr

the string to parse into a latitude

Returns

Latitude :

the new latitude

property radians

Gets the latitude in radians

Returns

float

the latitude in radians: -Pi/2 <= radians <= Pi/2