You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
852 B

  1. #include <stdio.h>
  2. #include "types.h"
  3. #include "io.h"
  4. #define FMTREAL "%5.15f"
  5. #define BASE_FREQUENCY 200.0
  6. extern REAL_TYPE h_c;
  7. void ROSACE_update_altitude_command(REAL_TYPE h_cons){
  8. h_c = h_cons;
  9. }
  10. void ROSACE_write_outputs(output_t* v){
  11. static int first=1;
  12. if (first) {
  13. printf("# %15s, %15s, %15s, %15s, %15s, %15s, %15s, %15s\n",
  14. "T","Va","az","q","Vz","h","delta_th_c","delta_e_c");
  15. first = 0;
  16. }
  17. //printf("%3.4f, ", (v->t_simu)/BASE_FREQUENCY); // The time is already in ms here
  18. printf("%3.4f, ", (v->t_simu)/1000.0);
  19. printf(FMTREAL", ", v->sig_outputs.Va);
  20. printf(FMTREAL", ", v->sig_outputs.az);
  21. printf(FMTREAL", ", v->sig_outputs.q);
  22. printf(FMTREAL", ", v->sig_outputs.Vz);
  23. printf(FMTREAL", ", v->sig_outputs.h);
  24. printf(FMTREAL", ", v->sig_delta_th_c);
  25. printf(FMTREAL"\n", v->sig_delta_e_c);
  26. }