DA40-NGX Improvement Mod (v0.10, SEP 30, SuX)

Wow, I admire you; I wouldn’t know where to start😄

oh shut up, im just pressing random buttons and if i break something i spam CTRL-Z

3 Likes

I updated from v0.5.6 to v0.5.7 and now my aircraft oscillates in the roll axis with the autopilot engaged in HDG mode. NAV/GPS seems to keep it steady, but going back to HDG starts the rolling oscillation. LVL mode makes it oscillate a very tiny amount. Also, when I go to centre the heading bug, it sets itself a couple of degrees off my current heading.

Video shows only minor but before recording in HDG mode they were about 5-7 degrees roll left and right. In the climb, HDG mode seemed to not work at all, and the aircraft just slowly increased in bank in to the turn until I took over.

Im not home atm. If you could, go into the Systems.cfg file
the file is in the Simobjects\airplanes\asobo_da40 folder in the mod folder

  • open systems.cfg in Notepad
  • scroll to the bottom where you see “max_bank_acceleration” and “max_bank_velocity”
  • try 5 for both values, save and restart the sim.

This is all I can really do about HDG mode atm. The fact that LVL and the lateral modes work perfectly, shows that its somewhere else.

we are just unlucky with the weight/inertia of the DA40 and the PIDs of the autopilot.

Will have to give this a crack tomorrow - Almost finishing up my flight then bed.

For info, I’m not using the updated flight model if that makes a difference.

talked to nish (a dude with a bigger brain than me) about the autopilot.

the ai.cfg file contains the PID values for the autopilot. I will play with them next week

1 Like

Don’t know if this is of use to you but looking at ai.cfg files for all the aircrafts - they are all over the place. Here was the ancient explanation of how PIDs are represented in the old FSX/P3D tutorials.

PID Controllers

PIDs are only used to aid in the handling of AI (computer) controlled aircraft. PID stands for Proportional-Derivative-Integral controller, and is a feedback controller that takes an error for a controlled state and outputs a correction. For example, on an airspeed controller, the error would be the desired airspeed minus the current airspeed. The output is then determined by the sum of three factors using the error and the P, I, and D constants. The “P” factor is simply a factor proportional to the error. The “I” factor is an accumulated factor scaled by the error. The “D” factor is a factor based on the rate of change of the error.

“P factor” = P * error

“Accumulated I factor” = “Accumulated I factor” + (I * error * deltaTime), in Calculus terms, this is simply an integral. The error must reverse its sign to drive this accumulated factor to 0. This is characterized as oscillations, but drives the error to zero.

“D factor” = D * error/deltaTime. As the error gets smaller, this drives the output to be asymptotic towards the desired value.

http://www.prepar3d.com/SDKv2/LearningCenter/simobjects/simobject_api_references.html

The string values eg

Pk, Ik, Dk, I boundary, D boundary
0.015, 0.001, 0.001, 1.0, 1.0

2 Likes

v0.5.7.1 is on the Drive

Changes

  • Added Fuel pressure CAS callout,
  • Fuel pressure increased aswell
  • HDG mod Autopilot wiggle should be gone.
4 Likes

So, Ive made a “budget FADEC”.

Its basically a prop controller, but it reverse calculates the output power after changing the prop RPM… and then changes the RPM, yeah, its very crude. Its not like the Cirrus where the RPM is based on throttle position. (That’s the exact bug that we are facing)

“Why should I care?” you ask

  • It sets the correct prop RPM for you according to the power curve, Kinda making it single lever operation.

Same quirks as with the nonFADEC:

  • You will have to monitor your power during the climb and its possible to go over 100%

Download on the drive
Install instructions in the Readme.

2 Likes

Great work. I gave 5.7.1 a quick test and can confirm the budget FADEC works exactly as advertised, and the heading wobble is cured. The prev version also overshot the heading by about 15-20 degrees, and this is also fixed. Really love the “budget FADEC” and I think this should replace the Non-FADEC model altogether.

hey MrTommymxr,

i tested the new version with budget FADEC, it works really great and as BilingualHarp7 said, i think it should replace the nonFADEC version alltogether until the simconnect bug fixed.

one bug that i find that the heading woble is still there if i click the sync heading button before i turn on the autopilot on, it is still off 15 degree.

but with all, it is really great job and i enjoy flying DA40NG more now

thanks.

do you remember your weight and balance and what speed were you doing so i can better replicate it.

hi so i tried it again, and now the sync heading bug is reaaaalllyyy off when i click it (Sync to current heading) or it is always fixed to 310 degree in my case. i used normal weight and balance 50% all in game setting. speed around 90

i also not setting any gps for autopilot and starting the plane from parking and cold state

maybe it also helped if you know that i am using the latest working title g1000 (v0.3.1)

1 Like

I have the same problem with the sync heading.

I had issues with this mod and the G1000 mod installed after updating to 1.9.5.0. When the avionics were on my frames took a pretty significant hit. Not sure if it was an install issue or something but I’ll try re-download fresh copies of both and see if the frames issue persists

Upon removing both though, flying the vanilla DA40 with no mods installed to the sim at all, I experienced the significant HDG mode wobbles back and forth, as well as the heading sync not actually syncing with my current heading, was always about 2 or 3 degrees out, so i think that’s just a vanilla MFS autopilot/DA40 issue.

Alright, so its not an isolated issue. Im not sure why its the da40 in particular. Ill take a look when I can.

Hi there!
Thanks for your work, I am pleased to fly a more realistic DA40NG.
I have an issue with the G1000 not reported the fuel used, i.e., my fuel gauge always read 100%. As anyone seen this?

it worked for me, but since tonight, the rpm stays low, about 1900 - 2100, even with full throttle

How much fuel did you put in?
The maximum indicated is 14 Gal. the other 5 and a half are not indicated.

Also double check that you don’t have unlimited fuel turned on.

what were the outside conditions? if its warm, then its possible that you can’t even get it up to RPM… hmmm

need to check that