nvector.objects.Nvector — nvector 0.7.5 documentation

# nvector.objects.Nvector

class `Nvector`(normal, z=0, frame=None)

  Geographical position given as n-vector and depth in frame E

  Parameters
    normal: 3 x n array

      n-vector(s) [no unit] decomposed in E.

    z: real scalar or vector of length n.

      Depth(s) [m] relative to the ellipsoid (depth = -height)

    frame: FrameE object

      reference ellipsoid. The default ellipsoid model used is WGS84, but other ellipsoids/spheres might be specified.

  See also

  `GeoPoint`, `ECEFvector`, `Pvector`

  Notes

  The position of B (typically body) relative to E (typically Earth) is given into this function as n-vector, n_EB_E and a depth, z relative to the ellipsiod.

  Examples

      >>> import nvector as nv
      >>> wgs84 = nv.FrameE(name='WGS84')
      >>> point_a = wgs84.GeoPoint(-41.32, 174.81, degrees=True)
      >>> point_b = wgs84.GeoPoint(40.96, -5.50, degrees=True)
      >>> nv_a = point_a.to_nvector()
      >>> print(nv_a)
      Nvector(normal=[[-0.7479546170813224], [0.06793758070955484], [-0.6602638683996461]],
              z=0,
              frame=FrameE(a=6378137.0,
                          f=0.0033528106647474805,
                          name='WGS84',
                          R_Ee=[[0.0, 0.0, 1.0], [0.0, 1.0, 0.0], [-1.0, 0.0, 0.0]]))

  `__init__`(self, normal, z=0, frame=None)

    Initialize self. See help(type(self)) for accurate signature.

  Methods

  `__init__`(self, normal[, z, frame]) | Initialize self.
  `delta_to`(self, other) | Returns cartesian delta vector from positions a to b decomposed in N.
  `mean`(self) | Returns mean position of the n-vectors.
  `mean_horizontal_position`(\*args, \*\*kwds) | mean_horizontal_position is deprecated!
  `to_ecef_vector`(self) | Returns position as ECEFvector object.
  `to_geo_point`(self) | Returns position as GeoPoint object.
  `to_nvector`(self) | Returns position as Nvector object.
  `unit`(self) | Normalizes self to unit vector(s)