Return the approximate equirectangular when the location is close to
        the center of the cluster.

        For small distances, Pythagoras’ theorem can be used on an
        equirectangular projection.

        Equirectangular formula::

            x = Δλ ⋅ cos φm
            y = Δφ
            d = R ⋅ √(x² + y)²

        It will always over-estimate compared to the real Haversine distance.
        For example it will add no more than 0.05382 % to the real distance if
        the delta latitude or longitude between your two points does not
        exceed 4 decimal degrees.

        The standard formula (Haversine) is the exact one (that is, it works
        for any couple of longitude/latitude on earth) but is much slower as
        it needs 7 trigonometric and 2 square roots.  If your couple of points
        are not too far apart, and absolute precision is not paramount, you
        can use this approximate version (Equirectangular), which is much
        faster as it uses only one trigonometric and one square root::

            Python 2.7.6rc1 (v2.7.6rc1:4913d0e9be30+, Oct 27 2013, 20:52:11)
            [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
            Type "help", "copyright", "credits" or "license" for more information.
            >>> from majormode.perseus.model.geolocation import GeoPoint
            >>> import time
            >>>
            >>> source = GeoPoint(106.739036, 10.797977)
            >>> destination = GeoPoint(106.743325, 10.800195)
            >>>
            >>> start_time = time.time()
            >>> for i in xrange(1000000):
            ...     d = source.great_circle_distance(destination)
            ...
            >>> print time.time() - start_time
            5.62202811241
            >>> print d
            529.424701041
            >>>
            >>> start_time = time.time()
            >>> for i in xrange(1000000):
            ...     d = source.equirectangular_distance(destination)
            ...
            >>> print time.time() - start_time
            2.78262710571
            >>> print d
            529.424701073
            >>>

        @param other: a ``GeoPoint`` instance.

        @return: the great-circle distance, in meters, between this geographic
            coordinates to the specified other point.

def equirectangular_distance(self, other):
        """
        Return the approximate equirectangular when the location is close to
        the center of the cluster.

        For small distances, Pythagoras’ theorem can be used on an
        equirectangular projection.

        Equirectangular formula::

            x = Δλ ⋅ cos φm
            y = Δφ
            d = R ⋅ √(x² + y)²

        It will always over-estimate compared to the real Haversine distance.
        For example it will add no more than 0.05382 % to the real distance if
        the delta latitude or longitude between your two points does not
        exceed 4 decimal degrees.

        The standard formula (Haversine) is the exact one (that is, it works
        for any couple of longitude/latitude on earth) but is much slower as
        it needs 7 trigonometric and 2 square roots.  If your couple of points
        are not too far apart, and absolute precision is not paramount, you
        can use this approximate version (Equirectangular), which is much
        faster as it uses only one trigonometric and one square root::

            Python 2.7.6rc1 (v2.7.6rc1:4913d0e9be30+, Oct 27 2013, 20:52:11)
            [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
            Type "help", "copyright", "credits" or "license" for more information.
            >>> from majormode.perseus.model.geolocation import GeoPoint
            >>> import time
            >>>
            >>> source = GeoPoint(106.739036, 10.797977)
            >>> destination = GeoPoint(106.743325, 10.800195)
            >>>
            >>> start_time = time.time()
            >>> for i in xrange(1000000):
            ...     d = source.great_circle_distance(destination)
            ...
            >>> print time.time() - start_time
            5.62202811241
            >>> print d
            529.424701041
            >>>
            >>> start_time = time.time()
            >>> for i in xrange(1000000):
            ...     d = source.equirectangular_distance(destination)
            ...
            >>> print time.time() - start_time
            2.78262710571
            >>> print d
            529.424701073
            >>>

        @param other: a ``GeoPoint`` instance.

        @return: the great-circle distance, in meters, between this geographic
            coordinates to the specified other point.
        """
        x = math.radians(other.longitude - self.longitude) \
                * math.cos(math.radians(other.latitude + self.latitude) / 2);
        y = math.radians(other.latitude - self.latitude);
        return math.sqrt(x * x + y * y) * GeoPoint.EARTH_RADIUS_METERS;