Next / Previous / Contents / TCC Help System / NM Tech homepage

12. class LatLon: Observer latitude and longitude

An instance of this class represents a position on the earth's surface as a latitude (signed, positive for north of the equator) and a longitude (east from longitude 0°).

sidereal.py
# - - - - -   c l a s s   L a t L o n

class LatLon:
    """Represents a latitude+longitude.
    """

12.1. LatLon.__init__(): Constructor

The constructor takes the values directly in radians, and stores them that way. The longitude is normalized to the interval [0, 2π).

sidereal.py
# - - -  L a t L o n . _ _ i n i t _ _

    def __init__ ( self, lat, lon ):
        """Constructor for LatLon.
        """
        self.lat  =  lat
        self.lon  =  lon % TWO_PI