5.1.12. nvector.objects.Nvector

class Nvector(normal, z=0, frame=None)[source]

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.

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',
                    axes='e'))
__init__(normal, z=0, frame=None)[source]

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

Methods

__init__(normal[, z, frame])

Initialize self.

delta_to(other)

Returns cartesian delta vector from positions a to b decomposed in N.

interpolate(t_i, t[, kind, window_length, …])

Returns interpolated values from nvector data.

mean()

Returns mean position of the n-vectors.

mean_horizontal_position(**kwds)

mean_horizontal_position is deprecated, use mean instead!

to_ecef_vector()

Returns position as ECEFvector object.

to_geo_point()

Returns position as GeoPoint object.

to_nvector()

Returns position as Nvector object.

unit()

Normalizes self to unit vector(s)

Attributes

scalar

True if the position is a scalar point