diff --git a/flight/Modules/CameraStab/camerastab.c b/flight/Modules/CameraStab/camerastab.c
index 8e4d2e828..6dbc6d5d5 100644
--- a/flight/Modules/CameraStab/camerastab.c
+++ b/flight/Modules/CameraStab/camerastab.c
@@ -202,7 +202,7 @@ static void attitudeUpdated(UAVObjEvent* ev)
#ifdef USE_GIMBAL_LPF
if (cameraStab.ResponseTime) {
- float rt = (float)cameraStab.ResponseTime;
+ float rt = (float)cameraStab.ResponseTime[i];
attitude = csd->attitudeFiltered[i] = ((rt * csd->attitudeFiltered[i]) + (dT * attitude)) / (rt + dT);
}
#endif
@@ -270,7 +270,7 @@ void applyFeedForward(uint8_t index, float dT, float *attitude, CameraStabSettin
csd->ffLastAttitude[index] = *attitude;
*attitude += accumulator;
- float filter = (float)((accumulator > 0.0f) ? cameraStab->AccelTime : cameraStab->DecelTime) / dT;
+ float filter = (float)((accumulator > 0.0f) ? cameraStab->AccelTime[index] : cameraStab->DecelTime[index]) / dT;
if (filter < 1.0f)
filter = 1.0f;
accumulator -= accumulator / filter;
diff --git a/ground/openpilotgcs/src/plugins/config/camerastabilization.ui b/ground/openpilotgcs/src/plugins/config/camerastabilization.ui
index c9b39a17d..50bebaf41 100755
--- a/ground/openpilotgcs/src/plugins/config/camerastabilization.ui
+++ b/ground/openpilotgcs/src/plugins/config/camerastabilization.ui
@@ -7,7 +7,7 @@
0
0
786
- 745
+ 791
@@ -64,8 +64,8 @@
0
0
- 745
- 687
+ 762
+ 658
@@ -884,7 +884,7 @@ value.
0
- 162
+ 187
@@ -978,7 +978,87 @@ margin:1px;
+ -
+
+
+ AF Response Time
+
+
+
-
+
+
+ Roll axis attitude filter response time
+
+Range: 0-250ms, 0 disables filter (default).
+
+Smoothes estimated airframe attitude used by camera stabilization.
+
+
+ 250
+
+
+
+ objname:CameraStabSettings
+ fieldname:ResponseTime
+ element:Roll
+ buttongroup:1
+
+
+
+
+ -
+
+
+ Pitch axis attitude filter response time
+
+Range: 0-250ms, 0 disables filter (default).
+
+Smoothes estimated airframe attitude used by camera stabilization.
+
+
+ 250
+
+
+
+ objname:CameraStabSettings
+ fieldname:ResponseTime
+ element:Pitch
+ buttongroup:1
+
+
+
+
+ -
+
+
+ Yaw axis attitude filter response time
+
+Range: 0-250ms, 0 disables filter (default).
+
+Smoothes estimated airframe attitude used by camera stabilization.
+
+
+ 250
+
+
+
+ objname:CameraStabSettings
+ fieldname:ResponseTime
+ element:Yaw
+ buttongroup:1
+
+
+
+
+ -
+
+
+ FF Servo Acceleration
+
+
+
+ -
Roll servo feed forward acceleration
@@ -1003,7 +1083,7 @@ Too high value may burn your servo!
- -
+
-
Pitch servo feed forward acceleration
@@ -1028,7 +1108,7 @@ Too high value may burn your servo!
- -
+
-
Yaw servo feed forward acceleration
@@ -1053,14 +1133,166 @@ Too high value may burn your servo!
- -
+
-
+
+
+ FF Accel Time Constant
+
+
+
+ -
+
+
+ Roll servo feed forward acceleration time constant
+
+Range: 0-50ms, default is 5.
+
+
+ 50
+
+
+ 5
+
+
+
+ objname:CameraStabSettings
+ fieldname:AccelTime
+ element:Roll
+ buttongroup:1
+
+
+
+
+ -
+
+
+ Pitch servo feed forward acceleration time constant
+
+Range: 0-50ms, default is 5.
+
+
+ 50
+
+
+ 5
+
+
+
+ objname:CameraStabSettings
+ fieldname:AccelTime
+ element:Pitch
+ buttongroup:1
+
+
+
+
+ -
+
+
+ Yaw servo feed forward acceleration time constant
+
+Range: 0-50ms, default is 5.
+
+
+ 50
+
+
+ 5
+
+
+
+ objname:CameraStabSettings
+ fieldname:AccelTime
+ element:Yaw
+ buttongroup:1
+
+
+
+
+ -
+
+
+ FF Decel Time Constant
+
+
+
+ -
+
+
+ Roll servo feed forward deceleration time constant
+
+Range: 0-50ms, default is 5.
+
+
+ 50
+
+
+ 5
+
+
+
+ objname:CameraStabSettings
+ fieldname:DecelTime
+ element:Roll
+ buttongroup:1
+
+
+
+
+ -
+
+
+ Pitch servo feed forward deceleration time constant
+
+Range: 0-50ms, default is 5.
+
+
+ 50
+
+
+ 5
+
+
+
+ objname:CameraStabSettings
+ fieldname:DecelTime
+ element:Pitch
+ buttongroup:1
+
+
+
+
+ -
+
+
+ Yaw servo feed forward deceleration time constant
+
+Range: 0-50ms, default is 5.
+
+
+ 50
+
+
+ 5
+
+
+
+ objname:CameraStabSettings
+ fieldname:DecelTime
+ element:Yaw
+ buttongroup:1
+
+
+
+
+ -
Gimbal Type:
- -
+
-
Qt::StrongFocus
@@ -1084,105 +1316,14 @@ Used to limit feed forward acceleration at extreme angles.
- -
-
-
- FF Accel Time Constant
-
-
-
- -
-
-
- Feed forward acceleration time constant
-
-Range: 0-50ms, default is 5.
-
-The same value is used for all axes.
-
-
- 50
-
-
- 5
-
-
-
- objname:CameraStabSettings
- fieldname:AccelTime
- buttongroup:1
-
-
-
-
- -
-
-
- AF Response Time
-
-
-
- -
-
-
- Attitude filter response time
-
-Range: 0-250ms, 0 disables filter (default).
-
-Smoothes estimated airframe attitude used by camera stabilization.
-The same value is used for all axes.
-
-
- 250
-
-
-
- objname:CameraStabSettings
- fieldname:ResponseTime
- buttongroup:1
-
-
-
-
- -
-
-
- FF Decel Time Constant
-
-
-
- -
-
-
- Feed forward deceleration time constant
-
-Range: 0-50ms, default is 5.
-
-The same value is used for all axes.
-
-
- 50
-
-
- 5
-
-
-
- objname:CameraStabSettings
- fieldname:DecelTime
- buttongroup:1
-
-
-
-
- -
+
-
FF Max Acceleration
- -
+
-
Feed forward maximum acceleration
@@ -1206,13 +1347,6 @@ The same value is used for all axes.
- -
-
-
- FF Servo Acceleration
-
-
-
@@ -1223,37 +1357,6 @@ The same value is used for all axes.
- -
-
-
-
- 0
- 50
-
-
-
-
- 16777215
- 16777215
-
-
-
- Messages
-
-
-
-
-
-
- false
-
-
-
-
-
-
-
-
-
-
@@ -1275,6 +1378,37 @@ The same value is used for all axes.
+ -
+
+
+
+ 0
+ 50
+
+
+
+
+ 16777215
+ 16777215
+
+
+
+ Messages
+
+
+
-
+
+
+ false
+
+
+
+
+
+
+
+
+
-
@@ -1468,7 +1602,44 @@ Apply or Save button afterwards.
- scrollArea
+ enableCameraStabilization
+ rollChannel
+ pitchChannel
+ yawChannel
+ rollOutputRange
+ pitchOutputRange
+ yawOutputRange
+ rollInputChannel
+ pitchInputChannel
+ yawInputChannel
+ rollStabilizationMode
+ pitchStabilizationMode
+ yawStabilizationMode
+ rollInputRange
+ pitchInputRange
+ yawInputRange
+ rollInputRate
+ pitchInputRate
+ yawInputRate
+ MaxAxisLockRate
+ rollResponseTime
+ pitchResponseTime
+ yawResponseTime
+ rollFeedForward
+ pitchFeedForward
+ yawFeedForward
+ rollAccelTime
+ pitchAccelTime
+ yawAccelTime
+ rollDecelTime
+ pitchDecelTime
+ yawDecelTime
+ gimbalType
+ maxAccel
+ camerastabilizationResetToDefaults
+ pushButton
+ camerastabilizationSaveRAM
+ camerastabilizationSaveSD
diff --git a/shared/uavobjectdefinition/camerastabsettings.xml b/shared/uavobjectdefinition/camerastabsettings.xml
index b816e224c..a0c7a26dd 100644
--- a/shared/uavobjectdefinition/camerastabsettings.xml
+++ b/shared/uavobjectdefinition/camerastabsettings.xml
@@ -7,12 +7,12 @@
-
+
-
-
+
+