edit debug prints and add new ones
This commit is contained in:
5
main.lua
5
main.lua
@@ -963,13 +963,16 @@ function UpdateGlobalThrust()
|
||||
end
|
||||
|
||||
local AltitudeRateOutput = PIDs.VerticalRatePID:update(Config.Autopilot.AutopilotDesiredAltitude, SensorData.Altitude.Altitude, dt)
|
||||
local throttleOutput = PIDs.AltitudePID:update(AltitudeRateOutput, SensorData.Altitude.VerticalSpeed, dt)
|
||||
local throttleOutput = PIDs.AltitudePID:update(AltitudeRateOutput, SensorData.Altitude.VerticalSpeed, dt)
|
||||
if Config.Debug then print("DEBUG: Throttle Output: "..throttleOutput) end
|
||||
|
||||
local pitchOutput = PIDs.PitchAttitudePID:update(0, SensorData.Gimbal.Angles.xAngle, dt)
|
||||
local pitchRateOutput = PIDs.PitchRatePID:update(pitchOutput, SensorData.Gimbal.AngularRates.wx or 0, dt)
|
||||
if Config.Debug then print("DEBUG: Pitch Output: "..pitchRateOutput) end
|
||||
|
||||
local rollOutput = PIDs.RollAttitudePID:update(0, SensorData.Gimbal.Angles.zAngle, dt)
|
||||
local rollRateOutput = PIDs.RollRatePID:update(rollOutput, SensorData.Gimbal.AngularRates.wz or 0, dt)
|
||||
if Config.Debug then print("DEBUG: Roll Output: "..rollRateOutput) end
|
||||
|
||||
local yawOutput = 5
|
||||
if Config.Autopilot.AutopilotDesiredHeading ~= nil then yawOutput = PIDs.YawAttitudePID:update(Config.Autopilot.AutopilotDesiredHeading, SensorData.NavTable.Heading, dt) end
|
||||
|
||||
Reference in New Issue
Block a user