集成了simulink的生成代码
This commit is contained in:
177
src/pAUV150/Controler/Controler.cpp
Normal file
177
src/pAUV150/Controler/Controler.cpp
Normal file
@@ -0,0 +1,177 @@
|
||||
//
|
||||
// Academic License - for use in teaching, academic research, and meeting
|
||||
// course requirements at degree granting institutions only. Not for
|
||||
// government, commercial, or other organizational use.
|
||||
//
|
||||
// File: Controler.cpp
|
||||
//
|
||||
// Code generated for Simulink model 'Controler'.
|
||||
//
|
||||
// Model version : 5.11
|
||||
// Simulink Coder version : 24.2 (R2024b) 21-Jun-2024
|
||||
// C/C++ source code generated on : Tue Jun 17 18:31:17 2025
|
||||
//
|
||||
// Target selection: ert.tlc
|
||||
// Embedded hardware selection: Intel->x86-64 (Linux 64)
|
||||
// Code generation objectives:
|
||||
// 1. Execution efficiency
|
||||
// 2. RAM efficiency
|
||||
// Validation result: Not run
|
||||
//
|
||||
#include "Controler.h"
|
||||
#include "rtwtypes.h"
|
||||
|
||||
// Model step function
|
||||
void Controler::step()
|
||||
{
|
||||
real_T rtb_FilterCoefficient;
|
||||
real_T rtb_FilterCoefficient_a;
|
||||
real_T rtb_FilterCoefficient_lc;
|
||||
real_T rtb_IntegralGain;
|
||||
real_T rtb_Sum1;
|
||||
real_T rtb_Sum2;
|
||||
|
||||
// Outputs for Atomic SubSystem: '<Root>/Controler'
|
||||
// Sum: '<S1>/Sum' incorporates:
|
||||
// Inport: '<Root>/heading_cmd'
|
||||
// Inport: '<Root>/psi'
|
||||
|
||||
rtb_Sum1 = rtU.heading_cmd - rtU.psi;
|
||||
|
||||
// Gain: '<S42>/Filter Coefficient' incorporates:
|
||||
// DiscreteIntegrator: '<S34>/Filter'
|
||||
// Gain: '<S32>/Derivative Gain'
|
||||
// Sum: '<S34>/SumD'
|
||||
|
||||
rtb_FilterCoefficient = (0.01 * rtb_Sum1 - rtDW.Filter_DSTATE) * 10.0;
|
||||
|
||||
// Outport: '<Root>/DirectUpperRudderServoAngleCmd' incorporates:
|
||||
// DiscreteIntegrator: '<S39>/Integrator'
|
||||
// Gain: '<S44>/Proportional Gain'
|
||||
// Sum: '<S48>/Sum'
|
||||
|
||||
rtY.DirectUpperRudderServoAngleCmd = (0.1 * rtb_Sum1 + rtDW.Integrator_DSTATE)
|
||||
+ rtb_FilterCoefficient;
|
||||
|
||||
// Gain: '<S36>/Integral Gain'
|
||||
rtb_IntegralGain = 0.0 * rtb_Sum1;
|
||||
|
||||
// Sum: '<S1>/Sum1' incorporates:
|
||||
// Inport: '<Root>/depth_cmd'
|
||||
// Inport: '<Root>/z'
|
||||
|
||||
rtb_Sum1 = rtU.z - rtU.depth_cmd;
|
||||
|
||||
// Gain: '<S94>/Filter Coefficient' incorporates:
|
||||
// DiscreteIntegrator: '<S86>/Filter'
|
||||
// Gain: '<S84>/Derivative Gain'
|
||||
// Sum: '<S86>/SumD'
|
||||
|
||||
rtb_FilterCoefficient_lc = (0.0 * rtb_Sum1 - rtDW.Filter_DSTATE_m) * 10.0;
|
||||
|
||||
// Sum: '<S1>/Sum2' incorporates:
|
||||
// DiscreteIntegrator: '<S91>/Integrator'
|
||||
// Gain: '<S96>/Proportional Gain'
|
||||
// Inport: '<Root>/theta'
|
||||
// Sum: '<S100>/Sum'
|
||||
|
||||
rtb_Sum2 = ((2.0 * rtb_Sum1 + rtDW.Integrator_DSTATE_o) +
|
||||
rtb_FilterCoefficient_lc) - rtU.theta;
|
||||
|
||||
// Gain: '<S146>/Filter Coefficient' incorporates:
|
||||
// DiscreteIntegrator: '<S138>/Filter'
|
||||
// Gain: '<S136>/Derivative Gain'
|
||||
// Sum: '<S138>/SumD'
|
||||
|
||||
rtb_FilterCoefficient_a = (0.1 * rtb_Sum2 - rtDW.Filter_DSTATE_l) * 10.0;
|
||||
|
||||
// Outport: '<Root>/DirectLeftRudderServoAngleCmd' incorporates:
|
||||
// DiscreteIntegrator: '<S143>/Integrator'
|
||||
// Gain: '<S148>/Proportional Gain'
|
||||
// Sum: '<S152>/Sum'
|
||||
|
||||
rtY.DirectLeftRudderServoAngleCmd = (0.5 * rtb_Sum2 + rtDW.Integrator_DSTATE_f)
|
||||
+ rtb_FilterCoefficient_a;
|
||||
|
||||
// Update for DiscreteIntegrator: '<S34>/Filter'
|
||||
rtDW.Filter_DSTATE += 0.1 * rtb_FilterCoefficient;
|
||||
|
||||
// Update for DiscreteIntegrator: '<S39>/Integrator'
|
||||
rtDW.Integrator_DSTATE += 0.1 * rtb_IntegralGain;
|
||||
|
||||
// Update for DiscreteIntegrator: '<S86>/Filter'
|
||||
rtDW.Filter_DSTATE_m += 0.1 * rtb_FilterCoefficient_lc;
|
||||
|
||||
// Update for DiscreteIntegrator: '<S91>/Integrator' incorporates:
|
||||
// Gain: '<S88>/Integral Gain'
|
||||
|
||||
rtDW.Integrator_DSTATE_o += 0.0 * rtb_Sum1 * 0.1;
|
||||
|
||||
// Update for DiscreteIntegrator: '<S138>/Filter'
|
||||
rtDW.Filter_DSTATE_l += 0.1 * rtb_FilterCoefficient_a;
|
||||
|
||||
// Update for DiscreteIntegrator: '<S143>/Integrator' incorporates:
|
||||
// Gain: '<S140>/Integral Gain'
|
||||
|
||||
rtDW.Integrator_DSTATE_f += 0.0 * rtb_Sum2 * 0.1;
|
||||
|
||||
// End of Outputs for SubSystem: '<Root>/Controler'
|
||||
|
||||
// Outport: '<Root>/MainThrusterSpeedCmd' incorporates:
|
||||
// Constant: '<S1>/Constant'
|
||||
|
||||
rtY.MainThrusterSpeedCmd = 100.0;
|
||||
|
||||
// Outport: '<Root>/DirectLowerRudderServoAngleCmd' incorporates:
|
||||
// Constant: '<S1>/Constant2'
|
||||
|
||||
rtY.DirectLowerRudderServoAngleCmd = 1.0;
|
||||
|
||||
// Outport: '<Root>/DirectRightRudderServoAngleCmd' incorporates:
|
||||
// Constant: '<S1>/Constant4'
|
||||
|
||||
rtY.DirectRightRudderServoAngleCmd = 1.0;
|
||||
}
|
||||
|
||||
// Model initialize function
|
||||
void Controler::initialize()
|
||||
{
|
||||
// (no initialization code required)
|
||||
}
|
||||
|
||||
const char_T* Controler::RT_MODEL::getErrorStatus() const
|
||||
{
|
||||
return (errorStatus);
|
||||
}
|
||||
|
||||
void Controler::RT_MODEL::setErrorStatus(const char_T* const volatile
|
||||
aErrorStatus)
|
||||
{
|
||||
(errorStatus = aErrorStatus);
|
||||
}
|
||||
|
||||
// Constructor
|
||||
Controler::Controler() :
|
||||
rtU(),
|
||||
rtY(),
|
||||
rtDW(),
|
||||
rtM()
|
||||
{
|
||||
// Currently there is no constructor body generated.
|
||||
}
|
||||
|
||||
// Destructor
|
||||
// Currently there is no destructor body generated.
|
||||
Controler::~Controler() = default;
|
||||
|
||||
// Real-Time Model get method
|
||||
Controler::RT_MODEL * Controler::getRTM()
|
||||
{
|
||||
return (&rtM);
|
||||
}
|
||||
|
||||
//
|
||||
// File trailer for generated code.
|
||||
//
|
||||
// [EOF]
|
||||
//
|
||||
314
src/pAUV150/Controler/Controler.h
Normal file
314
src/pAUV150/Controler/Controler.h
Normal file
@@ -0,0 +1,314 @@
|
||||
//
|
||||
// Academic License - for use in teaching, academic research, and meeting
|
||||
// course requirements at degree granting institutions only. Not for
|
||||
// government, commercial, or other organizational use.
|
||||
//
|
||||
// File: Controler.h
|
||||
//
|
||||
// Code generated for Simulink model 'Controler'.
|
||||
//
|
||||
// Model version : 5.11
|
||||
// Simulink Coder version : 24.2 (R2024b) 21-Jun-2024
|
||||
// C/C++ source code generated on : Tue Jun 17 18:31:17 2025
|
||||
//
|
||||
// Target selection: ert.tlc
|
||||
// Embedded hardware selection: Intel->x86-64 (Linux 64)
|
||||
// Code generation objectives:
|
||||
// 1. Execution efficiency
|
||||
// 2. RAM efficiency
|
||||
// Validation result: Not run
|
||||
//
|
||||
#ifndef Controler_h_
|
||||
#define Controler_h_
|
||||
#include <cmath>
|
||||
#include "rtwtypes.h"
|
||||
#include "Controler_types.h"
|
||||
|
||||
// Class declaration for model Controler
|
||||
class Controler final
|
||||
{
|
||||
// public data and function members
|
||||
public:
|
||||
// Block signals and states (default storage) for system '<Root>'
|
||||
struct DW {
|
||||
real_T Filter_DSTATE; // '<S34>/Filter'
|
||||
real_T Integrator_DSTATE; // '<S39>/Integrator'
|
||||
real_T Filter_DSTATE_m; // '<S86>/Filter'
|
||||
real_T Integrator_DSTATE_o; // '<S91>/Integrator'
|
||||
real_T Filter_DSTATE_l; // '<S138>/Filter'
|
||||
real_T Integrator_DSTATE_f; // '<S143>/Integrator'
|
||||
};
|
||||
|
||||
// External inputs (root inport signals with default storage)
|
||||
struct ExtU {
|
||||
real_T u; // '<Root>/u'
|
||||
real_T v; // '<Root>/v'
|
||||
real_T w; // '<Root>/w'
|
||||
real_T phi; // '<Root>/phi'
|
||||
real_T theta; // '<Root>/theta'
|
||||
real_T psi; // '<Root>/psi'
|
||||
real_T x; // '<Root>/x'
|
||||
real_T y; // '<Root>/y'
|
||||
real_T z; // '<Root>/z'
|
||||
real_T dx; // '<Root>/dx'
|
||||
real_T dy; // '<Root>/dy'
|
||||
real_T dz; // '<Root>/dz'
|
||||
real_T speed_cmd; // '<Root>/speed_cmd'
|
||||
real_T heading_cmd; // '<Root>/heading_cmd'
|
||||
real_T depth_cmd; // '<Root>/depth_cmd'
|
||||
};
|
||||
|
||||
// External outputs (root outports fed by signals with default storage)
|
||||
struct ExtY {
|
||||
real_T MainThrusterSpeedCmd; // '<Root>/MainThrusterSpeedCmd'
|
||||
real_T DirectUpperRudderServoAngleCmd;
|
||||
// '<Root>/DirectUpperRudderServoAngleCmd'
|
||||
real_T DirectLowerRudderServoAngleCmd;
|
||||
// '<Root>/DirectLowerRudderServoAngleCmd'
|
||||
real_T DirectLeftRudderServoAngleCmd;
|
||||
// '<Root>/DirectLeftRudderServoAngleCmd'
|
||||
real_T DirectRightRudderServoAngleCmd;
|
||||
// '<Root>/DirectRightRudderServoAngleCmd'
|
||||
};
|
||||
|
||||
// Real-time Model Data Structure
|
||||
struct RT_MODEL {
|
||||
const char_T * volatile errorStatus;
|
||||
const char_T* getErrorStatus() const;
|
||||
void setErrorStatus(const char_T* const volatile aErrorStatus);
|
||||
};
|
||||
|
||||
// Copy Constructor
|
||||
Controler(Controler const&) = delete;
|
||||
|
||||
// Assignment Operator
|
||||
Controler& operator= (Controler const&) & = delete;
|
||||
|
||||
// Move Constructor
|
||||
Controler(Controler &&) = delete;
|
||||
|
||||
// Move Assignment Operator
|
||||
Controler& operator= (Controler &&) = delete;
|
||||
|
||||
// Real-Time Model get method
|
||||
Controler::RT_MODEL * getRTM();
|
||||
|
||||
// External inputs
|
||||
ExtU rtU;
|
||||
|
||||
// External outputs
|
||||
ExtY rtY;
|
||||
|
||||
// model initialize function
|
||||
static void initialize();
|
||||
|
||||
// model step function
|
||||
void step();
|
||||
|
||||
// Constructor
|
||||
Controler();
|
||||
|
||||
// Destructor
|
||||
~Controler();
|
||||
|
||||
// private data and function members
|
||||
private:
|
||||
// Block states
|
||||
DW rtDW;
|
||||
|
||||
// Real-Time Model
|
||||
RT_MODEL rtM;
|
||||
};
|
||||
|
||||
//-
|
||||
// These blocks were eliminated from the model due to optimizations:
|
||||
//
|
||||
// Block '<S1>/Scope1' : Unused code path elimination
|
||||
|
||||
|
||||
//-
|
||||
// The generated code includes comments that allow you to trace directly
|
||||
// back to the appropriate location in the model. The basic format
|
||||
// is <system>/block_name, where system is the system number (uniquely
|
||||
// assigned by Simulink) and block_name is the name of the block.
|
||||
//
|
||||
// Note that this particular code originates from a subsystem build,
|
||||
// and has its own system numbers different from the parent model.
|
||||
// Refer to the system hierarchy for this subsystem below, and use the
|
||||
// MATLAB hilite_system command to trace the generated code back
|
||||
// to the parent model. For example,
|
||||
//
|
||||
// hilite_system('SimModelR2022b_0617/Controler') - opens subsystem SimModelR2022b_0617/Controler
|
||||
// hilite_system('SimModelR2022b_0617/Controler/Kp') - opens and selects block Kp
|
||||
//
|
||||
// Here is the system hierarchy for this model
|
||||
//
|
||||
// '<Root>' : 'SimModelR2022b_0617'
|
||||
// '<S1>' : 'SimModelR2022b_0617/Controler'
|
||||
// '<S2>' : 'SimModelR2022b_0617/Controler/PID Controller'
|
||||
// '<S3>' : 'SimModelR2022b_0617/Controler/PID Controller1'
|
||||
// '<S4>' : 'SimModelR2022b_0617/Controler/PID Controller2'
|
||||
// '<S5>' : 'SimModelR2022b_0617/Controler/PID Controller/Anti-windup'
|
||||
// '<S6>' : 'SimModelR2022b_0617/Controler/PID Controller/D Gain'
|
||||
// '<S7>' : 'SimModelR2022b_0617/Controler/PID Controller/External Derivative'
|
||||
// '<S8>' : 'SimModelR2022b_0617/Controler/PID Controller/Filter'
|
||||
// '<S9>' : 'SimModelR2022b_0617/Controler/PID Controller/Filter ICs'
|
||||
// '<S10>' : 'SimModelR2022b_0617/Controler/PID Controller/I Gain'
|
||||
// '<S11>' : 'SimModelR2022b_0617/Controler/PID Controller/Ideal P Gain'
|
||||
// '<S12>' : 'SimModelR2022b_0617/Controler/PID Controller/Ideal P Gain Fdbk'
|
||||
// '<S13>' : 'SimModelR2022b_0617/Controler/PID Controller/Integrator'
|
||||
// '<S14>' : 'SimModelR2022b_0617/Controler/PID Controller/Integrator ICs'
|
||||
// '<S15>' : 'SimModelR2022b_0617/Controler/PID Controller/N Copy'
|
||||
// '<S16>' : 'SimModelR2022b_0617/Controler/PID Controller/N Gain'
|
||||
// '<S17>' : 'SimModelR2022b_0617/Controler/PID Controller/P Copy'
|
||||
// '<S18>' : 'SimModelR2022b_0617/Controler/PID Controller/Parallel P Gain'
|
||||
// '<S19>' : 'SimModelR2022b_0617/Controler/PID Controller/Reset Signal'
|
||||
// '<S20>' : 'SimModelR2022b_0617/Controler/PID Controller/Saturation'
|
||||
// '<S21>' : 'SimModelR2022b_0617/Controler/PID Controller/Saturation Fdbk'
|
||||
// '<S22>' : 'SimModelR2022b_0617/Controler/PID Controller/Sum'
|
||||
// '<S23>' : 'SimModelR2022b_0617/Controler/PID Controller/Sum Fdbk'
|
||||
// '<S24>' : 'SimModelR2022b_0617/Controler/PID Controller/Tracking Mode'
|
||||
// '<S25>' : 'SimModelR2022b_0617/Controler/PID Controller/Tracking Mode Sum'
|
||||
// '<S26>' : 'SimModelR2022b_0617/Controler/PID Controller/Tsamp - Integral'
|
||||
// '<S27>' : 'SimModelR2022b_0617/Controler/PID Controller/Tsamp - Ngain'
|
||||
// '<S28>' : 'SimModelR2022b_0617/Controler/PID Controller/postSat Signal'
|
||||
// '<S29>' : 'SimModelR2022b_0617/Controler/PID Controller/preInt Signal'
|
||||
// '<S30>' : 'SimModelR2022b_0617/Controler/PID Controller/preSat Signal'
|
||||
// '<S31>' : 'SimModelR2022b_0617/Controler/PID Controller/Anti-windup/Passthrough'
|
||||
// '<S32>' : 'SimModelR2022b_0617/Controler/PID Controller/D Gain/Internal Parameters'
|
||||
// '<S33>' : 'SimModelR2022b_0617/Controler/PID Controller/External Derivative/Error'
|
||||
// '<S34>' : 'SimModelR2022b_0617/Controler/PID Controller/Filter/Disc. Forward Euler Filter'
|
||||
// '<S35>' : 'SimModelR2022b_0617/Controler/PID Controller/Filter ICs/Internal IC - Filter'
|
||||
// '<S36>' : 'SimModelR2022b_0617/Controler/PID Controller/I Gain/Internal Parameters'
|
||||
// '<S37>' : 'SimModelR2022b_0617/Controler/PID Controller/Ideal P Gain/Passthrough'
|
||||
// '<S38>' : 'SimModelR2022b_0617/Controler/PID Controller/Ideal P Gain Fdbk/Disabled'
|
||||
// '<S39>' : 'SimModelR2022b_0617/Controler/PID Controller/Integrator/Discrete'
|
||||
// '<S40>' : 'SimModelR2022b_0617/Controler/PID Controller/Integrator ICs/Internal IC'
|
||||
// '<S41>' : 'SimModelR2022b_0617/Controler/PID Controller/N Copy/Disabled'
|
||||
// '<S42>' : 'SimModelR2022b_0617/Controler/PID Controller/N Gain/Internal Parameters'
|
||||
// '<S43>' : 'SimModelR2022b_0617/Controler/PID Controller/P Copy/Disabled'
|
||||
// '<S44>' : 'SimModelR2022b_0617/Controler/PID Controller/Parallel P Gain/Internal Parameters'
|
||||
// '<S45>' : 'SimModelR2022b_0617/Controler/PID Controller/Reset Signal/Disabled'
|
||||
// '<S46>' : 'SimModelR2022b_0617/Controler/PID Controller/Saturation/Passthrough'
|
||||
// '<S47>' : 'SimModelR2022b_0617/Controler/PID Controller/Saturation Fdbk/Disabled'
|
||||
// '<S48>' : 'SimModelR2022b_0617/Controler/PID Controller/Sum/Sum_PID'
|
||||
// '<S49>' : 'SimModelR2022b_0617/Controler/PID Controller/Sum Fdbk/Disabled'
|
||||
// '<S50>' : 'SimModelR2022b_0617/Controler/PID Controller/Tracking Mode/Disabled'
|
||||
// '<S51>' : 'SimModelR2022b_0617/Controler/PID Controller/Tracking Mode Sum/Passthrough'
|
||||
// '<S52>' : 'SimModelR2022b_0617/Controler/PID Controller/Tsamp - Integral/TsSignalSpecification'
|
||||
// '<S53>' : 'SimModelR2022b_0617/Controler/PID Controller/Tsamp - Ngain/Passthrough'
|
||||
// '<S54>' : 'SimModelR2022b_0617/Controler/PID Controller/postSat Signal/Forward_Path'
|
||||
// '<S55>' : 'SimModelR2022b_0617/Controler/PID Controller/preInt Signal/Internal PreInt'
|
||||
// '<S56>' : 'SimModelR2022b_0617/Controler/PID Controller/preSat Signal/Forward_Path'
|
||||
// '<S57>' : 'SimModelR2022b_0617/Controler/PID Controller1/Anti-windup'
|
||||
// '<S58>' : 'SimModelR2022b_0617/Controler/PID Controller1/D Gain'
|
||||
// '<S59>' : 'SimModelR2022b_0617/Controler/PID Controller1/External Derivative'
|
||||
// '<S60>' : 'SimModelR2022b_0617/Controler/PID Controller1/Filter'
|
||||
// '<S61>' : 'SimModelR2022b_0617/Controler/PID Controller1/Filter ICs'
|
||||
// '<S62>' : 'SimModelR2022b_0617/Controler/PID Controller1/I Gain'
|
||||
// '<S63>' : 'SimModelR2022b_0617/Controler/PID Controller1/Ideal P Gain'
|
||||
// '<S64>' : 'SimModelR2022b_0617/Controler/PID Controller1/Ideal P Gain Fdbk'
|
||||
// '<S65>' : 'SimModelR2022b_0617/Controler/PID Controller1/Integrator'
|
||||
// '<S66>' : 'SimModelR2022b_0617/Controler/PID Controller1/Integrator ICs'
|
||||
// '<S67>' : 'SimModelR2022b_0617/Controler/PID Controller1/N Copy'
|
||||
// '<S68>' : 'SimModelR2022b_0617/Controler/PID Controller1/N Gain'
|
||||
// '<S69>' : 'SimModelR2022b_0617/Controler/PID Controller1/P Copy'
|
||||
// '<S70>' : 'SimModelR2022b_0617/Controler/PID Controller1/Parallel P Gain'
|
||||
// '<S71>' : 'SimModelR2022b_0617/Controler/PID Controller1/Reset Signal'
|
||||
// '<S72>' : 'SimModelR2022b_0617/Controler/PID Controller1/Saturation'
|
||||
// '<S73>' : 'SimModelR2022b_0617/Controler/PID Controller1/Saturation Fdbk'
|
||||
// '<S74>' : 'SimModelR2022b_0617/Controler/PID Controller1/Sum'
|
||||
// '<S75>' : 'SimModelR2022b_0617/Controler/PID Controller1/Sum Fdbk'
|
||||
// '<S76>' : 'SimModelR2022b_0617/Controler/PID Controller1/Tracking Mode'
|
||||
// '<S77>' : 'SimModelR2022b_0617/Controler/PID Controller1/Tracking Mode Sum'
|
||||
// '<S78>' : 'SimModelR2022b_0617/Controler/PID Controller1/Tsamp - Integral'
|
||||
// '<S79>' : 'SimModelR2022b_0617/Controler/PID Controller1/Tsamp - Ngain'
|
||||
// '<S80>' : 'SimModelR2022b_0617/Controler/PID Controller1/postSat Signal'
|
||||
// '<S81>' : 'SimModelR2022b_0617/Controler/PID Controller1/preInt Signal'
|
||||
// '<S82>' : 'SimModelR2022b_0617/Controler/PID Controller1/preSat Signal'
|
||||
// '<S83>' : 'SimModelR2022b_0617/Controler/PID Controller1/Anti-windup/Passthrough'
|
||||
// '<S84>' : 'SimModelR2022b_0617/Controler/PID Controller1/D Gain/Internal Parameters'
|
||||
// '<S85>' : 'SimModelR2022b_0617/Controler/PID Controller1/External Derivative/Error'
|
||||
// '<S86>' : 'SimModelR2022b_0617/Controler/PID Controller1/Filter/Disc. Forward Euler Filter'
|
||||
// '<S87>' : 'SimModelR2022b_0617/Controler/PID Controller1/Filter ICs/Internal IC - Filter'
|
||||
// '<S88>' : 'SimModelR2022b_0617/Controler/PID Controller1/I Gain/Internal Parameters'
|
||||
// '<S89>' : 'SimModelR2022b_0617/Controler/PID Controller1/Ideal P Gain/Passthrough'
|
||||
// '<S90>' : 'SimModelR2022b_0617/Controler/PID Controller1/Ideal P Gain Fdbk/Disabled'
|
||||
// '<S91>' : 'SimModelR2022b_0617/Controler/PID Controller1/Integrator/Discrete'
|
||||
// '<S92>' : 'SimModelR2022b_0617/Controler/PID Controller1/Integrator ICs/Internal IC'
|
||||
// '<S93>' : 'SimModelR2022b_0617/Controler/PID Controller1/N Copy/Disabled'
|
||||
// '<S94>' : 'SimModelR2022b_0617/Controler/PID Controller1/N Gain/Internal Parameters'
|
||||
// '<S95>' : 'SimModelR2022b_0617/Controler/PID Controller1/P Copy/Disabled'
|
||||
// '<S96>' : 'SimModelR2022b_0617/Controler/PID Controller1/Parallel P Gain/Internal Parameters'
|
||||
// '<S97>' : 'SimModelR2022b_0617/Controler/PID Controller1/Reset Signal/Disabled'
|
||||
// '<S98>' : 'SimModelR2022b_0617/Controler/PID Controller1/Saturation/Passthrough'
|
||||
// '<S99>' : 'SimModelR2022b_0617/Controler/PID Controller1/Saturation Fdbk/Disabled'
|
||||
// '<S100>' : 'SimModelR2022b_0617/Controler/PID Controller1/Sum/Sum_PID'
|
||||
// '<S101>' : 'SimModelR2022b_0617/Controler/PID Controller1/Sum Fdbk/Disabled'
|
||||
// '<S102>' : 'SimModelR2022b_0617/Controler/PID Controller1/Tracking Mode/Disabled'
|
||||
// '<S103>' : 'SimModelR2022b_0617/Controler/PID Controller1/Tracking Mode Sum/Passthrough'
|
||||
// '<S104>' : 'SimModelR2022b_0617/Controler/PID Controller1/Tsamp - Integral/TsSignalSpecification'
|
||||
// '<S105>' : 'SimModelR2022b_0617/Controler/PID Controller1/Tsamp - Ngain/Passthrough'
|
||||
// '<S106>' : 'SimModelR2022b_0617/Controler/PID Controller1/postSat Signal/Forward_Path'
|
||||
// '<S107>' : 'SimModelR2022b_0617/Controler/PID Controller1/preInt Signal/Internal PreInt'
|
||||
// '<S108>' : 'SimModelR2022b_0617/Controler/PID Controller1/preSat Signal/Forward_Path'
|
||||
// '<S109>' : 'SimModelR2022b_0617/Controler/PID Controller2/Anti-windup'
|
||||
// '<S110>' : 'SimModelR2022b_0617/Controler/PID Controller2/D Gain'
|
||||
// '<S111>' : 'SimModelR2022b_0617/Controler/PID Controller2/External Derivative'
|
||||
// '<S112>' : 'SimModelR2022b_0617/Controler/PID Controller2/Filter'
|
||||
// '<S113>' : 'SimModelR2022b_0617/Controler/PID Controller2/Filter ICs'
|
||||
// '<S114>' : 'SimModelR2022b_0617/Controler/PID Controller2/I Gain'
|
||||
// '<S115>' : 'SimModelR2022b_0617/Controler/PID Controller2/Ideal P Gain'
|
||||
// '<S116>' : 'SimModelR2022b_0617/Controler/PID Controller2/Ideal P Gain Fdbk'
|
||||
// '<S117>' : 'SimModelR2022b_0617/Controler/PID Controller2/Integrator'
|
||||
// '<S118>' : 'SimModelR2022b_0617/Controler/PID Controller2/Integrator ICs'
|
||||
// '<S119>' : 'SimModelR2022b_0617/Controler/PID Controller2/N Copy'
|
||||
// '<S120>' : 'SimModelR2022b_0617/Controler/PID Controller2/N Gain'
|
||||
// '<S121>' : 'SimModelR2022b_0617/Controler/PID Controller2/P Copy'
|
||||
// '<S122>' : 'SimModelR2022b_0617/Controler/PID Controller2/Parallel P Gain'
|
||||
// '<S123>' : 'SimModelR2022b_0617/Controler/PID Controller2/Reset Signal'
|
||||
// '<S124>' : 'SimModelR2022b_0617/Controler/PID Controller2/Saturation'
|
||||
// '<S125>' : 'SimModelR2022b_0617/Controler/PID Controller2/Saturation Fdbk'
|
||||
// '<S126>' : 'SimModelR2022b_0617/Controler/PID Controller2/Sum'
|
||||
// '<S127>' : 'SimModelR2022b_0617/Controler/PID Controller2/Sum Fdbk'
|
||||
// '<S128>' : 'SimModelR2022b_0617/Controler/PID Controller2/Tracking Mode'
|
||||
// '<S129>' : 'SimModelR2022b_0617/Controler/PID Controller2/Tracking Mode Sum'
|
||||
// '<S130>' : 'SimModelR2022b_0617/Controler/PID Controller2/Tsamp - Integral'
|
||||
// '<S131>' : 'SimModelR2022b_0617/Controler/PID Controller2/Tsamp - Ngain'
|
||||
// '<S132>' : 'SimModelR2022b_0617/Controler/PID Controller2/postSat Signal'
|
||||
// '<S133>' : 'SimModelR2022b_0617/Controler/PID Controller2/preInt Signal'
|
||||
// '<S134>' : 'SimModelR2022b_0617/Controler/PID Controller2/preSat Signal'
|
||||
// '<S135>' : 'SimModelR2022b_0617/Controler/PID Controller2/Anti-windup/Passthrough'
|
||||
// '<S136>' : 'SimModelR2022b_0617/Controler/PID Controller2/D Gain/Internal Parameters'
|
||||
// '<S137>' : 'SimModelR2022b_0617/Controler/PID Controller2/External Derivative/Error'
|
||||
// '<S138>' : 'SimModelR2022b_0617/Controler/PID Controller2/Filter/Disc. Forward Euler Filter'
|
||||
// '<S139>' : 'SimModelR2022b_0617/Controler/PID Controller2/Filter ICs/Internal IC - Filter'
|
||||
// '<S140>' : 'SimModelR2022b_0617/Controler/PID Controller2/I Gain/Internal Parameters'
|
||||
// '<S141>' : 'SimModelR2022b_0617/Controler/PID Controller2/Ideal P Gain/Passthrough'
|
||||
// '<S142>' : 'SimModelR2022b_0617/Controler/PID Controller2/Ideal P Gain Fdbk/Disabled'
|
||||
// '<S143>' : 'SimModelR2022b_0617/Controler/PID Controller2/Integrator/Discrete'
|
||||
// '<S144>' : 'SimModelR2022b_0617/Controler/PID Controller2/Integrator ICs/Internal IC'
|
||||
// '<S145>' : 'SimModelR2022b_0617/Controler/PID Controller2/N Copy/Disabled'
|
||||
// '<S146>' : 'SimModelR2022b_0617/Controler/PID Controller2/N Gain/Internal Parameters'
|
||||
// '<S147>' : 'SimModelR2022b_0617/Controler/PID Controller2/P Copy/Disabled'
|
||||
// '<S148>' : 'SimModelR2022b_0617/Controler/PID Controller2/Parallel P Gain/Internal Parameters'
|
||||
// '<S149>' : 'SimModelR2022b_0617/Controler/PID Controller2/Reset Signal/Disabled'
|
||||
// '<S150>' : 'SimModelR2022b_0617/Controler/PID Controller2/Saturation/Passthrough'
|
||||
// '<S151>' : 'SimModelR2022b_0617/Controler/PID Controller2/Saturation Fdbk/Disabled'
|
||||
// '<S152>' : 'SimModelR2022b_0617/Controler/PID Controller2/Sum/Sum_PID'
|
||||
// '<S153>' : 'SimModelR2022b_0617/Controler/PID Controller2/Sum Fdbk/Disabled'
|
||||
// '<S154>' : 'SimModelR2022b_0617/Controler/PID Controller2/Tracking Mode/Disabled'
|
||||
// '<S155>' : 'SimModelR2022b_0617/Controler/PID Controller2/Tracking Mode Sum/Passthrough'
|
||||
// '<S156>' : 'SimModelR2022b_0617/Controler/PID Controller2/Tsamp - Integral/TsSignalSpecification'
|
||||
// '<S157>' : 'SimModelR2022b_0617/Controler/PID Controller2/Tsamp - Ngain/Passthrough'
|
||||
// '<S158>' : 'SimModelR2022b_0617/Controler/PID Controller2/postSat Signal/Forward_Path'
|
||||
// '<S159>' : 'SimModelR2022b_0617/Controler/PID Controller2/preInt Signal/Internal PreInt'
|
||||
// '<S160>' : 'SimModelR2022b_0617/Controler/PID Controller2/preSat Signal/Forward_Path'
|
||||
|
||||
#endif // Controler_h_
|
||||
|
||||
//
|
||||
// File trailer for generated code.
|
||||
//
|
||||
// [EOF]
|
||||
//
|
||||
31
src/pAUV150/Controler/Controler_private.h
Normal file
31
src/pAUV150/Controler/Controler_private.h
Normal file
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// Academic License - for use in teaching, academic research, and meeting
|
||||
// course requirements at degree granting institutions only. Not for
|
||||
// government, commercial, or other organizational use.
|
||||
//
|
||||
// File: Controler_private.h
|
||||
//
|
||||
// Code generated for Simulink model 'Controler'.
|
||||
//
|
||||
// Model version : 5.11
|
||||
// Simulink Coder version : 24.2 (R2024b) 21-Jun-2024
|
||||
// C/C++ source code generated on : Tue Jun 17 18:31:17 2025
|
||||
//
|
||||
// Target selection: ert.tlc
|
||||
// Embedded hardware selection: Intel->x86-64 (Linux 64)
|
||||
// Code generation objectives:
|
||||
// 1. Execution efficiency
|
||||
// 2. RAM efficiency
|
||||
// Validation result: Not run
|
||||
//
|
||||
#ifndef Controler_private_h_
|
||||
#define Controler_private_h_
|
||||
#include "rtwtypes.h"
|
||||
#include "Controler_types.h"
|
||||
#endif // Controler_private_h_
|
||||
|
||||
//
|
||||
// File trailer for generated code.
|
||||
//
|
||||
// [EOF]
|
||||
//
|
||||
29
src/pAUV150/Controler/Controler_types.h
Normal file
29
src/pAUV150/Controler/Controler_types.h
Normal file
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// Academic License - for use in teaching, academic research, and meeting
|
||||
// course requirements at degree granting institutions only. Not for
|
||||
// government, commercial, or other organizational use.
|
||||
//
|
||||
// File: Controler_types.h
|
||||
//
|
||||
// Code generated for Simulink model 'Controler'.
|
||||
//
|
||||
// Model version : 5.11
|
||||
// Simulink Coder version : 24.2 (R2024b) 21-Jun-2024
|
||||
// C/C++ source code generated on : Tue Jun 17 18:31:17 2025
|
||||
//
|
||||
// Target selection: ert.tlc
|
||||
// Embedded hardware selection: Intel->x86-64 (Linux 64)
|
||||
// Code generation objectives:
|
||||
// 1. Execution efficiency
|
||||
// 2. RAM efficiency
|
||||
// Validation result: Not run
|
||||
//
|
||||
#ifndef Controler_types_h_
|
||||
#define Controler_types_h_
|
||||
#endif // Controler_types_h_
|
||||
|
||||
//
|
||||
// File trailer for generated code.
|
||||
//
|
||||
// [EOF]
|
||||
//
|
||||
106
src/pAUV150/Controler/rtwtypes.h
Normal file
106
src/pAUV150/Controler/rtwtypes.h
Normal file
@@ -0,0 +1,106 @@
|
||||
//
|
||||
// Academic License - for use in teaching, academic research, and meeting
|
||||
// course requirements at degree granting institutions only. Not for
|
||||
// government, commercial, or other organizational use.
|
||||
//
|
||||
// File: rtwtypes.h
|
||||
//
|
||||
// Code generated for Simulink model 'Controler'.
|
||||
//
|
||||
// Model version : 5.11
|
||||
// Simulink Coder version : 24.2 (R2024b) 21-Jun-2024
|
||||
// C/C++ source code generated on : Tue Jun 17 18:31:17 2025
|
||||
//
|
||||
// Target selection: ert.tlc
|
||||
// Embedded hardware selection: Intel->x86-64 (Linux 64)
|
||||
// Code generation objectives:
|
||||
// 1. Execution efficiency
|
||||
// 2. RAM efficiency
|
||||
// Validation result: Not run
|
||||
//
|
||||
|
||||
#ifndef RTWTYPES_H
|
||||
#define RTWTYPES_H
|
||||
|
||||
// Logical type definitions
|
||||
#if (!defined(__cplusplus))
|
||||
#ifndef false
|
||||
#define false (0U)
|
||||
#endif
|
||||
|
||||
#ifndef true
|
||||
#define true (1U)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//=======================================================================*
|
||||
// Target hardware information
|
||||
// Device type: Intel->x86-64 (Linux 64)
|
||||
// Number of bits: char: 8 short: 16 int: 32
|
||||
// long: 64 long long: 64
|
||||
// native word size: 64
|
||||
// Byte ordering: LittleEndian
|
||||
// Signed integer division rounds to: Zero
|
||||
// Shift right on a signed integer as arithmetic shift: on
|
||||
// =======================================================================
|
||||
|
||||
//=======================================================================*
|
||||
// Fixed width word size data types: *
|
||||
// int8_T, int16_T, int32_T - signed 8, 16, or 32 bit integers *
|
||||
// uint8_T, uint16_T, uint32_T - unsigned 8, 16, or 32 bit integers *
|
||||
// real32_T, real64_T - 32 and 64 bit floating point numbers *
|
||||
// =======================================================================
|
||||
typedef signed char int8_T;
|
||||
typedef unsigned char uint8_T;
|
||||
typedef short int16_T;
|
||||
typedef unsigned short uint16_T;
|
||||
typedef int int32_T;
|
||||
typedef unsigned int uint32_T;
|
||||
typedef long int64_T;
|
||||
typedef unsigned long uint64_T;
|
||||
typedef float real32_T;
|
||||
typedef double real64_T;
|
||||
|
||||
//===========================================================================*
|
||||
// Generic type definitions: boolean_T, char_T, byte_T, int_T, uint_T, *
|
||||
// real_T, time_T, ulong_T, ulonglong_T. *
|
||||
// ===========================================================================
|
||||
typedef double real_T;
|
||||
typedef double time_T;
|
||||
typedef unsigned char boolean_T;
|
||||
typedef int int_T;
|
||||
typedef unsigned int uint_T;
|
||||
typedef unsigned long ulong_T;
|
||||
typedef unsigned long long ulonglong_T;
|
||||
typedef char char_T;
|
||||
typedef unsigned char uchar_T;
|
||||
typedef char_T byte_T;
|
||||
|
||||
//=======================================================================*
|
||||
// Min and Max: *
|
||||
// int8_T, int16_T, int32_T - signed 8, 16, or 32 bit integers *
|
||||
// uint8_T, uint16_T, uint32_T - unsigned 8, 16, or 32 bit integers *
|
||||
// =======================================================================
|
||||
#define MAX_int8_T ((int8_T)(127))
|
||||
#define MIN_int8_T ((int8_T)(-128))
|
||||
#define MAX_uint8_T ((uint8_T)(255U))
|
||||
#define MAX_int16_T ((int16_T)(32767))
|
||||
#define MIN_int16_T ((int16_T)(-32768))
|
||||
#define MAX_uint16_T ((uint16_T)(65535U))
|
||||
#define MAX_int32_T ((int32_T)(2147483647))
|
||||
#define MIN_int32_T ((int32_T)(-2147483647-1))
|
||||
#define MAX_uint32_T ((uint32_T)(0xFFFFFFFFU))
|
||||
#define MAX_int64_T ((int64_T)(9223372036854775807L))
|
||||
#define MIN_int64_T ((int64_T)(-9223372036854775807L-1L))
|
||||
#define MAX_uint64_T ((uint64_T)(0xFFFFFFFFFFFFFFFFUL))
|
||||
|
||||
// Block D-Work pointer type
|
||||
typedef void * pointer_T;
|
||||
|
||||
#endif // RTWTYPES_H
|
||||
|
||||
//
|
||||
// File trailer for generated code.
|
||||
//
|
||||
// [EOF]
|
||||
//
|
||||
Reference in New Issue
Block a user