índiceitem superior

item anteriorpróximo item

 

Apêndice D

 

Grupos de funcionalidade

 

A relação das funções mostrada a seguir é separada por grupos de mesma funcionalidade. Tem-se com isso funções destinadas a configurar o satélite e o ambiente de integração, a leitura dos sensores, ações de controle, verificação de configuração, verificação de estado, conversão de coordenadas, efemérides, tempo real e funções auxiliares.

 

Configuração do satélite

 

int          set_current_time (double time);

int          set_step_time (double dtime);

int          set_int_step_time (double ditime);

 

int          set_attitude (quaternion quater);

int          set_ang_velocity (vector3 w);

 

int          set_sat_inertia (matrix3 sat_inert);

int          set_sat_mass (double mass);

int          set_number_bodies (int n_body);

int          set_body_k (int k, double b_mass, matrix3 b_iner, double dh0[4], double dh1[4], double dh2[4]);

int          set_body_pos (int k, double b_angl, double b_vel);

 

int          set_ephemeris_date (int day, int month, int year, int hour, int minut, double secon);

int          set_greenwich_sidereal_time (double gst);

int          set_inertial_geomag_strength (vector3 geomagnetic);

int          set_inertial_sat_pos (vector3 satpos);

int          set_inertial_sun_vector (vector3 sunvec);

int          set_orbit_propagation_flag ();

int          reset_orbit_propagation_flag ();

int          set_orbit_propagation_model (int orb_model);

int          set_keplerian_elements (vector6 kepel);

int          set_two_line_elements (nasa_el tl_elem);

int          sgp8 (nasa_el nasael);

 

int          set_3axis_mag (int ind_body, matrix3 axis_dir, matrix3 std_dev, vector3 bias, double k_mag);

int          set_css_number (int cssnum);

int          set_coarse_sun_sensor (int ind_css, int ind_body, vector3 css_normal, double css_abs, css_rel, double k_css);

int          set_inertial_unit (matrix3 axis_dir, vector3 scale_error, vector3 bias, matrix3 random_drift, matrix3 random_walk);

int          set_gps_sensor (matrix3 std_dev_p, matrix3 std_dev_v, double k_gps_p, double k_gps_v);

int          set_star_sensor (matrix3 std_dev_ss, matrix3 att_ss);

 

int          set_control_torque_flag ();

int          reset_control_torque_flag ();

 

int          set_torque_coil_flag ();

int          reset_torque_coil_flag ();

int          set_number_coils (int ncoils);

int          set_coil_magnetic_moment (int ind_coil, vector3 vec_coil);

 

int          set_thruster_flag ();

int          reset_thruster_flag ();

int          set_number_thrusters (int nthrusters);

int          set_thrusters (int ind_thrtr, vector3 thrtr_pos, vector3 thrtr_thrust);

 

int          set_wheel_torque_flag ();

int          reset_wheel_torque_flag ();

int          set_number_wheels (int nwheels);

int          set_wheel_momentum (int ind_wheel, double hw);

int          set_wheel_vector (int ind_wheel, vector3 vec_wheel);

 

Integrador numérico

 

int          select_integ_method (int intmet);

int          set_integ_precision (double rel_err, double abs_err);

int          sat_propagation ();

 

Leituras de sensores

 

vector3      read_3axis_mag ();

double       read_coarse_sun_sensor (int ind_css);

vector6      read_gps_sensor ();

vector3      read_inertial_unit ();

quaternion   read_star_sensor ();

 

Ações de controle

 

int          set_control_torque (vector3 torq);

int          set_torque_coil_switch_state (int ind_coil, double switch_state);

int          set_thruster_duty_cycle (int ind_thrtr, double time_prop);

int          set_wheel_torque (int ind_wheel, double torw);

int          set_body_accel (double ack[8]);

 

Verificação de configuração (não afetado pelo integrador)

 

matrix3      get_sat_inertia ();

double       get_sat_mass ();

int          get_number_bodies ();

 

int          get_css_number ();

 

double       get_step_time ();

double       get_int_step_time ();

double       get_integ_abs_err ();

double       get_integ_rel_err ();

 

int          get_control_torque_flag ();

 

int          get_torque_coil_flag ();

int          get_number_coils ();

vector3      get_coil_vector (int ind_coil);

 

int          get_thruster_flag ();

int          get_number_thrusters ();

vector3      get_thruster_position (int ind_thrtr);

double       get_thruster_thrust (int ind_thrtr);

vector3      get_thruster_vector (int ind_thrtr);

 

int          get_wheel_torque_flag ();

int          get_number_wheels ();

double       get_wheel_inertia (int ind_wheel);

vector3      get_wheel_vector (int ind_wheel);

 

int          get_orbit_propagation_flag ();

int          get_orbit_propagation_model ();

 

Verificação de estado (afetado pelo integrador)

 

vector3      get_ang_velocity ();

quaternion   get_attitude ();

matrix3      get_body_rmatrix (int k);

vector3      get_body_ovect (int k);

double       get_body_pos (int k);

double       get_body_vel (int k);

vector3      get_body_geomag_vector ();

vector3      get_body_earth_vector ();

vector3      get_body_sun_versor ();

 

double       get_coil_magnetic_moment (int ind_coil);

vector3      get_control_torque ();

 

vector6      get_current_date ();

double       get_current_time ();

int          get_greenwich_sidereal_time ();

vector3      get_inertial_geomag_strength ();

vector6      get_inertial_state_vector ();

vector3      get_inertial_sun_vector ();

 

vector3      get_sat_ang_momentum ();

vector3      get_sat_center_mass (void);

vector3      get_terrestrial_sat_pos ();

double       get_thruster_duty_cycle (int ind_thrtr);

vector3      get_thruster_torque ();

 

double       get_torque_coil_switch_state (int ind_coil);

vector3      get_torque_coil_torque ();

double       get_wheel_momentum (int ind_wheel);

vector3      get_wheel_momentum_xyz ();

double       get_wheel_speed (int ind_wheel);

double       get_wheel_torque (int ind_wheel);

vector3      get_wheel_torque_xyz ();

 

Efemérides

 

double       earth_shadow (vector3 sat_pos, vector3 sun_pos);

vector3      geomag_field (int output_sel, double date, vector3 geo_cor);

double       gst (int mjd, double tsec);

int          igrf10syn (double date, double alt, double colat, double elong, double field[3]);

double       kepler (double mean_anomaly, double eccentricity);

int          sun (double djm, double ts, double s[6]);

vector3      sun_coord (int output_sel, int djm, double ts);

vector6      sgp8pr (double tsince);

vector6      sgp8pr_mean (double tsince);

double       mean_a (nasa_el nasael);

double       mean_n (vector6 kepel);

 

Conversão de coordenadas e tempo

 

vector3      dayf_to_time (double dayf);

vector3      delkep (vector6 kep_el);

int          djm (int day, int month, int year);

vector3      djm_inv (int mjd);

quaternion   eulerquat (quaternion euler);

matrix3      eulerrmx (quaternion euler);

quaternion   exyzquat (vector3 euler);

matrix3      exyzrmx (vector3 euler);

matrix3      ezxyrmx (vector3 euler);

quaternion   ezxzquat (vector3 euler);

matrix3      ezxzrmx (vector3 euler);

matrix3      ezyxrmx (vector3 euler);

vector3      geocentric_to_sph_geodetic (vector3 geoc);

vector3      inertial_to_terrestrial (double tesig, vector3 xi);

vector6      kepel_statvec (vector6 kepel);

quaternion   quateuler (quaternion quater);

vector3      quatexyz (quaternion quater);

vector3      quatezxz (quaternion quater);

matrix3      quatrmx (quaternion quater);

vector3      rectangular_to_spherical (vector3 rectan);

quaternion   rmxeuler (matrix3 rmat);

vector3      rmxexyz (matrix3 rmat);

vector3      rmxezxy (matrix3 rmat);

vector3      rmxezxz (matrix3 rmat);

vector3      rmxezyx (matrix3 rmat);

quaternion   rmxquat (matrix3 rmat);

matrix3      rmxtran (matrix3 rmat);

vector3      sph_geodetic_to_geocentric (vector3 spgd);

vector3      spherical_to_rectangular (vector3 spher);

vector6      statvec_kepel (vector6 statv);

vector3      terrestrial_to_inertial (double tesig, vector3 xt);

double       time_to_dayf (int hours, int minutes, double seconds);

 

Tempo real

 

double       rt_adjust_step_time (double t, double step);

double       rt_clock_resolution ();

void         rt_reset_timer ();

double       rt_time_since (double timsec);

double       rt_timer ();

void         rt_wait (double timsec);

int          rt_wait_till (double timsec);

 

Funções auxiliares

 

double       s_gaussian_noise(unsigned long seed);

 

quaternion   conjugate (quaternion quat);

matrix3      identity (double escal);

matrix3      inverse (matrix3 matin);

double       modulus (vector3 vecin);

matrix3      skew_simetric (vector3 win);

matrix3      transpose (matrix3 mat);

quaternion   unity_quaternion (quaternion quat);

vector3      unity_vector (vector3 vecin);

 

vector3      vec3_def (double vx, double vy, double vz);

vector6      vec6_def (double vx, double vy, double vz, double wx, double wy, double wz);

quaternion   quat_def (double q1, double q2, double q3, double q4);

matrix3      mat3_def (double a11, double a12, double a13, double a21, double a22, double a23, double a31, double a32, double a33);

 

matrix3      rotmax (double angl);

matrix3      rotmay (double angl);

matrix3      rotmaz (double angl);

 

double       gaussian_noise(unsigned long id_noise);

vector3      vec_gaussian_noise (unsigned long id_noise);

 

nasa_el      nasael (FILE *ifile, int itype);