修改missions and controller

This commit is contained in:
2025-07-06 23:07:11 +08:00
parent c860d2e311
commit 796d642563
14 changed files with 398 additions and 472 deletions

View File

@@ -5,7 +5,7 @@ Community = alder
MOOSTimeWarp = 1
LatOrigin = 43.825300
LongOrigin = -70.330400
LongOrigin = -70.330400
//------------------------------------------
// Antler config block
@@ -16,7 +16,7 @@ ProcessConfig = ANTLER
Run = MOOSDB @ NewConsole = false
//Run = uSimMarineV22 @ NewConsole = false
Run = pNodeReporter @ NewConsole = false
//Run = pLogger @ NewConsole = false
//Run = pLogger @ NewConsole = false
Run = pMarineViewer @ NewConsole = false
Run = uProcessWatch @ NewConsole = false
Run = pHelmIvP @ NewConsole = false
@@ -24,6 +24,9 @@ ProcessConfig = ANTLER
Run = pShare @ NewConsole = false
}
//------------------------------------------
// pShare config block
ProcessConfig = pShare
{
AppTick = 10
@@ -31,7 +34,7 @@ ProcessConfig = pShare
//UUV 信息
//output = src_name = NODE_REPORT*, route = 192.168.137.7:8085
//App 信息
output = src_name = APPCAST*, route = 192.168.137.7:8085
//output = src_name = APPCAST*, route = 192.168.137.7:8085
//路径点信息
//output = src_name = VIEW*, route = 192.168.137.7:8085
@@ -81,10 +84,11 @@ ProcessConfig = pHelmIvP
AppTick = 4
CommsTick = 4
Behaviors = alpha.bhv
Behaviors = gly_1.bhv
Verbose = quiet
Domain = course:0:359:360
Domain = speed:0:4:21
Domain = depth:0:100:101
//IVP_BEHAVIOR_DIR = ../../lib
@@ -135,12 +139,12 @@ ProcessConfig = pMarineViewer
TIFF_FILE = forrest19.tif
set_pan_x = -90
set_pan_y = -280
zoom = 0.65
zoom = 1
vehicle_shape_scale = 1.5
hash_delta = 50
hash_shade = 0.4
hash_viewable = true
VName = abc
scope = ODOMETRY_DIST
// Appcast configuration
@@ -172,6 +176,9 @@ ProcessConfig = pNodeReporter
//vessel_type = auv
}
//------------------------------------------
// pAUV150 config block
ProcessConfig = pAUV150
{
AppTick = 10
@@ -180,15 +187,20 @@ ProcessConfig = pAUV150
//server_host = 10.127.0.18
//server_host = 127.0.0.1
//server_host = 192.168.137.1
//server_host = 192.168.220.1
server_host = 192.168.43.131
LatOrigin = 43.825300
LongOrigin = -70.330400
server_host = 192.168.220.1
//server_host = 192.168.43.131
//LatOrigin = 43.825300
//LongOrigin = -70.330400
LatOrigin = 43.825750
LongOrigin = -70.329158
ControlFrequency = 10
}
//------------------------------------------
// pMotionControler config block
ProcessConfig = pMotionControler
{
AppTick = 10
@@ -196,6 +208,9 @@ ProcessConfig = pMotionControler
config_file = /home/zjk/project/moos-ivp-extend/missions/alder/ControlParam.json
}
//------------------------------------------
// pLogger config block
ProcessConfig = pLogger
{
AppTick = 10

View File

@@ -22,6 +22,7 @@ ProcessConfig = ANTLER
//------------------------------------------
// pShare config block
ProcessConfig = pShare
{
AppTick = 10
@@ -41,6 +42,7 @@ ProcessConfig = pShare
//------------------------------------------
// uProcessWatch config block
ProcessConfig = uProcessWatch
{
AppTick = 4
@@ -67,7 +69,7 @@ ProcessConfig = pMarineViewer
TIFF_FILE = forrest19.tif
set_pan_x = -90
set_pan_y = -280
zoom = 0.65
zoom = 1
vehicle_shape_scale = 1.5
hash_delta = 50
hash_shade = 0.4
@@ -89,7 +91,8 @@ ProcessConfig = pMarineViewer
BUTTON_TWO = RETURN # RETURN=true
}
//------------------------------------------
// pLogger config block
ProcessConfig = pLogger
{

View File

@@ -22,6 +22,9 @@ ProcessConfig = ANTLER
Run = pShare @ NewConsole = false
}
//------------------------------------------
// pShare config block
ProcessConfig = pShare
{
AppTick = 10
@@ -64,10 +67,11 @@ ProcessConfig = pHelmIvP
AppTick = 4
CommsTick = 4
Behaviors = alpha.bhv
Behaviors = gly_1.bhv
Verbose = quiet
Domain = course:0:359:360
Domain = speed:0:4:21
Domain = depth:0:100:101
//IVP_BEHAVIOR_DIR = ../../lib
@@ -83,13 +87,16 @@ ProcessConfig = pNodeReporter
AppTick = 2
CommsTick = 2
platform_length = 1.5 // meters
platform_length = 2 // meters
//platform_beam = 0.2 // meters
platform_type = auv
platform_color = dodger_blue
//vessel_type = auv
}
//------------------------------------------
// pAUV150 config block
ProcessConfig = pAUV150
{
AppTick = 10
@@ -98,13 +105,18 @@ ProcessConfig = pAUV150
//server_host = 10.127.0.18
//server_host = 127.0.0.1
server_host = 192.168.137.1
LatOrigin = 43.825300
LongOrigin = -70.330400
//LatOrigin = 43.825300
//LongOrigin = -70.330400
LatOrigin = 43.825750
LongOrigin = -70.329158
ControlFrequency = 10
}
//------------------------------------------
// pLogger config block
ProcessConfig = pLogger
{
AppTick = 10

74
missions/alpha/gly_1.bhv Normal file
View File

@@ -0,0 +1,74 @@
//-------- FILE: gly_1.bhv -------------
initialize DEPLOY = false
initialize RETURN = false
//----------------------------------------------
Behavior = BHV_Waypoint
{
name = waypt_survey
pwt = 100
condition = RETURN = false
condition = DEPLOY = true
//endflag = RETURN = true
endflag = MISSION = complete
configflag = CRUISE_SPD = $[SPEED]
//configflag = OSPOS = $[OSX],$[OSY]
activeflag = INFO=$[OWNSHIP]
activeflag = INFO=$[BHVNAME]
activeflag = INFO=$[BHVTYPE]
cycleflag = CINFO=$[OSX],$[OSY]
wptflag = PREV=$(PX),$(PY)
wptflag = NEXT=$(NX),$(NY)
wptflag = TEST=$(X),$(Y)
wptflag = OSPOS=$(OSX),$(OSY)
wptflag_on_start = true
updates = WPT_UPDATE
// perpetual = true
speed_alt = 1.2
use_alt_speed = true
lead = 8
lead_damper = 1
lead_to_start = true
speed = 2 // meters per second
capture_line = true
capture_radius = 5.0
slip_radius = 15.0
efficiency_measure = all
// points = pts={107.5,-53.5:112,-43.8:112,-46.1:111.7,-49.3:108.3,-52.7:107.7,-53.3}
// polygon = -50,-100: -50,-300: 25, -300: 25, -100: 100, -100: 100, -300: 175, -300: 175, -100
polygon = -50,-100: 0,-300: 50, -287.5: 0, -87.5: 50, -75: 100, -275: 150, -262.5: 100, -62.5
// polygon = -50,-100: -50,-170.71: 0,-220.71: 70.71,-220.71: 120.71,-170.71: 120.71,-100: 70.71,-50: 0,-50: -50,-100
// polygon = -50,-100: -50,-300
order = normal
repeat = 0
visual_hints = nextpt_color=yellow
visual_hints = nextpt_vertex_size=8
visual_hints = nextpt_lcolor=gray70
visual_hints = vertex_color=dodger_blue, edge_color=white
visual_hints = vertex_size=5, edge_size=1
}
//----------------------------------------------
Behavior = BHV_ConstantDepth
{
name = bhv_const_depth
pwt = 100
condition = DEPLOY = true
perpetual = true
updates = DEPTH_VALUE
depth = 2
duration = no-time-limit
peakwidth = 8
basewidth = 12
summitdelta = 10
}

View File

@@ -7,9 +7,9 @@
//
// Code generated for Simulink model 'Controler'.
//
// Model version : 5.95
// Model version : 5.105
// Simulink Coder version : 24.2 (R2024b) 21-Jun-2024
// C/C++ source code generated on : Tue Jul 1 15:26:11 2025
// C/C++ source code generated on : Thu Jul 3 16:12:45 2025
//
// Target selection: ert.tlc
// Embedded hardware selection: Intel->x86-64 (Linux 64)
@@ -27,18 +27,16 @@
void Controler::step()
{
real_T mod_error;
real_T rtb_DeadZone;
real_T rtb_FilterCoefficient;
real_T rtb_FilterCoefficient_a;
real_T rtb_FilterCoefficient_lc;
real_T rtb_Filter_b;
real_T rtb_IntegralGain;
real_T rtb_Integrator_l;
real_T rtb_Integrator_p;
real_T rtb_Sum;
real_T rtb_Switch;
real_T rtb_depth_error;
int8_T rtb_Switch1;
int8_T tmp;
int8_T tmp_0;
boolean_T rtb_RelationalOperator;
boolean_T rtb_fixforDTpropagationissue;
@@ -69,48 +67,48 @@ void Controler::step()
// End of MATLAB Function: '<S1>/MATLAB Function1'
// Gain: '<S153>/Filter Coefficient' incorporates:
// DiscreteIntegrator: '<S145>/Filter'
// Gain: '<S143>/Derivative Gain'
// Sum: '<S145>/SumD'
// Gain: '<S98>/Filter Coefficient' incorporates:
// DiscreteIntegrator: '<S90>/Filter'
// Gain: '<S88>/Derivative Gain'
// Sum: '<S90>/SumD'
rtb_FilterCoefficient = (rtP.pid_heading.D * mod_error - rtDW.Filter_DSTATE) *
rtP.pid_heading.N;
// Sum: '<S159>/Sum' incorporates:
// DiscreteIntegrator: '<S150>/Integrator'
// Gain: '<S155>/Proportional Gain'
// Sum: '<S104>/Sum' incorporates:
// DiscreteIntegrator: '<S95>/Integrator'
// Gain: '<S100>/Proportional Gain'
rtb_Integrator_l = (rtP.pid_heading.P * mod_error + rtDW.Integrator_DSTATE) +
rtb_FilterCoefficient;
// DeadZone: '<S142>/DeadZone'
// DeadZone: '<S87>/DeadZone'
if (rtb_Integrator_l > 35.0) {
rtb_Sum = rtb_Integrator_l - 35.0;
rtb_IntegralGain = rtb_Integrator_l - 35.0;
} else if (rtb_Integrator_l >= -35.0) {
rtb_Sum = 0.0;
rtb_IntegralGain = 0.0;
} else {
rtb_Sum = rtb_Integrator_l - -35.0;
rtb_IntegralGain = rtb_Integrator_l - -35.0;
}
// End of DeadZone: '<S142>/DeadZone'
// End of DeadZone: '<S87>/DeadZone'
// RelationalOperator: '<S140>/Relational Operator' incorporates:
// Constant: '<S140>/Clamping_zero'
// RelationalOperator: '<S85>/Relational Operator' incorporates:
// Constant: '<S85>/Clamping_zero'
rtb_RelationalOperator = (rtb_Sum != 0.0);
rtb_RelationalOperator = (rtb_IntegralGain != 0.0);
// RelationalOperator: '<S140>/fix for DT propagation issue' incorporates:
// Constant: '<S140>/Clamping_zero'
// RelationalOperator: '<S85>/fix for DT propagation issue' incorporates:
// Constant: '<S85>/Clamping_zero'
rtb_fixforDTpropagationissue = (rtb_Sum > 0.0);
rtb_fixforDTpropagationissue = (rtb_IntegralGain > 0.0);
// Gain: '<S147>/Integral Gain'
rtb_Sum = rtP.pid_heading.I * mod_error;
// Gain: '<S92>/Integral Gain'
rtb_IntegralGain = rtP.pid_heading.I * mod_error;
// Switch: '<S140>/Switch1' incorporates:
// Constant: '<S140>/Constant'
// Constant: '<S140>/Constant2'
// Switch: '<S85>/Switch1' incorporates:
// Constant: '<S85>/Constant'
// Constant: '<S85>/Constant2'
if (rtb_fixforDTpropagationissue) {
tmp = 1;
@@ -118,189 +116,87 @@ void Controler::step()
tmp = -1;
}
// Switch: '<S140>/Switch2' incorporates:
// Constant: '<S140>/Clamping_zero'
// Constant: '<S140>/Constant3'
// Constant: '<S140>/Constant4'
// RelationalOperator: '<S140>/fix for DT propagation issue1'
// Switch: '<S85>/Switch2' incorporates:
// Constant: '<S85>/Clamping_zero'
// Constant: '<S85>/Constant3'
// Constant: '<S85>/Constant4'
// RelationalOperator: '<S85>/fix for DT propagation issue1'
if (rtb_Sum > 0.0) {
rtb_Switch1 = 1;
if (rtb_IntegralGain > 0.0) {
tmp_0 = 1;
} else {
rtb_Switch1 = -1;
tmp_0 = -1;
}
// Switch: '<S140>/Switch' incorporates:
// Constant: '<S140>/Constant1'
// Logic: '<S140>/AND3'
// RelationalOperator: '<S140>/Equal1'
// Switch: '<S140>/Switch1'
// Switch: '<S140>/Switch2'
// Switch: '<S85>/Switch' incorporates:
// Constant: '<S85>/Constant1'
// Logic: '<S85>/AND3'
// RelationalOperator: '<S85>/Equal1'
// Switch: '<S85>/Switch1'
// Switch: '<S85>/Switch2'
if (rtb_RelationalOperator && (tmp == rtb_Switch1)) {
if (rtb_RelationalOperator && (tmp == tmp_0)) {
rtb_Switch = 0.0;
} else {
rtb_Switch = rtb_Sum;
rtb_Switch = rtb_IntegralGain;
}
// End of Switch: '<S140>/Switch'
// End of Switch: '<S85>/Switch'
// Saturate: '<S157>/Saturation'
// Saturate: '<S102>/Saturation'
if (rtb_Integrator_l > 35.0) {
rtb_Integrator_l = 35.0;
} else if (rtb_Integrator_l < -35.0) {
rtb_Integrator_l = -35.0;
}
// End of Saturate: '<S157>/Saturation'
// End of Saturate: '<S102>/Saturation'
// Sum: '<S1>/Sum1' incorporates:
// Inport: '<Root>/depth_cmd'
// Inport: '<Root>/z'
rtb_depth_error = rtU.z - rtU.depth_cmd;
rtb_depth_error = rtU.depth_cmd - rtU.z;
// Gain: '<S39>/Integral Gain'
rtb_Sum = rtP.pid_depth.I * rtb_depth_error;
// Gain: '<S38>/Integral Gain'
rtb_IntegralGain = rtP.pid_depth.I * rtb_depth_error;
// Gain: '<S45>/Filter Coefficient' incorporates:
// DiscreteIntegrator: '<S37>/Filter'
// Gain: '<S35>/Derivative Gain'
// Sum: '<S37>/SumD'
// Gain: '<S44>/Filter Coefficient' incorporates:
// DiscreteIntegrator: '<S36>/Filter'
// Gain: '<S34>/Derivative Gain'
// Sum: '<S36>/SumD'
rtb_FilterCoefficient_lc = (rtP.pid_depth.D * rtb_depth_error -
rtb_FilterCoefficient_a = (rtP.pid_depth.D * rtb_depth_error -
rtDW.Filter_DSTATE_m) * rtP.pid_depth.N;
// Sum: '<S51>/Sum' incorporates:
// DiscreteIntegrator: '<S42>/Integrator'
// Gain: '<S47>/Proportional Gain'
// Sum: '<S50>/Sum' incorporates:
// DiscreteIntegrator: '<S41>/Integrator'
// Gain: '<S46>/Proportional Gain'
rtb_Filter_b = (rtP.pid_depth.P * rtb_depth_error + rtDW.Integrator_DSTATE_o)
+ rtb_FilterCoefficient_lc;
// DeadZone: '<S34>/DeadZone'
if (rtb_Filter_b > 30.0) {
rtb_Integrator_p = rtb_Filter_b - 30.0;
// Switch: '<S32>/Switch1' incorporates:
// Constant: '<S32>/Constant'
tmp = 1;
} else {
if (rtb_Filter_b >= -30.0) {
rtb_Integrator_p = 0.0;
} else {
rtb_Integrator_p = rtb_Filter_b - -30.0;
}
// Switch: '<S32>/Switch1' incorporates:
// Constant: '<S32>/Constant2'
tmp = -1;
}
// End of DeadZone: '<S34>/DeadZone'
// Switch: '<S32>/Switch2' incorporates:
// Constant: '<S32>/Clamping_zero'
// Constant: '<S32>/Constant3'
// Constant: '<S32>/Constant4'
// RelationalOperator: '<S32>/fix for DT propagation issue1'
if (rtb_Sum > 0.0) {
rtb_Switch1 = 1;
} else {
rtb_Switch1 = -1;
}
// Switch: '<S32>/Switch' incorporates:
// Constant: '<S32>/Clamping_zero'
// Constant: '<S32>/Constant1'
// Logic: '<S32>/AND3'
// RelationalOperator: '<S32>/Equal1'
// RelationalOperator: '<S32>/Relational Operator'
// Switch: '<S32>/Switch1'
// Switch: '<S32>/Switch2'
if ((rtb_Integrator_p != 0.0) && (tmp == rtb_Switch1)) {
rtb_Integrator_p = 0.0;
} else {
rtb_Integrator_p = rtb_Sum;
}
// End of Switch: '<S32>/Switch'
// Saturate: '<S49>/Saturation'
if (rtb_Filter_b > 30.0) {
rtb_Filter_b = 30.0;
} else if (rtb_Filter_b < -30.0) {
rtb_Filter_b = -30.0;
}
// Sum: '<S1>/Sum2' incorporates:
// Inport: '<Root>/theta'
// Saturate: '<S49>/Saturation'
rtb_Filter_b = rtU.theta - rtb_Filter_b;
// Gain: '<S99>/Filter Coefficient' incorporates:
// DiscreteIntegrator: '<S91>/Filter'
// Gain: '<S89>/Derivative Gain'
// Sum: '<S91>/SumD'
rtb_FilterCoefficient_a = (rtP.pid_pitch.D * rtb_Filter_b -
rtDW.Filter_DSTATE_l) * rtP.pid_pitch.N;
// Sum: '<S105>/Sum' incorporates:
// DiscreteIntegrator: '<S96>/Integrator'
// Gain: '<S101>/Proportional Gain'
rtb_Sum = (rtP.pid_pitch.P * rtb_Filter_b + rtDW.Integrator_DSTATE_f) +
rtb_Sum = (rtP.pid_depth.P * rtb_depth_error + rtDW.Integrator_DSTATE_o) +
rtb_FilterCoefficient_a;
// DeadZone: '<S88>/DeadZone'
if (rtb_Sum > 35.0) {
rtb_IntegralGain = rtb_Sum - 35.0;
} else if (rtb_Sum >= -35.0) {
rtb_IntegralGain = 0.0;
// DeadZone: '<S33>/DeadZone' incorporates:
// Saturate: '<S48>/Saturation'
if (rtb_Sum > 30.0) {
rtb_DeadZone = rtb_Sum - 30.0;
rtb_Sum = 30.0;
} else {
rtb_IntegralGain = rtb_Sum - -35.0;
if (rtb_Sum >= -30.0) {
rtb_DeadZone = 0.0;
} else {
rtb_DeadZone = rtb_Sum - -30.0;
}
if (rtb_Sum < -30.0) {
rtb_Sum = -30.0;
}
}
// End of DeadZone: '<S88>/DeadZone'
// End of DeadZone: '<S33>/DeadZone'
// RelationalOperator: '<S86>/Relational Operator' incorporates:
// Constant: '<S86>/Clamping_zero'
rtb_RelationalOperator = (rtb_IntegralGain != 0.0);
// Switch: '<S86>/Switch1' incorporates:
// Constant: '<S86>/Clamping_zero'
// Constant: '<S86>/Constant'
// Constant: '<S86>/Constant2'
// RelationalOperator: '<S86>/fix for DT propagation issue'
if (rtb_IntegralGain > 0.0) {
rtb_Switch1 = 1;
} else {
rtb_Switch1 = -1;
}
// End of Switch: '<S86>/Switch1'
// Gain: '<S93>/Integral Gain'
rtb_IntegralGain = rtP.pid_pitch.I * rtb_Filter_b;
// Saturate: '<S103>/Saturation'
if (rtb_Sum > 35.0) {
rtb_Sum = 35.0;
} else if (rtb_Sum < -35.0) {
rtb_Sum = -35.0;
}
// End of Saturate: '<S103>/Saturation'
// Update for DiscreteIntegrator: '<S150>/Integrator'
// Update for DiscreteIntegrator: '<S95>/Integrator'
rtDW.Integrator_DSTATE += rtb_Switch;
if (rtDW.Integrator_DSTATE > 15.0) {
rtDW.Integrator_DSTATE = 15.0;
@@ -308,60 +204,62 @@ void Controler::step()
rtDW.Integrator_DSTATE = -15.0;
}
// End of Update for DiscreteIntegrator: '<S150>/Integrator'
// End of Update for DiscreteIntegrator: '<S95>/Integrator'
// Update for DiscreteIntegrator: '<S145>/Filter'
// Update for DiscreteIntegrator: '<S90>/Filter'
rtDW.Filter_DSTATE += 0.1 * rtb_FilterCoefficient;
// Update for DiscreteIntegrator: '<S42>/Integrator'
rtDW.Integrator_DSTATE_o += rtb_Integrator_p;
// Switch: '<S31>/Switch1' incorporates:
// Constant: '<S31>/Clamping_zero'
// Constant: '<S31>/Constant'
// Constant: '<S31>/Constant2'
// RelationalOperator: '<S31>/fix for DT propagation issue'
if (rtb_DeadZone > 0.0) {
tmp = 1;
} else {
tmp = -1;
}
// Switch: '<S31>/Switch2' incorporates:
// Constant: '<S31>/Clamping_zero'
// Constant: '<S31>/Constant3'
// Constant: '<S31>/Constant4'
// RelationalOperator: '<S31>/fix for DT propagation issue1'
if (rtb_IntegralGain > 0.0) {
tmp_0 = 1;
} else {
tmp_0 = -1;
}
// Switch: '<S31>/Switch' incorporates:
// Constant: '<S31>/Clamping_zero'
// Constant: '<S31>/Constant1'
// Logic: '<S31>/AND3'
// RelationalOperator: '<S31>/Equal1'
// RelationalOperator: '<S31>/Relational Operator'
// Switch: '<S31>/Switch1'
// Switch: '<S31>/Switch2'
if ((rtb_DeadZone != 0.0) && (tmp == tmp_0)) {
rtb_IntegralGain = 0.0;
}
// Update for DiscreteIntegrator: '<S41>/Integrator' incorporates:
// Switch: '<S31>/Switch'
rtDW.Integrator_DSTATE_o += rtb_IntegralGain;
if (rtDW.Integrator_DSTATE_o > 10.0) {
rtDW.Integrator_DSTATE_o = 10.0;
} else if (rtDW.Integrator_DSTATE_o < -10.0) {
rtDW.Integrator_DSTATE_o = -10.0;
}
// End of Update for DiscreteIntegrator: '<S42>/Integrator'
// End of Update for DiscreteIntegrator: '<S41>/Integrator'
// Update for DiscreteIntegrator: '<S37>/Filter'
rtDW.Filter_DSTATE_m += 0.1 * rtb_FilterCoefficient_lc;
// Switch: '<S86>/Switch2' incorporates:
// Constant: '<S86>/Clamping_zero'
// Constant: '<S86>/Constant3'
// Constant: '<S86>/Constant4'
// RelationalOperator: '<S86>/fix for DT propagation issue1'
if (rtb_IntegralGain > 0.0) {
tmp = 1;
} else {
tmp = -1;
}
// Switch: '<S86>/Switch' incorporates:
// Constant: '<S86>/Constant1'
// Logic: '<S86>/AND3'
// RelationalOperator: '<S86>/Equal1'
// Switch: '<S86>/Switch2'
if (rtb_RelationalOperator && (rtb_Switch1 == tmp)) {
rtb_IntegralGain = 0.0;
}
// Update for DiscreteIntegrator: '<S96>/Integrator' incorporates:
// Switch: '<S86>/Switch'
rtDW.Integrator_DSTATE_f += rtb_IntegralGain;
if (rtDW.Integrator_DSTATE_f > 15.0) {
rtDW.Integrator_DSTATE_f = 15.0;
} else if (rtDW.Integrator_DSTATE_f < -15.0) {
rtDW.Integrator_DSTATE_f = -15.0;
}
// End of Update for DiscreteIntegrator: '<S96>/Integrator'
// Update for DiscreteIntegrator: '<S91>/Filter'
rtDW.Filter_DSTATE_l += 0.1 * rtb_FilterCoefficient_a;
// Update for DiscreteIntegrator: '<S36>/Filter'
rtDW.Filter_DSTATE_m += 0.1 * rtb_FilterCoefficient_a;
// End of Outputs for SubSystem: '<Root>/Controler'
@@ -385,8 +283,10 @@ void Controler::step()
// Outport: '<Root>/heading_error'
rtY.heading_error = mod_error;
// Outport: '<Root>/pitch_error'
rtY.pitch_error = rtb_Filter_b;
// Outport: '<Root>/pitch_error' incorporates:
// Constant: '<S1>/Constant'
rtY.pitch_error = 0.0;
// Outport: '<Root>/depth_error'
rtY.depth_error = rtb_depth_error;

View File

@@ -7,9 +7,9 @@
//
// Code generated for Simulink model 'Controler'.
//
// Model version : 5.95
// Model version : 5.105
// Simulink Coder version : 24.2 (R2024b) 21-Jun-2024
// C/C++ source code generated on : Tue Jul 1 15:26:11 2025
// C/C++ source code generated on : Thu Jul 3 16:12:45 2025
//
// Target selection: ert.tlc
// Embedded hardware selection: Intel->x86-64 (Linux 64)
@@ -39,12 +39,10 @@ class Controler final
public:
// Block signals and states (default storage) for system '<Root>'
struct DW {
real_T Integrator_DSTATE; // '<S150>/Integrator'
real_T Filter_DSTATE; // '<S145>/Filter'
real_T Integrator_DSTATE_o; // '<S42>/Integrator'
real_T Filter_DSTATE_m; // '<S37>/Filter'
real_T Integrator_DSTATE_f; // '<S96>/Integrator'
real_T Filter_DSTATE_l; // '<S91>/Filter'
real_T Integrator_DSTATE; // '<S95>/Integrator'
real_T Filter_DSTATE; // '<S90>/Filter'
real_T Integrator_DSTATE_o; // '<S41>/Integrator'
real_T Filter_DSTATE_m; // '<S36>/Filter'
};
// External inputs (root inport signals with default storage)
@@ -86,24 +84,17 @@ class Controler final
struct P {
struct_n3jlyiLoC0PV1TieyhpPwD pid_depth;// Variable: pid_depth
// Referenced by:
// '<S35>/Derivative Gain'
// '<S39>/Integral Gain'
// '<S45>/Filter Coefficient'
// '<S47>/Proportional Gain'
// '<S34>/Derivative Gain'
// '<S38>/Integral Gain'
// '<S44>/Filter Coefficient'
// '<S46>/Proportional Gain'
struct_n3jlyiLoC0PV1TieyhpPwD pid_heading;// Variable: pid_heading
// Referenced by:
// '<S143>/Derivative Gain'
// '<S147>/Integral Gain'
// '<S153>/Filter Coefficient'
// '<S155>/Proportional Gain'
struct_n3jlyiLoC0PV1TieyhpPwD pid_pitch;// Variable: pid_pitch
// Referenced by:
// '<S89>/Derivative Gain'
// '<S93>/Integral Gain'
// '<S99>/Filter Coefficient'
// '<S101>/Proportional Gain'
// '<S88>/Derivative Gain'
// '<S92>/Integral Gain'
// '<S98>/Filter Coefficient'
// '<S100>/Proportional Gain'
};
@@ -187,170 +178,115 @@ class Controler final
// '<S1>' : 'SimModel0621_S3/Controler'
// '<S2>' : 'SimModel0621_S3/Controler/MATLAB Function1'
// '<S3>' : 'SimModel0621_S3/Controler/PID Controller1'
// '<S4>' : 'SimModel0621_S3/Controler/PID Controller2'
// '<S5>' : 'SimModel0621_S3/Controler/PID Controller3'
// '<S6>' : 'SimModel0621_S3/Controler/PID Controller1/Anti-windup'
// '<S7>' : 'SimModel0621_S3/Controler/PID Controller1/D Gain'
// '<S8>' : 'SimModel0621_S3/Controler/PID Controller1/External Derivative'
// '<S9>' : 'SimModel0621_S3/Controler/PID Controller1/Filter'
// '<S10>' : 'SimModel0621_S3/Controler/PID Controller1/Filter ICs'
// '<S11>' : 'SimModel0621_S3/Controler/PID Controller1/I Gain'
// '<S12>' : 'SimModel0621_S3/Controler/PID Controller1/Ideal P Gain'
// '<S13>' : 'SimModel0621_S3/Controler/PID Controller1/Ideal P Gain Fdbk'
// '<S14>' : 'SimModel0621_S3/Controler/PID Controller1/Integrator'
// '<S15>' : 'SimModel0621_S3/Controler/PID Controller1/Integrator ICs'
// '<S16>' : 'SimModel0621_S3/Controler/PID Controller1/N Copy'
// '<S17>' : 'SimModel0621_S3/Controler/PID Controller1/N Gain'
// '<S18>' : 'SimModel0621_S3/Controler/PID Controller1/P Copy'
// '<S19>' : 'SimModel0621_S3/Controler/PID Controller1/Parallel P Gain'
// '<S20>' : 'SimModel0621_S3/Controler/PID Controller1/Reset Signal'
// '<S21>' : 'SimModel0621_S3/Controler/PID Controller1/Saturation'
// '<S22>' : 'SimModel0621_S3/Controler/PID Controller1/Saturation Fdbk'
// '<S23>' : 'SimModel0621_S3/Controler/PID Controller1/Sum'
// '<S24>' : 'SimModel0621_S3/Controler/PID Controller1/Sum Fdbk'
// '<S25>' : 'SimModel0621_S3/Controler/PID Controller1/Tracking Mode'
// '<S26>' : 'SimModel0621_S3/Controler/PID Controller1/Tracking Mode Sum'
// '<S27>' : 'SimModel0621_S3/Controler/PID Controller1/Tsamp - Integral'
// '<S28>' : 'SimModel0621_S3/Controler/PID Controller1/Tsamp - Ngain'
// '<S29>' : 'SimModel0621_S3/Controler/PID Controller1/postSat Signal'
// '<S30>' : 'SimModel0621_S3/Controler/PID Controller1/preInt Signal'
// '<S31>' : 'SimModel0621_S3/Controler/PID Controller1/preSat Signal'
// '<S32>' : 'SimModel0621_S3/Controler/PID Controller1/Anti-windup/Disc. Clamping Parallel'
// '<S33>' : 'SimModel0621_S3/Controler/PID Controller1/Anti-windup/Disc. Clamping Parallel/Dead Zone'
// '<S34>' : 'SimModel0621_S3/Controler/PID Controller1/Anti-windup/Disc. Clamping Parallel/Dead Zone/Enabled'
// '<S35>' : 'SimModel0621_S3/Controler/PID Controller1/D Gain/Internal Parameters'
// '<S36>' : 'SimModel0621_S3/Controler/PID Controller1/External Derivative/Error'
// '<S37>' : 'SimModel0621_S3/Controler/PID Controller1/Filter/Disc. Forward Euler Filter'
// '<S38>' : 'SimModel0621_S3/Controler/PID Controller1/Filter ICs/Internal IC - Filter'
// '<S39>' : 'SimModel0621_S3/Controler/PID Controller1/I Gain/Internal Parameters'
// '<S40>' : 'SimModel0621_S3/Controler/PID Controller1/Ideal P Gain/Passthrough'
// '<S41>' : 'SimModel0621_S3/Controler/PID Controller1/Ideal P Gain Fdbk/Disabled'
// '<S42>' : 'SimModel0621_S3/Controler/PID Controller1/Integrator/Discrete'
// '<S43>' : 'SimModel0621_S3/Controler/PID Controller1/Integrator ICs/Internal IC'
// '<S44>' : 'SimModel0621_S3/Controler/PID Controller1/N Copy/Disabled'
// '<S45>' : 'SimModel0621_S3/Controler/PID Controller1/N Gain/Internal Parameters'
// '<S46>' : 'SimModel0621_S3/Controler/PID Controller1/P Copy/Disabled'
// '<S47>' : 'SimModel0621_S3/Controler/PID Controller1/Parallel P Gain/Internal Parameters'
// '<S48>' : 'SimModel0621_S3/Controler/PID Controller1/Reset Signal/Disabled'
// '<S49>' : 'SimModel0621_S3/Controler/PID Controller1/Saturation/Enabled'
// '<S50>' : 'SimModel0621_S3/Controler/PID Controller1/Saturation Fdbk/Disabled'
// '<S51>' : 'SimModel0621_S3/Controler/PID Controller1/Sum/Sum_PID'
// '<S52>' : 'SimModel0621_S3/Controler/PID Controller1/Sum Fdbk/Disabled'
// '<S53>' : 'SimModel0621_S3/Controler/PID Controller1/Tracking Mode/Disabled'
// '<S54>' : 'SimModel0621_S3/Controler/PID Controller1/Tracking Mode Sum/Passthrough'
// '<S55>' : 'SimModel0621_S3/Controler/PID Controller1/Tsamp - Integral/TsSignalSpecification'
// '<S56>' : 'SimModel0621_S3/Controler/PID Controller1/Tsamp - Ngain/Passthrough'
// '<S57>' : 'SimModel0621_S3/Controler/PID Controller1/postSat Signal/Forward_Path'
// '<S58>' : 'SimModel0621_S3/Controler/PID Controller1/preInt Signal/Internal PreInt'
// '<S59>' : 'SimModel0621_S3/Controler/PID Controller1/preSat Signal/Forward_Path'
// '<S60>' : 'SimModel0621_S3/Controler/PID Controller2/Anti-windup'
// '<S61>' : 'SimModel0621_S3/Controler/PID Controller2/D Gain'
// '<S62>' : 'SimModel0621_S3/Controler/PID Controller2/External Derivative'
// '<S63>' : 'SimModel0621_S3/Controler/PID Controller2/Filter'
// '<S64>' : 'SimModel0621_S3/Controler/PID Controller2/Filter ICs'
// '<S65>' : 'SimModel0621_S3/Controler/PID Controller2/I Gain'
// '<S66>' : 'SimModel0621_S3/Controler/PID Controller2/Ideal P Gain'
// '<S67>' : 'SimModel0621_S3/Controler/PID Controller2/Ideal P Gain Fdbk'
// '<S68>' : 'SimModel0621_S3/Controler/PID Controller2/Integrator'
// '<S69>' : 'SimModel0621_S3/Controler/PID Controller2/Integrator ICs'
// '<S70>' : 'SimModel0621_S3/Controler/PID Controller2/N Copy'
// '<S71>' : 'SimModel0621_S3/Controler/PID Controller2/N Gain'
// '<S72>' : 'SimModel0621_S3/Controler/PID Controller2/P Copy'
// '<S73>' : 'SimModel0621_S3/Controler/PID Controller2/Parallel P Gain'
// '<S74>' : 'SimModel0621_S3/Controler/PID Controller2/Reset Signal'
// '<S75>' : 'SimModel0621_S3/Controler/PID Controller2/Saturation'
// '<S76>' : 'SimModel0621_S3/Controler/PID Controller2/Saturation Fdbk'
// '<S77>' : 'SimModel0621_S3/Controler/PID Controller2/Sum'
// '<S78>' : 'SimModel0621_S3/Controler/PID Controller2/Sum Fdbk'
// '<S79>' : 'SimModel0621_S3/Controler/PID Controller2/Tracking Mode'
// '<S80>' : 'SimModel0621_S3/Controler/PID Controller2/Tracking Mode Sum'
// '<S81>' : 'SimModel0621_S3/Controler/PID Controller2/Tsamp - Integral'
// '<S82>' : 'SimModel0621_S3/Controler/PID Controller2/Tsamp - Ngain'
// '<S83>' : 'SimModel0621_S3/Controler/PID Controller2/postSat Signal'
// '<S84>' : 'SimModel0621_S3/Controler/PID Controller2/preInt Signal'
// '<S85>' : 'SimModel0621_S3/Controler/PID Controller2/preSat Signal'
// '<S86>' : 'SimModel0621_S3/Controler/PID Controller2/Anti-windup/Disc. Clamping Parallel'
// '<S87>' : 'SimModel0621_S3/Controler/PID Controller2/Anti-windup/Disc. Clamping Parallel/Dead Zone'
// '<S88>' : 'SimModel0621_S3/Controler/PID Controller2/Anti-windup/Disc. Clamping Parallel/Dead Zone/Enabled'
// '<S89>' : 'SimModel0621_S3/Controler/PID Controller2/D Gain/Internal Parameters'
// '<S90>' : 'SimModel0621_S3/Controler/PID Controller2/External Derivative/Error'
// '<S91>' : 'SimModel0621_S3/Controler/PID Controller2/Filter/Disc. Forward Euler Filter'
// '<S92>' : 'SimModel0621_S3/Controler/PID Controller2/Filter ICs/Internal IC - Filter'
// '<S93>' : 'SimModel0621_S3/Controler/PID Controller2/I Gain/Internal Parameters'
// '<S94>' : 'SimModel0621_S3/Controler/PID Controller2/Ideal P Gain/Passthrough'
// '<S95>' : 'SimModel0621_S3/Controler/PID Controller2/Ideal P Gain Fdbk/Disabled'
// '<S96>' : 'SimModel0621_S3/Controler/PID Controller2/Integrator/Discrete'
// '<S97>' : 'SimModel0621_S3/Controler/PID Controller2/Integrator ICs/Internal IC'
// '<S98>' : 'SimModel0621_S3/Controler/PID Controller2/N Copy/Disabled'
// '<S99>' : 'SimModel0621_S3/Controler/PID Controller2/N Gain/Internal Parameters'
// '<S100>' : 'SimModel0621_S3/Controler/PID Controller2/P Copy/Disabled'
// '<S101>' : 'SimModel0621_S3/Controler/PID Controller2/Parallel P Gain/Internal Parameters'
// '<S102>' : 'SimModel0621_S3/Controler/PID Controller2/Reset Signal/Disabled'
// '<S103>' : 'SimModel0621_S3/Controler/PID Controller2/Saturation/Enabled'
// '<S104>' : 'SimModel0621_S3/Controler/PID Controller2/Saturation Fdbk/Disabled'
// '<S105>' : 'SimModel0621_S3/Controler/PID Controller2/Sum/Sum_PID'
// '<S106>' : 'SimModel0621_S3/Controler/PID Controller2/Sum Fdbk/Disabled'
// '<S107>' : 'SimModel0621_S3/Controler/PID Controller2/Tracking Mode/Disabled'
// '<S108>' : 'SimModel0621_S3/Controler/PID Controller2/Tracking Mode Sum/Passthrough'
// '<S109>' : 'SimModel0621_S3/Controler/PID Controller2/Tsamp - Integral/TsSignalSpecification'
// '<S110>' : 'SimModel0621_S3/Controler/PID Controller2/Tsamp - Ngain/Passthrough'
// '<S111>' : 'SimModel0621_S3/Controler/PID Controller2/postSat Signal/Forward_Path'
// '<S112>' : 'SimModel0621_S3/Controler/PID Controller2/preInt Signal/Internal PreInt'
// '<S113>' : 'SimModel0621_S3/Controler/PID Controller2/preSat Signal/Forward_Path'
// '<S114>' : 'SimModel0621_S3/Controler/PID Controller3/Anti-windup'
// '<S115>' : 'SimModel0621_S3/Controler/PID Controller3/D Gain'
// '<S116>' : 'SimModel0621_S3/Controler/PID Controller3/External Derivative'
// '<S117>' : 'SimModel0621_S3/Controler/PID Controller3/Filter'
// '<S118>' : 'SimModel0621_S3/Controler/PID Controller3/Filter ICs'
// '<S119>' : 'SimModel0621_S3/Controler/PID Controller3/I Gain'
// '<S120>' : 'SimModel0621_S3/Controler/PID Controller3/Ideal P Gain'
// '<S121>' : 'SimModel0621_S3/Controler/PID Controller3/Ideal P Gain Fdbk'
// '<S122>' : 'SimModel0621_S3/Controler/PID Controller3/Integrator'
// '<S123>' : 'SimModel0621_S3/Controler/PID Controller3/Integrator ICs'
// '<S124>' : 'SimModel0621_S3/Controler/PID Controller3/N Copy'
// '<S125>' : 'SimModel0621_S3/Controler/PID Controller3/N Gain'
// '<S126>' : 'SimModel0621_S3/Controler/PID Controller3/P Copy'
// '<S127>' : 'SimModel0621_S3/Controler/PID Controller3/Parallel P Gain'
// '<S128>' : 'SimModel0621_S3/Controler/PID Controller3/Reset Signal'
// '<S129>' : 'SimModel0621_S3/Controler/PID Controller3/Saturation'
// '<S130>' : 'SimModel0621_S3/Controler/PID Controller3/Saturation Fdbk'
// '<S131>' : 'SimModel0621_S3/Controler/PID Controller3/Sum'
// '<S132>' : 'SimModel0621_S3/Controler/PID Controller3/Sum Fdbk'
// '<S133>' : 'SimModel0621_S3/Controler/PID Controller3/Tracking Mode'
// '<S134>' : 'SimModel0621_S3/Controler/PID Controller3/Tracking Mode Sum'
// '<S135>' : 'SimModel0621_S3/Controler/PID Controller3/Tsamp - Integral'
// '<S136>' : 'SimModel0621_S3/Controler/PID Controller3/Tsamp - Ngain'
// '<S137>' : 'SimModel0621_S3/Controler/PID Controller3/postSat Signal'
// '<S138>' : 'SimModel0621_S3/Controler/PID Controller3/preInt Signal'
// '<S139>' : 'SimModel0621_S3/Controler/PID Controller3/preSat Signal'
// '<S140>' : 'SimModel0621_S3/Controler/PID Controller3/Anti-windup/Disc. Clamping Parallel'
// '<S141>' : 'SimModel0621_S3/Controler/PID Controller3/Anti-windup/Disc. Clamping Parallel/Dead Zone'
// '<S142>' : 'SimModel0621_S3/Controler/PID Controller3/Anti-windup/Disc. Clamping Parallel/Dead Zone/Enabled'
// '<S143>' : 'SimModel0621_S3/Controler/PID Controller3/D Gain/Internal Parameters'
// '<S144>' : 'SimModel0621_S3/Controler/PID Controller3/External Derivative/Error'
// '<S145>' : 'SimModel0621_S3/Controler/PID Controller3/Filter/Disc. Forward Euler Filter'
// '<S146>' : 'SimModel0621_S3/Controler/PID Controller3/Filter ICs/Internal IC - Filter'
// '<S147>' : 'SimModel0621_S3/Controler/PID Controller3/I Gain/Internal Parameters'
// '<S148>' : 'SimModel0621_S3/Controler/PID Controller3/Ideal P Gain/Passthrough'
// '<S149>' : 'SimModel0621_S3/Controler/PID Controller3/Ideal P Gain Fdbk/Disabled'
// '<S150>' : 'SimModel0621_S3/Controler/PID Controller3/Integrator/Discrete'
// '<S151>' : 'SimModel0621_S3/Controler/PID Controller3/Integrator ICs/Internal IC'
// '<S152>' : 'SimModel0621_S3/Controler/PID Controller3/N Copy/Disabled'
// '<S153>' : 'SimModel0621_S3/Controler/PID Controller3/N Gain/Internal Parameters'
// '<S154>' : 'SimModel0621_S3/Controler/PID Controller3/P Copy/Disabled'
// '<S155>' : 'SimModel0621_S3/Controler/PID Controller3/Parallel P Gain/Internal Parameters'
// '<S156>' : 'SimModel0621_S3/Controler/PID Controller3/Reset Signal/Disabled'
// '<S157>' : 'SimModel0621_S3/Controler/PID Controller3/Saturation/Enabled'
// '<S158>' : 'SimModel0621_S3/Controler/PID Controller3/Saturation Fdbk/Disabled'
// '<S159>' : 'SimModel0621_S3/Controler/PID Controller3/Sum/Sum_PID'
// '<S160>' : 'SimModel0621_S3/Controler/PID Controller3/Sum Fdbk/Disabled'
// '<S161>' : 'SimModel0621_S3/Controler/PID Controller3/Tracking Mode/Disabled'
// '<S162>' : 'SimModel0621_S3/Controler/PID Controller3/Tracking Mode Sum/Passthrough'
// '<S163>' : 'SimModel0621_S3/Controler/PID Controller3/Tsamp - Integral/TsSignalSpecification'
// '<S164>' : 'SimModel0621_S3/Controler/PID Controller3/Tsamp - Ngain/Passthrough'
// '<S165>' : 'SimModel0621_S3/Controler/PID Controller3/postSat Signal/Forward_Path'
// '<S166>' : 'SimModel0621_S3/Controler/PID Controller3/preInt Signal/Internal PreInt'
// '<S167>' : 'SimModel0621_S3/Controler/PID Controller3/preSat Signal/Forward_Path'
// '<S4>' : 'SimModel0621_S3/Controler/PID Controller3'
// '<S5>' : 'SimModel0621_S3/Controler/PID Controller1/Anti-windup'
// '<S6>' : 'SimModel0621_S3/Controler/PID Controller1/D Gain'
// '<S7>' : 'SimModel0621_S3/Controler/PID Controller1/External Derivative'
// '<S8>' : 'SimModel0621_S3/Controler/PID Controller1/Filter'
// '<S9>' : 'SimModel0621_S3/Controler/PID Controller1/Filter ICs'
// '<S10>' : 'SimModel0621_S3/Controler/PID Controller1/I Gain'
// '<S11>' : 'SimModel0621_S3/Controler/PID Controller1/Ideal P Gain'
// '<S12>' : 'SimModel0621_S3/Controler/PID Controller1/Ideal P Gain Fdbk'
// '<S13>' : 'SimModel0621_S3/Controler/PID Controller1/Integrator'
// '<S14>' : 'SimModel0621_S3/Controler/PID Controller1/Integrator ICs'
// '<S15>' : 'SimModel0621_S3/Controler/PID Controller1/N Copy'
// '<S16>' : 'SimModel0621_S3/Controler/PID Controller1/N Gain'
// '<S17>' : 'SimModel0621_S3/Controler/PID Controller1/P Copy'
// '<S18>' : 'SimModel0621_S3/Controler/PID Controller1/Parallel P Gain'
// '<S19>' : 'SimModel0621_S3/Controler/PID Controller1/Reset Signal'
// '<S20>' : 'SimModel0621_S3/Controler/PID Controller1/Saturation'
// '<S21>' : 'SimModel0621_S3/Controler/PID Controller1/Saturation Fdbk'
// '<S22>' : 'SimModel0621_S3/Controler/PID Controller1/Sum'
// '<S23>' : 'SimModel0621_S3/Controler/PID Controller1/Sum Fdbk'
// '<S24>' : 'SimModel0621_S3/Controler/PID Controller1/Tracking Mode'
// '<S25>' : 'SimModel0621_S3/Controler/PID Controller1/Tracking Mode Sum'
// '<S26>' : 'SimModel0621_S3/Controler/PID Controller1/Tsamp - Integral'
// '<S27>' : 'SimModel0621_S3/Controler/PID Controller1/Tsamp - Ngain'
// '<S28>' : 'SimModel0621_S3/Controler/PID Controller1/postSat Signal'
// '<S29>' : 'SimModel0621_S3/Controler/PID Controller1/preInt Signal'
// '<S30>' : 'SimModel0621_S3/Controler/PID Controller1/preSat Signal'
// '<S31>' : 'SimModel0621_S3/Controler/PID Controller1/Anti-windup/Disc. Clamping Parallel'
// '<S32>' : 'SimModel0621_S3/Controler/PID Controller1/Anti-windup/Disc. Clamping Parallel/Dead Zone'
// '<S33>' : 'SimModel0621_S3/Controler/PID Controller1/Anti-windup/Disc. Clamping Parallel/Dead Zone/Enabled'
// '<S34>' : 'SimModel0621_S3/Controler/PID Controller1/D Gain/Internal Parameters'
// '<S35>' : 'SimModel0621_S3/Controler/PID Controller1/External Derivative/Error'
// '<S36>' : 'SimModel0621_S3/Controler/PID Controller1/Filter/Disc. Forward Euler Filter'
// '<S37>' : 'SimModel0621_S3/Controler/PID Controller1/Filter ICs/Internal IC - Filter'
// '<S38>' : 'SimModel0621_S3/Controler/PID Controller1/I Gain/Internal Parameters'
// '<S39>' : 'SimModel0621_S3/Controler/PID Controller1/Ideal P Gain/Passthrough'
// '<S40>' : 'SimModel0621_S3/Controler/PID Controller1/Ideal P Gain Fdbk/Disabled'
// '<S41>' : 'SimModel0621_S3/Controler/PID Controller1/Integrator/Discrete'
// '<S42>' : 'SimModel0621_S3/Controler/PID Controller1/Integrator ICs/Internal IC'
// '<S43>' : 'SimModel0621_S3/Controler/PID Controller1/N Copy/Disabled'
// '<S44>' : 'SimModel0621_S3/Controler/PID Controller1/N Gain/Internal Parameters'
// '<S45>' : 'SimModel0621_S3/Controler/PID Controller1/P Copy/Disabled'
// '<S46>' : 'SimModel0621_S3/Controler/PID Controller1/Parallel P Gain/Internal Parameters'
// '<S47>' : 'SimModel0621_S3/Controler/PID Controller1/Reset Signal/Disabled'
// '<S48>' : 'SimModel0621_S3/Controler/PID Controller1/Saturation/Enabled'
// '<S49>' : 'SimModel0621_S3/Controler/PID Controller1/Saturation Fdbk/Disabled'
// '<S50>' : 'SimModel0621_S3/Controler/PID Controller1/Sum/Sum_PID'
// '<S51>' : 'SimModel0621_S3/Controler/PID Controller1/Sum Fdbk/Disabled'
// '<S52>' : 'SimModel0621_S3/Controler/PID Controller1/Tracking Mode/Disabled'
// '<S53>' : 'SimModel0621_S3/Controler/PID Controller1/Tracking Mode Sum/Passthrough'
// '<S54>' : 'SimModel0621_S3/Controler/PID Controller1/Tsamp - Integral/TsSignalSpecification'
// '<S55>' : 'SimModel0621_S3/Controler/PID Controller1/Tsamp - Ngain/Passthrough'
// '<S56>' : 'SimModel0621_S3/Controler/PID Controller1/postSat Signal/Forward_Path'
// '<S57>' : 'SimModel0621_S3/Controler/PID Controller1/preInt Signal/Internal PreInt'
// '<S58>' : 'SimModel0621_S3/Controler/PID Controller1/preSat Signal/Forward_Path'
// '<S59>' : 'SimModel0621_S3/Controler/PID Controller3/Anti-windup'
// '<S60>' : 'SimModel0621_S3/Controler/PID Controller3/D Gain'
// '<S61>' : 'SimModel0621_S3/Controler/PID Controller3/External Derivative'
// '<S62>' : 'SimModel0621_S3/Controler/PID Controller3/Filter'
// '<S63>' : 'SimModel0621_S3/Controler/PID Controller3/Filter ICs'
// '<S64>' : 'SimModel0621_S3/Controler/PID Controller3/I Gain'
// '<S65>' : 'SimModel0621_S3/Controler/PID Controller3/Ideal P Gain'
// '<S66>' : 'SimModel0621_S3/Controler/PID Controller3/Ideal P Gain Fdbk'
// '<S67>' : 'SimModel0621_S3/Controler/PID Controller3/Integrator'
// '<S68>' : 'SimModel0621_S3/Controler/PID Controller3/Integrator ICs'
// '<S69>' : 'SimModel0621_S3/Controler/PID Controller3/N Copy'
// '<S70>' : 'SimModel0621_S3/Controler/PID Controller3/N Gain'
// '<S71>' : 'SimModel0621_S3/Controler/PID Controller3/P Copy'
// '<S72>' : 'SimModel0621_S3/Controler/PID Controller3/Parallel P Gain'
// '<S73>' : 'SimModel0621_S3/Controler/PID Controller3/Reset Signal'
// '<S74>' : 'SimModel0621_S3/Controler/PID Controller3/Saturation'
// '<S75>' : 'SimModel0621_S3/Controler/PID Controller3/Saturation Fdbk'
// '<S76>' : 'SimModel0621_S3/Controler/PID Controller3/Sum'
// '<S77>' : 'SimModel0621_S3/Controler/PID Controller3/Sum Fdbk'
// '<S78>' : 'SimModel0621_S3/Controler/PID Controller3/Tracking Mode'
// '<S79>' : 'SimModel0621_S3/Controler/PID Controller3/Tracking Mode Sum'
// '<S80>' : 'SimModel0621_S3/Controler/PID Controller3/Tsamp - Integral'
// '<S81>' : 'SimModel0621_S3/Controler/PID Controller3/Tsamp - Ngain'
// '<S82>' : 'SimModel0621_S3/Controler/PID Controller3/postSat Signal'
// '<S83>' : 'SimModel0621_S3/Controler/PID Controller3/preInt Signal'
// '<S84>' : 'SimModel0621_S3/Controler/PID Controller3/preSat Signal'
// '<S85>' : 'SimModel0621_S3/Controler/PID Controller3/Anti-windup/Disc. Clamping Parallel'
// '<S86>' : 'SimModel0621_S3/Controler/PID Controller3/Anti-windup/Disc. Clamping Parallel/Dead Zone'
// '<S87>' : 'SimModel0621_S3/Controler/PID Controller3/Anti-windup/Disc. Clamping Parallel/Dead Zone/Enabled'
// '<S88>' : 'SimModel0621_S3/Controler/PID Controller3/D Gain/Internal Parameters'
// '<S89>' : 'SimModel0621_S3/Controler/PID Controller3/External Derivative/Error'
// '<S90>' : 'SimModel0621_S3/Controler/PID Controller3/Filter/Disc. Forward Euler Filter'
// '<S91>' : 'SimModel0621_S3/Controler/PID Controller3/Filter ICs/Internal IC - Filter'
// '<S92>' : 'SimModel0621_S3/Controler/PID Controller3/I Gain/Internal Parameters'
// '<S93>' : 'SimModel0621_S3/Controler/PID Controller3/Ideal P Gain/Passthrough'
// '<S94>' : 'SimModel0621_S3/Controler/PID Controller3/Ideal P Gain Fdbk/Disabled'
// '<S95>' : 'SimModel0621_S3/Controler/PID Controller3/Integrator/Discrete'
// '<S96>' : 'SimModel0621_S3/Controler/PID Controller3/Integrator ICs/Internal IC'
// '<S97>' : 'SimModel0621_S3/Controler/PID Controller3/N Copy/Disabled'
// '<S98>' : 'SimModel0621_S3/Controler/PID Controller3/N Gain/Internal Parameters'
// '<S99>' : 'SimModel0621_S3/Controler/PID Controller3/P Copy/Disabled'
// '<S100>' : 'SimModel0621_S3/Controler/PID Controller3/Parallel P Gain/Internal Parameters'
// '<S101>' : 'SimModel0621_S3/Controler/PID Controller3/Reset Signal/Disabled'
// '<S102>' : 'SimModel0621_S3/Controler/PID Controller3/Saturation/Enabled'
// '<S103>' : 'SimModel0621_S3/Controler/PID Controller3/Saturation Fdbk/Disabled'
// '<S104>' : 'SimModel0621_S3/Controler/PID Controller3/Sum/Sum_PID'
// '<S105>' : 'SimModel0621_S3/Controler/PID Controller3/Sum Fdbk/Disabled'
// '<S106>' : 'SimModel0621_S3/Controler/PID Controller3/Tracking Mode/Disabled'
// '<S107>' : 'SimModel0621_S3/Controler/PID Controller3/Tracking Mode Sum/Passthrough'
// '<S108>' : 'SimModel0621_S3/Controler/PID Controller3/Tsamp - Integral/TsSignalSpecification'
// '<S109>' : 'SimModel0621_S3/Controler/PID Controller3/Tsamp - Ngain/Passthrough'
// '<S110>' : 'SimModel0621_S3/Controler/PID Controller3/postSat Signal/Forward_Path'
// '<S111>' : 'SimModel0621_S3/Controler/PID Controller3/preInt Signal/Internal PreInt'
// '<S112>' : 'SimModel0621_S3/Controler/PID Controller3/preSat Signal/Forward_Path'
#endif // Controler_h_

View File

@@ -7,9 +7,9 @@
//
// Code generated for Simulink model 'Controler'.
//
// Model version : 5.95
// Model version : 5.105
// Simulink Coder version : 24.2 (R2024b) 21-Jun-2024
// C/C++ source code generated on : Tue Jul 1 15:26:11 2025
// C/C++ source code generated on : Thu Jul 3 16:12:45 2025
//
// Target selection: ert.tlc
// Embedded hardware selection: Intel->x86-64 (Linux 64)
@@ -24,41 +24,27 @@
Controler::P Controler::rtP{
// Variable: pid_depth
// Referenced by:
// '<S35>/Derivative Gain'
// '<S39>/Integral Gain'
// '<S45>/Filter Coefficient'
// '<S47>/Proportional Gain'
{
10.0,
0.1,
0.1,
10.0
},
// Variable: pid_heading
// Referenced by:
// '<S143>/Derivative Gain'
// '<S147>/Integral Gain'
// '<S153>/Filter Coefficient'
// '<S155>/Proportional Gain'
// '<S34>/Derivative Gain'
// '<S38>/Integral Gain'
// '<S44>/Filter Coefficient'
// '<S46>/Proportional Gain'
{
1,
0.01,
0.1,
10.0
3,
5.0
},
// Variable: pid_pitch
// Variable: pid_heading
// Referenced by:
// '<S89>/Derivative Gain'
// '<S93>/Integral Gain'
// '<S99>/Filter Coefficient'
// '<S101>/Proportional Gain'
// '<S88>/Derivative Gain'
// '<S92>/Integral Gain'
// '<S98>/Filter Coefficient'
// '<S100>/Proportional Gain'
{
10.0,
0.5,
0.01,
0.1,
10.0

View File

@@ -7,9 +7,9 @@
//
// Code generated for Simulink model 'Controler'.
//
// Model version : 5.95
// Model version : 5.105
// Simulink Coder version : 24.2 (R2024b) 21-Jun-2024
// C/C++ source code generated on : Tue Jul 1 15:26:11 2025
// C/C++ source code generated on : Thu Jul 3 16:12:45 2025
//
// Target selection: ert.tlc
// Embedded hardware selection: Intel->x86-64 (Linux 64)

View File

@@ -7,9 +7,9 @@
//
// Code generated for Simulink model 'Controler'.
//
// Model version : 5.95
// Model version : 5.105
// Simulink Coder version : 24.2 (R2024b) 21-Jun-2024
// C/C++ source code generated on : Tue Jul 1 15:26:11 2025
// C/C++ source code generated on : Thu Jul 3 16:12:45 2025
//
// Target selection: ert.tlc
// Embedded hardware selection: Intel->x86-64 (Linux 64)

View File

@@ -7,9 +7,9 @@
//
// Code generated for Simulink model 'Controler'.
//
// Model version : 5.95
// Model version : 5.105
// Simulink Coder version : 24.2 (R2024b) 21-Jun-2024
// C/C++ source code generated on : Tue Jul 1 15:26:11 2025
// C/C++ source code generated on : Thu Jul 3 16:12:45 2025
//
// Target selection: ert.tlc
// Embedded hardware selection: Intel->x86-64 (Linux 64)

View File

@@ -7,9 +7,9 @@
//
// Code generated for Simulink model 'Controler'.
//
// Model version : 5.95
// Model version : 5.105
// Simulink Coder version : 24.2 (R2024b) 21-Jun-2024
// C/C++ source code generated on : Tue Jul 1 15:26:11 2025
// C/C++ source code generated on : Thu Jul 3 16:12:45 2025
//
// Target selection: ert.tlc
// Embedded hardware selection: Intel->x86-64 (Linux 64)

View File

@@ -7,9 +7,9 @@
//
// Code generated for Simulink model 'Controler'.
//
// Model version : 5.95
// Model version : 5.105
// Simulink Coder version : 24.2 (R2024b) 21-Jun-2024
// C/C++ source code generated on : Tue Jul 1 15:26:11 2025
// C/C++ source code generated on : Thu Jul 3 16:12:45 2025
//
// Target selection: ert.tlc
// Embedded hardware selection: Intel->x86-64 (Linux 64)

View File

@@ -7,9 +7,9 @@
//
// Code generated for Simulink model 'Controler'.
//
// Model version : 5.95
// Model version : 5.105
// Simulink Coder version : 24.2 (R2024b) 21-Jun-2024
// C/C++ source code generated on : Tue Jul 1 15:26:11 2025
// C/C++ source code generated on : Thu Jul 3 16:12:45 2025
//
// Target selection: ert.tlc
// Embedded hardware selection: Intel->x86-64 (Linux 64)

View File

@@ -7,9 +7,9 @@
//
// Code generated for Simulink model 'Controler'.
//
// Model version : 5.95
// Model version : 5.105
// Simulink Coder version : 24.2 (R2024b) 21-Jun-2024
// C/C++ source code generated on : Tue Jul 1 15:26:11 2025
// C/C++ source code generated on : Thu Jul 3 16:12:45 2025
//
// Target selection: ert.tlc
// Embedded hardware selection: Intel->x86-64 (Linux 64)