/* File generated by preludec 1.4 */ /* and hand edited afterwards */ /*--- this part has been added by hand for tracing purpose ---*/ #ifndef NBMAX_SAMPLE #define NBMAX_SAMPLE (6000000/4) #endif typedef enum SAMPLE_RANK { SPL_T, SPL_VA,SPL_AZ,SPL_Q,SPL_VZ,SPL_H, SPL_DELTA_TH_C, SPL_DELTA_E_C, SPL_SIZE } SampleRank_t; extern double sample[SPL_SIZE][NBMAX_SAMPLE]; /* in-memory buffer for traces */ double sample[SPL_SIZE][NBMAX_SAMPLE]; static unsigned long instant=0; unsigned long sample_instant=0; #define FMTFLOAT "%5.15f" /*--- this part has been added by hand for tracing purpose ---*/ #include "fullrosace_bloc.h" #include "fullrosace_bloc_alloc.h" #include "fullrosace_assemblage_includes.h" #include "fullrosace_assemblage.h" /*--- this part has been added by hand for tracing purpose ---*/ #include void print_FlightDynamics_outs_t(struct fullrosace_FlightDynamics_outs_t *outputs) { #ifndef NO_PRINT printf(" %3.4f ",sample[SPL_T][sample_instant]); printf(","FMTFLOAT "," FMTFLOAT "," FMTFLOAT "," FMTFLOAT "," FMTFLOAT " ", outputs->Va_1, outputs->az_1, outputs->q_1, outputs->Vz_1, outputs->h_1); printf(","FMTFLOAT" ",sample[SPL_DELTA_TH_C][sample_instant-1]); printf(","FMTFLOAT" ",sample[SPL_DELTA_E_C][sample_instant-1]); printf("\n"); #endif } /*--- this part has been added by hand for tracing purpose ---*/ double fullrosace_AltitudeHold(double hc_1, double hmeas_1) { /* declare outputs static var */ static double Vz_c_1; static int firstCall = 1; /* static allocation of lustrec node state variable */ fullrosace_AltitudeHold_ALLOC(static,self); /* guard for resetting node state on first call */ if (firstCall) { fullrosace_AltitudeHold_reset(&self); firstCall=0; } /* Call lustrec step function */ fullrosace_AltitudeHold_step(hc_1, hmeas_1, &Vz_c_1, &self); return Vz_c_1; } /* end of fullrosace_AltitudeHold */ double fullrosace_Elevator(double delta_e_c_1) { /* declare outputs static var */ static double delta_e_1; static int firstCall = 1; /* static allocation of lustrec node state variable */ fullrosace_Elevator_ALLOC(static,self); /* guard for resetting node state on first call */ if (firstCall) { fullrosace_Elevator_reset(&self); firstCall=0; } /* Call lustrec step function */ fullrosace_Elevator_step(delta_e_c_1, &delta_e_1, &self); return delta_e_1; } /* end of fullrosace_Elevator */ double fullrosace_Engine(double delta_x_c_1) { /* declare outputs static var */ static double T_1; static int firstCall = 1; /* static allocation of lustrec node state variable */ fullrosace_Engine_ALLOC(static,self); /* guard for resetting node state on first call */ if (firstCall) { fullrosace_Engine_reset(&self); firstCall=0; } /* Call lustrec step function */ fullrosace_Engine_step(delta_x_c_1, &T_1, &self); return T_1; } /* end of fullrosace_Engine */ void fullrosace_FlightDynamics(double T_1, double delta_e_1, struct fullrosace_FlightDynamics_outs_t* outputs) { /* declare outputs static var */ /* no need: 'outputs' passed as argument */ static int firstCall = 1; /* static allocation of lustrec node state variable */ fullrosace_FlightDynamics_ALLOC(static,self); /* guard for resetting node state on first call */ if (firstCall) { fullrosace_FlightDynamics_reset(&self); firstCall=0; } /* Call lustrec step function */ fullrosace_FlightDynamics_step(T_1, delta_e_1, &(outputs->Va_1), &(outputs->az_1), &(outputs->q_1), &(outputs->Vz_1), &(outputs->h_1), &self); return; } /* end of fullrosace_FlightDynamics */ double fullrosace_Va_filter(double Va_1) { /* declare outputs static var */ static double Va_meas_1; static int firstCall = 1; /* static allocation of lustrec node state variable */ fullrosace_Va_filter_ALLOC(static,self); /* guard for resetting node state on first call */ if (firstCall) { fullrosace_Va_filter_reset(&self); firstCall=0; } /* Call lustrec step function */ fullrosace_Va_filter_step(Va_1, &Va_meas_1, &self); return Va_meas_1; } /* end of fullrosace_Va_filter */ double fullrosace_Va_speed_control(double Va_c_1, double Va_meas_1, double q_meas_1, double Vz_meas_1) { /* declare outputs static var */ static double delta_x_c_1; static int firstCall = 1; /* static allocation of lustrec node state variable */ fullrosace_Va_speed_control_ALLOC(static,self); /* guard for resetting node state on first call */ if (firstCall) { fullrosace_Va_speed_control_reset(&self); firstCall=0; } /* Call lustrec step function */ fullrosace_Va_speed_control_step(Va_c_1, Va_meas_1, q_meas_1, Vz_meas_1, &delta_x_c_1, &self); return delta_x_c_1; } /* end of fullrosace_Va_speed_control */ double fullrosace_Vz_filter(double Vz_1) { /* declare outputs static var */ static double Vz_meas_1; static int firstCall = 1; /* static allocation of lustrec node state variable */ fullrosace_Vz_filter_ALLOC(static,self); /* guard for resetting node state on first call */ if (firstCall) { fullrosace_Vz_filter_reset(&self); firstCall=0; } /* Call lustrec step function */ fullrosace_Vz_filter_step(Vz_1, &Vz_meas_1, &self); return Vz_meas_1; } /* end of fullrosace_Vz_filter */ double fullrosace_Vz_speed_control(double Vz_c_1, double Vz_meas_1, double q_meas_1, double az_meas_1) { /* declare outputs static var */ static double delta_e_c_1; static int firstCall = 1; /* static allocation of lustrec node state variable */ fullrosace_Vz_speed_control_ALLOC(static,self); /* guard for resetting node state on first call */ if (firstCall) { fullrosace_Vz_speed_control_reset(&self); firstCall=0; } /* Call lustrec step function */ fullrosace_Vz_speed_control_step(Vz_c_1, Vz_meas_1, q_meas_1, az_meas_1, &delta_e_c_1, &self); return delta_e_c_1; } /* end of fullrosace_Vz_speed_control */ double fullrosace_az_filter(double az_1) { /* declare outputs static var */ static double az_meas_1; static int firstCall = 1; /* static allocation of lustrec node state variable */ fullrosace_az_filter_ALLOC(static,self); /* guard for resetting node state on first call */ if (firstCall) { fullrosace_az_filter_reset(&self); firstCall=0; } /* Call lustrec step function */ fullrosace_az_filter_step(az_1, &az_meas_1, &self); return az_meas_1; } /* end of fullrosace_az_filter */ double fullrosace_h_filter(double h_1) { /* declare outputs static var */ static double h_meas_1; static int firstCall = 1; /* static allocation of lustrec node state variable */ fullrosace_h_filter_ALLOC(static,self); /* guard for resetting node state on first call */ if (firstCall) { fullrosace_h_filter_reset(&self); firstCall=0; } /* Call lustrec step function */ fullrosace_h_filter_step(h_1, &h_meas_1, &self); return h_meas_1; } /* end of fullrosace_h_filter */ double fullrosace_q_filter(double q_1) { /* declare outputs static var */ static double q_meas_1; static int firstCall = 1; /* static allocation of lustrec node state variable */ fullrosace_q_filter_ALLOC(static,self); /* guard for resetting node state on first call */ if (firstCall) { fullrosace_q_filter_reset(&self); firstCall=0; } /* Call lustrec step function */ fullrosace_q_filter_step(q_1, &q_meas_1, &self); return q_meas_1; } /* end of fullrosace_q_filter */