dynamics

package
v0.0.0-...-0502445 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cartesian2Spherical

func Cartesian2Spherical(a []float64) (b []float64)

Cartesian2Spherical returns the provided Cartesian coordinates vector in spherical.

func Deg2rad

func Deg2rad(a float64) float64

Deg2rad converts degrees to radians.

func Rad2deg

func Rad2deg(a float64) float64

Rad2deg converts radians to degrees.

func Spherical2Cartesian

func Spherical2Cartesian(a []float64) (b []float64)

Spherical2Cartesian returns the provided spherical coordinates vector in Cartesian.

Types

type Attitude

type Attitude struct {
	Attitude      *MRP
	Velocity      *mat64.Vector
	InertiaTensor *mat64.Dense
	// contains filtered or unexported fields
}

Attitude defines an attitude with an orientation, an angular velocity and an inertial tensor. *ALMOST* implements rk4.Integrable.

func NewAttitude

func NewAttitude(sigma, omega [3]float64, tensor []float64) *Attitude

NewAttitude returns an Attitude pointer.

func (*Attitude) Func

func (a *Attitude) Func(t float64, s []float64) []float64

Func is the integrator function.

func (*Attitude) GetState

func (a *Attitude) GetState() []float64

GetState returns the state of this attitude for the EOM as defined below.

func (*Attitude) Momentum

func (a *Attitude) Momentum() float64

Momentum returns the angular moment of this body.

func (*Attitude) SetState

func (a *Attitude) SetState(t float64, s []float64)

SetState sets the state of this attitude for the EOM as defined below.

type MRP

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

MRP defines Modified Rodrigez Parameters.

func (*MRP) B

func (s *MRP) B() *mat64.Dense

B returns the B matrix for MRP computations.

func (*MRP) Equals

func (s *MRP) Equals(o *MRP) bool

Equals returns true if both MRPs correspond to the same attitude.

func (*MRP) OuterProduct

func (s *MRP) OuterProduct(m float64) *mat64.Dense

OuterProduct returns the outer product of this MRP with itself. The m parameter allows to multiply directly the outer product with a scalar.

func (*MRP) Short

func (s *MRP) Short()

Short refreshes this MRP representation to use its short notation.

func (*MRP) Tilde

func (s *MRP) Tilde(m float64) *mat64.Dense

Tilde returns the tilde matrix of this MRP. The m parameter allows to multiply directly the Tilde matrix.

Jump to

Keyboard shortcuts

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