Sign in to follow this  
kama2004

Douglas C-47

Recommended Posts

Is somebody know where to find a Linda module for the Douglas C-47 Version 3?

 

I tried to program a module but some functions that seems simple at first glance are difficult to program.

 

Like the Battery 3 positions. There is a Lvar for "Electrical master battery" that have values of 0,25 and 50 that moves the switch in the virtual cockpité But changing this variable does not induce the same behavior than when using the switch in the VC (in the VC, the switch at the "battery" position start the gyro and put on the generator light).

 

I see in the tracer that others variable like "ELECTRICAL MASTER BATTERY_TMP" AND "Gyro" are changed when I activate the switch in the VC but I haven't find the sequence (if any) to put in my Linda module....

 

Any suggestion appreciated...

 

 

 

 

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi Pierre,

 

I have my switches configured for Manfred Jahn's C-47, but did not create a module. I used the Linda tracker to find the codes, and then set the assignments up.

Let me know which specific assignments you are having problems with, and I can have a look at my assignments for you.

Share this post


Link to post
Share on other sites

Hi Manfred,

 

I was able to find the controls code or Lvar for most switches but;

 

- main battery (3 positions)

- main fuel pump (I tried with main fuel pump:1 abd :2, only the switches moves in the VC but I don't hear the pump. running)

- aux fuel pump. Same as for the main pumps but with Lvar aux fuel pump:1 and :2

Share this post


Link to post
Share on other sites

Hi Manfred,

I was able to find the controls code or Lvar for most switches but;

- main battery (3 positions)

- main fuel pump (I tried with main fuel pump:1 abd :2, only the switches moves in the VC but I don't hear the pump. running)

- aux fuel pump. Same as for the main pumps but with Lvar aux fuel pump:1 and :2

I don't have the C47 so I can't help with the details. However, Lvars are only one way to interface with an aircraft add-on. For basic items like battery and fuel pumps, I would suggest you see what effect the FSX controls have on these systems.

 

Sometimes the Lvar with control the simulated switch and relay its movement to the default FSX functions. When hunting for Lvar I have started a trace on all and switched off those that keep repeating continuously. Then I operated the switch/system in the simulation to see what changes.

Share this post


Link to post
Share on other sites

Hi Scott,

 

I tried different aproaches.

 

First was to use the "Battery ON" and "Battery OFF" from the lib-fallback.lua (LIB: Default FSX). These functions write to offset 281C. These do not change the Battery switch position in the virtual cockpit but light 2 generators lamps and energize the electrical bus. They also initiate the gyro sound.

 

Then, i tried a couple of FSX Controls.

 

66241 TOGGLE_MASTER_BATTERY : Same results as with the offset

66374 TOGGLE_MASTER_BATTERY_ALTERNATOR ; Same results as with the offset

 

Then I started hunting for Lvars. I traced all of them then removed the repetitive ones to find the ones involved in switching the battery to ON on the VC.

 

Finally, this sequence seems to do the trick;

 

function C47_Batttery_ON ()

_sleep(100,200)

ipc.control(66241) -- energize the bus but the switch doesnt move in the vc

_sleep(100,200)

ipc.writeLvar("L:Electrical master battery",0 ) -- this one move the switch in the VC..

_sleep(100,200)

ipc.writeLvar("L:DG_C47-Sw_31ON", 1) -- I dont know what this variable is doing but it seems a very brief internal status variable as the plane reset that variable immediately afterward.

 

end

 

With this sequence, I observe the same sequence of events in the Tracer (9 events when the switch is energized and 9 when closed).

 

I will hunt for the pumps behavior tomorrow....

 

Best,

  • Upvote 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this