Sign in to follow this  
Guest ceo1944

Bit of a problem

Recommended Posts

Hi Guys, I'm in the progress of making a fully functional overheadpanel for the Fokker70, but I seem to have a litlle trouble to get some things done like I want to. Is there anyone who can shed some light on this ?Purpose is to have External Power available when Aircraft is on the ground, with parking brake set and to overcome the external power available when holding short at a runway ( ;-) ) the engine generators must be off. I'm puzzeled with this as it does not seem to work. (A:SIM ON GROUND,bool)(A:BRAKE PARKING POSITION,bool) 1== && if{ (A:GENERAL ENG1 GENERATOR ACTIVE,bool) 1 == if{ 0 (>L:EXT_PWR_AVAIL,number) } els{ 1 (>L:EXT_PWR_AVAIL,number) } } I have made a monitoring gauge which displays the state of all variables but the EXT_PWR_AVAIL does noet change state. Whats going wrong ? regards Gert Polkerman

Share this post


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

> > > (A:SIM ON GROUND,bool)(A:BRAKE PARKING>POSITION,bool) 1== &&> if{ > (A:GENERAL ENG1 GENERATOR ACTIVE,bool) 1 ==> if{ > 0 (>L:EXT_PWR_AVAIL,number)> }> els{ > 1 (>L:EXT_PWR_AVAIL,number)> }> } > > > If your first if statement ((A:SIM ON GROUND,bool)(A:BRAKE PARKING POSITION,bool) 1== &&) fails, the second will never be evaluated. As such, while you are parked at the gate, switching the generator on and off will have no effect on the L:EXT_PWR_AVAIL variable.Doug

Share this post


Link to post
Share on other sites

Hi,May be a missing space between the first two statements??Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Is this for FS9 or FSX?If for FS9, then your L:External_Power,number variable will not actually DO anything in any case.If for FSX, then you should use the new APU system, that will actually supply "electrical power" to the system.I've programmed (in C) a "Ground Power Unit" which drives a "physical model" up to the a/c, plugs in the power cable, and provides a nice little 4 cylinder Hobart diesel idling sound...

Share this post


Link to post
Share on other sites

I faced the exact same problem, wanting to supply a realistic ground power "battery cart" as they called it in the DC-3 days. I wanted a cart that would supply power when connected, but which wouldn't connect when the user wasn't "at the ramp". I also wanted to be nasty and real and punish the pilot if he taxied off while the cart was still plugged in. I also wanted realistic delays while the ground crew unplugged and plugged in the cart. Here's my XML code, I hope it can be of some help. It's written for FS9. Questions gladly answered.Dutch---------------------------------------------------------------//// This gauge contains the ground power monitor/controller// (L:CartConnected, bool) (A:sim on ground,bool) 1 == if{ 0 (>L:DCCartAvailable,bool) (A:surface type,enum) 0 == if{ 1 (>L:DCCartAvailable,bool) } (A:surface type,enum) 4 == if{ 1 (>L:DCCartAvailable,bool) } (L:DCHasMoved,bool) 1 == if{ (L:DCHasFlown,bool) 0 == if{ 0 (>L:DCCartAvailable,bool) } } (L:DCCartAvailable,bool) 1 == if{ (L:CartInit,bool) 0 == if{ 180 (>L:DCDiscTime,number) 1 (>L:CartInit,bool) (L:DCHasFlown,bool) 0 == if{ 1 (>L:CartConnected,bool) 2 (>L:DC3Hum,enum) 180 (>L:DCConnTime,number) } } } } els{ 0 (>L:DCCartAvailable,bool) 1 (>L:DCHasFlown,bool) 0 (>L:DCHasMoved,bool) 810 (>L:DCConnTime,number) } (L:CartConnCycle,bool) 1 == if{ (A:brake parking position,bool) 0 == if{ 0 (>L:CartConnCycle,bool) } } (L:CartDiscCycle,bool) 1 == if{ (A:brake parking position,bool) 1 == if{ 0 (>L:CartDiscCycle,bool) } } (A:brake parking position,bool) 1 == if{ (L:CartConnected,bool) 0 == if{ (L:CartConnCycle,bool) 0 == if{ (L:DCCartAvailable,bool) 1 == if{ 1 (>L:CartConnCycle,bool) 0 (>L:ConnCount,number) } } } } (A:brake parking position,bool) 0 == if{ (L:CartConnected,bool) 1 == if{ (L:CartDiscCycle,bool) 0 == if{ 1 (>L:CartDiscCycle,bool) 0 (>L:DiscCount,number) } } } (L:CartConnCycle,bool) 1 == if{ (L:ConnCount,number) 1 + (>L:ConnCount,number) (L:ConnCount,number) (L:DCConnTime,number) > if{ 1 (>L:DC3SWLoud,enum) 0 (>L:DCHasFlown,bool) 1 (>L:CartConnected,bool) 2 (>L:DC3Hum,enum) 0 (>L:CartConnCycle,bool) } } (L:CartDiscCycle,bool) 1 == if{ (L:DiscCount,number) 1 + (>L:DiscCount,number) (L:DiscCount,number) (L:DCDiscTime,number) > if{ 1 (>L:DC3Relay,enum) 0 (>L:CartConnected,bool) 0 (>L:DC3Hum,enum) 0 (>L:CartDiscCycle,bool) } } (L:CartConnected,bool) 1 == if{ (A:Ground velocity,number) 2 > if{ 1 (>L:DC3Sparks,enum) 0 (>L:CartConnected,bool) 0 (>L:DC3Hum,enum) 0 (>L:CartDiscCycle,bool) 0 (>K:TOGGLE_ELECTRICAL_FAILURE) } } (A:Ground Velocity,knots) 1 > if{ 1 (>L:DCHasMoved,bool) } Ground Power Available

Share this post


Link to post
Share on other sites

Think I've got it, it actually works this way. Think i have to remove the visible statement an make this another If/els because when the Aircraft leaves the ground this code wiull not set the EXT_POWER_AVAIL to 0. (A:SIM ON GROUND, bool) (A:BRAKE PARKING POSITION, bool) if{ (A:GENERAL ENG1 GENERATOR ACTIVE, bool) if{ 0 (>L:EXT_PWR_AVAIL, bool) 0 (>L:EXT_PWR, bool) } els{ 1 (>L:EXT_PWR_AVAIL, bool) } } els{ (A:GENERAL ENG1 GENERATOR ACTIVE, bool) if{ 0 (>L:EXT_PWR_AVAIL, bool) 0 (>L:EXT_PWR, bool) } els{ 0 (>L:EXT_PWR_AVAIL, bool) 0 (>L:EXT_PWR, bool) } } This code will be extended, i want it to be that the Pilot has to ask for External Power via a Call to ground personnel and for the disconection of that power also.An as to answer another question, this is for FS9, im building a system wich will power the AC / TRU / And DC busses of the aircraft, External power and the apu wil be fictiously ( sorry for my poor english. ) The whole electrical system will power all of the aircraft, so it will have nothing to do with the system that exists apart from the generator input of the engine's. regards Gert Polkerman

Share this post


Link to post
Share on other sites

I've been down the road you're starting on, doing an electrical system to work around the one built-in to FS9. I know we're doing different airplanes but there are a few things to watch out for.On the cart, I tied the request to connect or disconnect to the pilot's setting or releasing the parking brake. When the cockpit first starts up, ground power is connected. When the brake is released the ground crew will disconnect the plug after a realistic delay. Once the pilot taxies away (exceeds 2 knots groundspeed) the cart won't re-connect until he's in the air and lands again and sets the brake and waits a minute or two; this keeps the cart from re-connecting unrealistically during the run-up. If he moves the plane before the cart is unplugged, he'll short out his electrical system. The cart isn't available except on concrete or asphalt surfaces (to simulate the lack of facilities at small airports).On the electrical system itself; remember that whatever you do, FS9 still is running it's own system in the background. It has a battery and when FS9 thinks that battery is dead (regardless of the state of *your* battery) it'll fail the electrical system and take yours with it. My solution (for those that don't have FSUIPC and who can't check the neverending battery power option) was to put near-zero amp loads on all the equipment in the [electrical] section of aircraft.cfg, this makes the FS9 battery last vastly longer on the ground. I also have my own failure system outside FS9's so I tied my gauges to my own failures so they don't stop working if the FS9 battery dies.The point is, if you go this way, you pretty much have to do it all in your code and plan carefully to avoid unintended side effects from FS9 .I'll be glad to send you my code or post it here if it would help.Dutch

Share this post


Link to post
Share on other sites

Yup, Gert, I got your email and replied. Hope you got my rely.Dutch

Share this post


Link to post
Share on other sites

Hi fellows,I only read over this thread quickly. But as much as I know about XML, EVERYTHING you want can be done. It is only a matter of ideas and knowledge about XML. To me it looks as if Gerts's first solution is the simpliest approach, but I'm afraid there are a few syntax errors.Gert, send me your gauge, and I'll try to fix things. Assuming you are german, write a brief german description of what you EXACTLY want to have.Herbie

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