Hi all,

some days ago, I have made some proposals to correct errors in flightgear. Now, I would like to know, íf this is the right
procedure to add code to the cvs or if there is an other way defined ??




Kind regards

Hans-Georg





Hans-Georg Wunder wrote:


Hi all,


for the A320-200 2D-panel I tried to activate the course tracking with nav1. But it doesn't work. Then I checked the source and I found the following in src/Autopilot/xmlauto.cxx


874 // Calculate nav1 target heading error normalized to +/- 180.0
875 static SGPropertyNode *target_nav1
876 = fgGetNode( "/instrumentation/nav[0]/radials/target-auto-hdg-deg", true );


When I replaced it with

876 = fgGetNode( "/instrumentation/nav[1]/radials/target-auto-hdg-deg", true );

everything works:


Then I added the same sequence for nav0

874 // Calculate nav0 target heading error normalized to +/- 180.0
875 static SGPropertyNode *target_nav0
876 = fgGetNode( "/instrumentation/nav[0]/radials/target-auto-hdg-deg", true );
877 static SGPropertyNode *true_nav0
878 = fgGetNode( "/autopilot/internal/nav0-heading-error-deg", true );
879 static SGPropertyNode *true_track_nav0
880 = fgGetNode( "/autopilot/internal/nav0-track-error-deg", true );
881 diff = target_nav0->getDoubleValue() - true_hdg->getDoubleValue();
882 if ( diff < -180.0 ) { diff += 360.0; }
883 if ( diff > 180.0 ) { diff -= 360.0; }
884 true_nav0->setDoubleValue( diff );
885
886
887 diff = target_nav0->getDoubleValue() - true_track->getDoubleValue();
888 if ( diff < -180.0 ) { diff += 360.0; }
889 if ( diff > 180.0 ) { diff -= 360.0; }
890 true_track_nav0->setDoubleValue( diff );



My Contoller looks like this: <pid-controller> <name>Nav0 Hold Stage 1</name> <debug>false</debug> <enable> <prop>/autopilot/locks/heading</prop> <value>nav0-hold</value> </enable> <input> <prop>/autopilot/internal/nav0-track-error-deg</prop> </input> <reference> <value>0.0</value> </reference> <output> <prop>/autopilot/internal/target-roll-deg</prop> </output> <config> <Kp>-1.0</Kp> <!-- proportional gain --> <beta>1.0</beta> <!-- input value weighing factor --> <alpha>0.1</alpha> <!-- low pass filter weighing factor --> <gamma>0.0</gamma> <!-- input value weighing factor for --> <!-- unfiltered derivative error --> <Ti>200.0</Ti> <!-- integrator time --> <Td>0.00001</Td> <!-- derivator time --> <u_min>-30.0</u_min> <!-- minimum output clamp --> <u_max>30.0</u_max> <!-- maximum output clamp --> </config> </pid-controller>

Now I am able to follow the ILS. Is this a bug in flightgear, or do I have the wrong understanding and do I use the wrong properties ????

If it is a bug, it would be great, if someone is able to add the corrections to the cvs. I can send the differencies, but I do not know the exact diff-command.



Kind regards

Hans-Georg




_______________________________________________ Flightgear-devel mailing list Flightgear-devel@flightgear.org http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d





_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to