From ea39c0919221f485ecf91ef746badf76f0b5028d Mon Sep 17 00:00:00 2001 From: curt Date: Mon, 15 Mar 2004 19:15:40 +0000 Subject: [PATCH] Make sure delta_u_n and u_n are always explicitely initialized. --- src/Autopilot/xmlauto.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Autopilot/xmlauto.cxx b/src/Autopilot/xmlauto.cxx index 0f334d930..0f0996edf 100644 --- a/src/Autopilot/xmlauto.cxx +++ b/src/Autopilot/xmlauto.cxx @@ -196,14 +196,14 @@ FGPIDController::FGPIDController( SGPropertyNode *node ): */ void FGPIDController::update( double dt ) { - double ep_n; // proportional error with reference weighing - double e_n; // error - double ed_n; // derivative error - double edf_n; // derivative error filter - double Tf; // filter time - double delta_u_n; // incremental output - double u_n; // absolute output - double Ts = dt; // Sampling interval (sec) + double ep_n; // proportional error with reference weighing + double e_n; // error + double ed_n; // derivative error + double edf_n; // derivative error filter + double Tf; // filter time + double delta_u_n = 0.0; // incremental output + double u_n = 0.0; // absolute output + double Ts = dt; // Sampling interval (sec) if ( Ts <= 0.0 ) { // do nothing if time step is not positive (i.e. no time has