Package gaiasky.util.gaia
Class AttitudeConverter
- java.lang.Object
-
- gaiasky.util.gaia.AttitudeConverter
-
public class AttitudeConverter extends java.lang.Object
Convert a given set of heliotropic angles into a quaternion
-
-
Constructor Summary
Constructors Constructor Description AttitudeConverter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static HeliotropicAnglesRates
getHeliotropicAnglesRates(long gt, Attitude att)
Calculate the heliotropic angles and rates for a given attitudestatic Quaterniond[]
getQuaternionAndRate(long gt, HeliotropicAnglesRates h)
Converts heliotropic angles and rates to an attitude quaternion and its derivativestatic Quaterniond[]
heliotropicToQuaternions(double lSun, double xi, double nu, double omega, double lSunDot, double nuDot, double omegaDot)
Converts heliotropic angles and rates to an attitude quaternion and its derivativestatic double[]
heliotropicToQuaternionSrsRates(double lSun, double xi, double nu, double omega, double lSunDot, double nuDot, double omegaDot)
Converts heliotropic angles and rates to the attitude quaternion components and the inertial rates in SRS
-
-
-
Method Detail
-
heliotropicToQuaternions
public static Quaterniond[] heliotropicToQuaternions(double lSun, double xi, double nu, double omega, double lSunDot, double nuDot, double omegaDot)
Converts heliotropic angles and rates to an attitude quaternion and its derivative- Parameters:
lSun
- longitude of the nominal sun [rad]xi
- solar aspect angle [rad]nu
- revolving phase angle [rad]omega
- scan phase angle [rad]lSunDot
- time derivative of lSun [rad/day]nuDot
- time derivative of nu [rad/day]omegaDot
- time derivative of omega [rad/day]- Returns:
- an array of two quaternions, q (the attitude quaternion) and qDot (the time derivative of q, per day)
-
heliotropicToQuaternionSrsRates
public static double[] heliotropicToQuaternionSrsRates(double lSun, double xi, double nu, double omega, double lSunDot, double nuDot, double omegaDot)
Converts heliotropic angles and rates to the attitude quaternion components and the inertial rates in SRS- Parameters:
lSun
- longitude of the nominal sun [rad]xi
- solar aspect angle [rad]nu
- revolving phase angle [rad]omega
- scan phase angle [rad]lSunDot
- time derivative of lSun [rad/day]nuDot
- time derivative of nu [rad/day]omegaDot
- time derivative of omega [rad/day]- Returns:
- double[] array {qx, qy, qz, qw, rateX, rateY, rateZ} with rates in [rad/day]
-
getQuaternionAndRate
public static Quaterniond[] getQuaternionAndRate(long gt, HeliotropicAnglesRates h)
Converts heliotropic angles and rates to an attitude quaternion and its derivative- Parameters:
gt
- GaiaTimeh
- heliotropic angles and their rates in [rad] and [rad/day]- Returns:
-
getHeliotropicAnglesRates
public static HeliotropicAnglesRates getHeliotropicAnglesRates(long gt, Attitude att)
Calculate the heliotropic angles and rates for a given attitude- Parameters:
gt
- Time for the attitudeatt
- attitude- Returns:
-
-