astronomy

//astronomy/io.github.cosinekitty.astronomy/StateVector

StateVector

data class StateVector(x: Double, y: Double, z: Double, vx: Double, vy: Double, vz: Double, t: Time)

Represents a combined position vector and velocity vector at a given moment in time.

Constructors

   
StateVector
fun StateVector(pos: Vector, vel: Vector, time: Time)
Combines a position vector and a velocity vector into a single state vector.
 
StateVector
fun StateVector(x: Double, y: Double, z: Double, vx: Double, vy: Double, vz: Double, t: Time)
 

Functions

Name Summary
div
operator fun div(denom: Double): StateVector
Divides a state vector by a scalar.
 
minus
operator fun minus(other: StateVector): StateVector
Subtracts two state vetors, yielding the state vector difference.
 
plus
operator fun plus(other: StateVector): StateVector
Adds two state vetors, yielding the state vector sum.
 
position
fun position(): Vector
Returns the position vector associated with this state vector.
 
unaryMinus
operator fun unaryMinus(): StateVector
Negates a state vector; the same as multiplying the state vector by the scalar -1.
 
velocity
fun velocity(): Vector
Returns the velocity vector associated with this state vector.
 

Properties

Name Summary
t
val t: Time
The date and time at which this vector is valid.
 
vx
val vx: Double
A Cartesian velocity x-component expressed in AU/day.
 
vy
val vy: Double
A Cartesian velocity y-component expressed in AU/day.
 
vz
val vz: Double
A Cartesian velocity z-component expressed in AU/day.
 
x
val x: Double
A Cartesian position x-coordinate expressed in AU.
 
y
val y: Double
A Cartesian position y-coordinate expressed in AU.
 
z
val z: Double
A Cartesian position z-coordinate expressed in AU.