def to4xyzh(self): '''Convert this (geodetic) point to n-vector (normal to the earth's surface) x/y/z components and height. @return: 4-Tuple (x, y, z, h) in (meter). ''' # Kenneth Gade eqn (3), but using right-handed # vector x -> 0°E,0°N, y -> 90°E,0°N, z -> 90°N # a, b = self.to2ab() # ca = cos(a) # x, y, z = ca * cos(b), ca * sin(b), sin(a) return LatLonHeightBase.to3xyz(self) + (self.height, )
def to4xyzh(self): '''Convert this (geodetic) point to n-vector (normal to the earth's surface) x/y/z components and height. @return: 4-Tuple (x, y, z, h) in (C{meter}). ''' # Kenneth Gade eqn (3), but using right-handed # vector x -> 0°E,0°N, y -> 90°E,0°N, z -> 90°N # a, b = self.to2ab() # sa, ca, sb, cb = sincos2(a, b) # x, y, z = ca * cb, ca * sb, sa # XXX don't use self.to3xyz() + .... return LatLonHeightBase.to3xyz(self) + (self.height, )
def to4xyzh(self, h=None): '''Convert this (geodetic) point to n-vector (normal to the earth's surface) x/y/z components and height. @keyword h: Optional height, overriding this point's height (C{meter}). @return: A L{Vector4Tuple}C{(x, y, z, h)}, all in (C{meter}). ''' # Kenneth Gade eqn (3), but using right-handed # vector x -> 0°E,0°N, y -> 90°E,0°N, z -> 90°N # a, b = self.to2ab() # sa, ca, sb, cb = sincos2(a, b) # x, y, z = ca * cb, ca * sb, sa # XXX don't use self.to3xyz() + .... x, y, z = LatLonHeightBase.to3xyz(self) r = Vector4Tuple(x, y, z, self.height if h is None else h) return self._xnamed(r)