mirror of
https://github.com/nasa/trick.git
synced 2024-12-19 21:27:54 +00:00
Convert old units to udunits in test code
Changed all of the old units to the new udunit strings. refs #261
This commit is contained in:
parent
adfecdef11
commit
35cec634e5
@ -11,12 +11,12 @@ PROGRAMMERS: ( (Keith Vetter) (Titan) (8-20-2002) )
|
||||
typedef struct {
|
||||
|
||||
short si[3] ; /* ohm -- */
|
||||
int i[3] ; /* M -- */
|
||||
int i[3] ; /* m -- */
|
||||
long l[3] ; /* amp -- */
|
||||
float f[3] ; /* M/s2 -- */
|
||||
double d[3] ; /* kg*M/s2 -- */
|
||||
float f[3] ; /* m/s2 -- */
|
||||
double d[3] ; /* kg*m/s2 -- */
|
||||
unsigned short us[3] ; /* N -- */
|
||||
unsigned int ui[3] ; /* dB -- */
|
||||
unsigned int ui[3] ; /* cnt -- */
|
||||
unsigned long ul[3] ; /* v -- */
|
||||
long long ll[3] ; /* K -- */
|
||||
|
||||
|
@ -200,8 +200,8 @@ class ClassOfEverything {
|
||||
float * fap[4] ; /* kg blah */
|
||||
float ** fpp ; /* kg blah */
|
||||
|
||||
float f_rad ; /* r float test value */
|
||||
double d_deg ; /* d blah */
|
||||
float f_rad ; /* rad float test value */
|
||||
double d_deg ; /* degree blah */
|
||||
|
||||
char c ; /* -- blah */
|
||||
char ca[20] ; /* -- blah */
|
||||
|
@ -13,9 +13,9 @@ PROGRAMMERS: ( (Keith Vetter) (Titan) (8-20-2002) )
|
||||
|
||||
typedef struct { /* SCHEDULE ------------------------------------------------*/
|
||||
|
||||
double pos ; /* M Position */
|
||||
double vel ; /* M/s Velocity */
|
||||
double acc ; /* M/s2 Acceleration */
|
||||
double pos ; /* m Position */
|
||||
double vel ; /* m/s Velocity */
|
||||
double acc ; /* m/s2 Acceleration */
|
||||
double mass ; /* kg Mass */
|
||||
int amf ; /* -- Just a test variable */
|
||||
int amf_error ; /* -- Order error occured in amf job */
|
||||
|
@ -26,7 +26,7 @@ typedef struct { /* BSTATE_IN ------------------------------------------------*/
|
||||
double mass ; /**< (kg) Total mass */
|
||||
double position[2] ; /**< (m) X(horizontal),Y(vertical) position */
|
||||
double speed ; /**< (m/s) Linear speed */
|
||||
double elevation ; /**< (r) Trajectory angle with respect to the horizontal */
|
||||
double elevation ; /**< (rad) Trajectory angle with respect to the horizontal */
|
||||
int print_off; /**< (--) Set to nonzero to suppress output */
|
||||
} BSTATE_IN ; /*--------------------------------------------------------------*/
|
||||
|
||||
|
@ -22,14 +22,14 @@ typedef struct { /* BALT_IN --------------------------------------------------*/
|
||||
|
||||
Flag add_noise ; /* -- Yes = Add noise to sensed altitude */
|
||||
Flag add_bias ; /* -- Yes = Add bias to sensed altitude */
|
||||
double noise ; /* M 1 sigma noise */
|
||||
double bias ; /* M Measurement bias */
|
||||
double noise ; /* m 1 sigma noise */
|
||||
double bias ; /* m Measurement bias */
|
||||
|
||||
} BALT_IN ; /*----------------------------------------------------------------*/
|
||||
|
||||
typedef struct { /* BALT_OUT -------------------------------------------------*/
|
||||
|
||||
double altitude ; /* M Sensed altitude */
|
||||
double altitude ; /* m Sensed altitude */
|
||||
|
||||
} BALT_OUT ; /*---------------------------------------------------------------*/
|
||||
|
||||
|
@ -23,10 +23,10 @@ PROGRAMMERS:
|
||||
typedef struct { /* BCONTROL_IN ----------------------------------------------*/
|
||||
|
||||
Flag active ; /* -- Yes = control system active */
|
||||
double target_altitude ; /* M Altitude to achieve and hold */
|
||||
double dead_zone ; /* M delta altitude about target altitude where
|
||||
double target_altitude ; /* m Altitude to achieve and hold */
|
||||
double dead_zone ; /* m delta altitude about target altitude where
|
||||
no jets are fired */
|
||||
double max_rate ; /* M/s Maximum allowed altitude rate of change */
|
||||
double max_rate ; /* m/s Maximum allowed altitude rate of change */
|
||||
|
||||
} BCONTROL_IN ; /*------------------------------------------------------------*/
|
||||
|
||||
@ -38,8 +38,8 @@ typedef struct { /* BCONTROL_OUT ---------------------------------------------*/
|
||||
|
||||
typedef struct { /* BCONTROL_WORK --------------------------------------------*/
|
||||
|
||||
double last_altitude ; /* *io M Sensed altitude from last pass */
|
||||
double rate_est ; /* M/s Estimated altitude rate of change */
|
||||
double last_altitude ; /* *io m Sensed altitude from last pass */
|
||||
double rate_est ; /* m/s Estimated altitude rate of change */
|
||||
|
||||
} BCONTROL_WORK ; /*----------------------------------------------------------*/
|
||||
|
||||
|
@ -23,15 +23,15 @@ typedef struct { /* BSTATE_IN ------------------------------------------------*/
|
||||
|
||||
/*=== Initial Ball States ===*/
|
||||
double mass ; /* kg Total mass */
|
||||
double position[2] ; /* M X(horizontal),Y(vertical) position */
|
||||
double speed ; /* M/s Linear speed */
|
||||
double elevation ; /* r Trajectory angle with respect
|
||||
double position[2] ; /* m X(horizontal),Y(vertical) position */
|
||||
double speed ; /* m/s Linear speed */
|
||||
double elevation ; /* rad Trajectory angle with respect
|
||||
to the horizontal */
|
||||
/* DYNAMIC EVENT INPUTS */
|
||||
double floor_y_pos ; /* M Horizontal floor location on Y axis */
|
||||
double right_wall_x_pos ;/* M Vertical right wall location on X axis */
|
||||
double ceiling_y_pos ; /* M Horizontal ceiling location on Y axis */
|
||||
double left_wall_x_pos ; /* M Vertical left wall location on X axis */
|
||||
double floor_y_pos ; /* m Horizontal floor location on Y axis */
|
||||
double right_wall_x_pos ;/* m Vertical right wall location on X axis */
|
||||
double ceiling_y_pos ; /* m Horizontal ceiling location on Y axis */
|
||||
double left_wall_x_pos ; /* m Vertical left wall location on X axis */
|
||||
REGULA_FALSI floor ; /* -- Dynamic event params for floor impact */
|
||||
REGULA_FALSI right_wall ;/* -- Dynamic event params for right wall impact*/
|
||||
REGULA_FALSI ceiling ; /* -- Dynamic event params for ceiling impact */
|
||||
@ -41,10 +41,10 @@ typedef struct { /* BSTATE_IN ------------------------------------------------*/
|
||||
|
||||
typedef struct { /* BSTATE_OUT -----------------------------------------------*/
|
||||
|
||||
double position[2] ; /* M X(horizontal), Y(vertical) position */
|
||||
double position[2] ; /* m X(horizontal), Y(vertical) position */
|
||||
double Frequency ; /* (Hz) Total mass */
|
||||
double velocity[2] ; /* M/s X,Y velocity */
|
||||
double acceleration[2] ; /* M/s2 X,Y acceleration */
|
||||
double velocity[2] ; /* m/s X,Y velocity */
|
||||
double acceleration[2] ; /* m/s2 X,Y acceleration */
|
||||
double external_force[2] ; /* N Total external force on ball */
|
||||
|
||||
} BSTATE_OUT ; /*-------------------------------------------------------------*/
|
||||
|
@ -34,9 +34,9 @@ dyn.baseball.vel[0] = 43.30
|
||||
dyn.baseball.vel[1] = 0.0
|
||||
dyn.baseball.vel[2] = 25.0
|
||||
|
||||
dyn.baseball.theta = trick.attach_units("d" , -90.0)
|
||||
dyn.baseball.phi = trick.attach_units("d" , 1.0)
|
||||
dyn.baseball.omega0 = trick.attach_units("rev/s" , 30.0)
|
||||
dyn.baseball.theta = trick.attach_units("degree" , -90.0)
|
||||
dyn.baseball.phi = trick.attach_units("degree" , 1.0)
|
||||
dyn.baseball.omega0 = trick.attach_units("revolution/s" , 30.0)
|
||||
|
||||
dyn_integloop.getIntegrator(trick.Runge_Kutta_4, 6)
|
||||
|
||||
|
@ -6,9 +6,9 @@ dyn.baseball.vel[0] = -30.0
|
||||
dyn.baseball.vel[1] = -0.1
|
||||
dyn.baseball.vel[2] = 1.0
|
||||
|
||||
dyn.baseball.theta = trick.attach_units("d",-90.0)
|
||||
dyn.baseball.phi = trick.attach_units("d",1.0)
|
||||
dyn.baseball.omega0 = trick.attach_units("rev/s",30.0)
|
||||
dyn.baseball.theta = trick.attach_units("degree",-90.0)
|
||||
dyn.baseball.phi = trick.attach_units("degree",1.0)
|
||||
dyn.baseball.omega0 = trick.attach_units("revolution/s",30.0)
|
||||
|
||||
dyn_integloop.getIntegrator(trick.Runge_Kutta_4, 6)
|
||||
trick.exec_set_terminate_time(5.2)
|
||||
|
@ -6,9 +6,9 @@ dyn.baseball.vel[0] = -30.0
|
||||
dyn.baseball.vel[1] = -0.1
|
||||
dyn.baseball.vel[2] = 1.0
|
||||
|
||||
dyn.baseball.theta = trick.attach_units("d",-90.0)
|
||||
dyn.baseball.phi = trick.attach_units("d",1.0)
|
||||
dyn.baseball.omega0 = trick.attach_units("rev/s",30.0)
|
||||
dyn.baseball.theta = trick.attach_units("degree",-90.0)
|
||||
dyn.baseball.phi = trick.attach_units("degree",1.0)
|
||||
dyn.baseball.omega0 = trick.attach_units("revolution/s",30.0)
|
||||
|
||||
dyn_integloop.getIntegrator(trick.Runge_Kutta_4, 6)
|
||||
trick.exec_set_terminate_time(5.2)
|
||||
|
@ -47,9 +47,9 @@ dyn.baseball.vel[0] = 43.30
|
||||
dyn.baseball.vel[1] = 0.0
|
||||
dyn.baseball.vel[2] = 25.0
|
||||
|
||||
dyn.baseball.theta = trick.attach_units("d" , -90.0)
|
||||
dyn.baseball.phi = trick.attach_units("d" , 1.0)
|
||||
dyn.baseball.omega0 = trick.attach_units("rev/s" , 30.0)
|
||||
dyn.baseball.theta = trick.attach_units("degree" , -90.0)
|
||||
dyn.baseball.phi = trick.attach_units("degree" , 1.0)
|
||||
dyn.baseball.omega0 = trick.attach_units("revolution/s" , 30.0)
|
||||
|
||||
dyn_integloop.getIntegrator(trick.Runge_Kutta_4, 6)
|
||||
|
||||
|
@ -33,7 +33,7 @@ class BallStateInput {
|
||||
double mass; /**< trick_units(kg) Total mass. */
|
||||
double position[2]; /**< trick_units(m) X(horizontal), Y(vertical) position. */
|
||||
double speed; /**< trick_units(m/s) Linear speed. */
|
||||
double elevation; /**< trick_units(r) Trajectory angle with respect to the horizontal. */
|
||||
double elevation; /**< trick_units(rad) Trajectory angle with respect to the horizontal. */
|
||||
|
||||
BallStateInput() ;
|
||||
};
|
||||
|
@ -43,7 +43,7 @@ class Satellite {
|
||||
double Iinv[3][3]; /* (--) */
|
||||
double Rdot[3][3]; /* (--) */
|
||||
double vel[3]; /* (m/s) Vehicle velocity in world frame. */
|
||||
double omega[3]; /* (r/s) Angular velocity. */
|
||||
double omega[3]; /* (rad/s) Angular velocity. */
|
||||
double Rplat[3][3]; /* (--) Vehicle platform to World rotation matrix. */
|
||||
|
||||
double force[3]; /* (kg*m/s2) Force on vehicle. */
|
||||
|
@ -28,8 +28,8 @@ if STRIPCHART:
|
||||
""" LOCATION """
|
||||
""" ======================================== """
|
||||
# JSC MAIN Gate
|
||||
sun_predictor.sun.observer_latitude = trick.sim_services.attach_units("d" , 29.55298)
|
||||
sun_predictor.sun.observer_longitude = trick.sim_services.attach_units("d" , 95.09379)
|
||||
sun_predictor.sun.observer_latitude = trick.sim_services.attach_units("degree" , 29.55298)
|
||||
sun_predictor.sun.observer_longitude = trick.sim_services.attach_units("degree" , 95.09379)
|
||||
|
||||
# Mom's House
|
||||
#sun_predictor.sun.observer_latitude = trick.sim_services.attach_units("d" , 38.842677)
|
||||
|
@ -16,8 +16,8 @@ typedef struct {
|
||||
} CALENDAR_DATE;
|
||||
|
||||
typedef struct {
|
||||
double observer_latitude; /* (d) */
|
||||
double observer_longitude; /* (d) */
|
||||
double observer_latitude; /* (degree) */
|
||||
double observer_longitude; /* (degree) */
|
||||
CALENDAR_DATE local_time; /* (--) */
|
||||
double local_sidereal_time; /* (s) */
|
||||
double sidereal_time_at_Greenwich; /* (s) */
|
||||
@ -25,11 +25,11 @@ typedef struct {
|
||||
CALENDAR_DATE utc; /* (--) */
|
||||
double JD_start; /* (day) Julian date at the beginning of the sim run.*/
|
||||
double JD; /* (day) Current Julian date */
|
||||
double right_ascension; /* (d) */
|
||||
double declination; /* (d) */
|
||||
double hour_angle; /* (d) */
|
||||
double solar_azimuth; /* (d) */
|
||||
double solar_elevation; /* (d) */
|
||||
double right_ascension; /* (degree) */
|
||||
double declination; /* (degree) */
|
||||
double hour_angle; /* (degree) */
|
||||
double solar_azimuth; /* (degree) */
|
||||
double solar_elevation; /* (degree) */
|
||||
wchar_t* label_UTC; /* (--) wide character pointer */
|
||||
wchar_t* label_JD; /* (--) wide character pointer */
|
||||
wchar_t* label_Azimuth; /* (--) wide character pointer */
|
||||
|
Loading…
Reference in New Issue
Block a user