testapi

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a websocket client for calling the n-vector test API.

func NewClient

func NewClient() (*Client, error)

NewClient creates a new websocket client for calling the n-vector test API.

func (*Client) Close

func (c *Client) Close() error

Close closes the websocket connection.

func (*Client) Delta

func (c *Client) Delta(
	ctx context.Context,
	from nvector.Position,
	to nvector.Position,
	e nvector.Ellipsoid,
	f nvector.Matrix,
) (nvector.Vector, error)

Delta finds a delta ECEF position vector from a reference n-vector, a depth, and a target n-vector.

func (*Client) Destination

func (c *Client) Destination(
	ctx context.Context,
	from nvector.Position,
	delta nvector.Vector,
	e nvector.Ellipsoid,
	f nvector.Matrix,
) (nvector.Position, error)

Destination finds a n-vector from a reference n-vector, a depth, and a delta ECEF position vector.

func (*Client) EulerXYZToRotationMatrix added in v0.1.3

func (c *Client) EulerXYZToRotationMatrix(
	ctx context.Context,
	a nvector.EulerXYZ,
) (nvector.Matrix, error)

EulerXYZToRotationMatrix converts Euler angles in XYZ order to a rotation matrix.

func (*Client) EulerZYXToRotationMatrix added in v0.1.3

func (c *Client) EulerZYXToRotationMatrix(
	ctx context.Context,
	a nvector.EulerZYX,
) (nvector.Matrix, error)

EulerZYXToRotationMatrix converts Euler angles in ZYX order to a rotation matrix.

func (*Client) FromECEF

func (c *Client) FromECEF(
	ctx context.Context,
	v nvector.Vector,
	e nvector.Ellipsoid,
	f nvector.Matrix,
) (nvector.Position, error)

FromECEF converts an ECEF position vector to an n-vector and depth.

func (*Client) FromGeodeticCoordinates

func (c *Client) FromGeodeticCoordinates(
	ctx context.Context,
	gc nvector.GeodeticCoordinates,
	f nvector.Matrix,
) (nvector.Vector, error)

FromGeodeticCoordinates converts geodetic coordinates to an n-vector.

func (*Client) FromRotationMatrix

func (c *Client) FromRotationMatrix(
	ctx context.Context,
	r nvector.Matrix,
) (nvector.Vector, error)

FromRotationMatrix converts a rotation matrix to an n-vector.

func (*Client) RotationMatrixToEulerXYZ added in v0.1.3

func (c *Client) RotationMatrixToEulerXYZ(
	ctx context.Context,
	r nvector.Matrix,
) (nvector.EulerXYZ, error)

RotationMatrixToEulerXYZ converts a rotation matrix to Euler angles in XYZ order.

func (*Client) RotationMatrixToEulerZYX added in v0.1.3

func (c *Client) RotationMatrixToEulerZYX(
	ctx context.Context,
	r nvector.Matrix,
) (nvector.EulerZYX, error)

RotationMatrixToEulerZYX converts a rotation matrix to Euler angles in ZYX order.

func (*Client) ToECEF

func (c *Client) ToECEF(
	ctx context.Context,
	v nvector.Position,
	e nvector.Ellipsoid,
	f nvector.Matrix,
) (nvector.Vector, error)

ToECEF converts an n-vector and depth to an ECEF position vector.

func (*Client) ToGeodeticCoordinates

func (c *Client) ToGeodeticCoordinates(
	ctx context.Context,
	v nvector.Vector,
	f nvector.Matrix,
) (nvector.GeodeticCoordinates, error)

ToGeodeticCoordinates converts an n-vector to geodetic coordinates.

func (*Client) ToRotationMatrix

func (c *Client) ToRotationMatrix(
	ctx context.Context,
	v nvector.Vector,
	f nvector.Matrix,
) (nvector.Matrix, error)

ToRotationMatrix converts an n-vector to a rotation matrix.

func (*Client) ToRotationMatrixUsingWanderAzimuth

func (c *Client) ToRotationMatrixUsingWanderAzimuth(
	ctx context.Context,
	v nvector.Vector,
	w float64,
	f nvector.Matrix,
) (nvector.Matrix, error)

ToRotationMatrixUsingWanderAzimuth converts an n-vector and a wander azimuth angle to a rotation matrix.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL