July 4, 200619 yr I am wanting to have a separate switch turn on the power to electric gyros. The current instruments come on with power, battery or alternator/generator.So, I'm guess that it's failure actions contain: { FAIL_SYSTEM_ELECTRICAL_PANELS, FAIL_ACTION_ZERO }, { FAIL_NONE, FAIL_ACTION_NONE }In aircraft.cfg there is stuff like this:[electrical]; BUS 0=Main, 1=Avionics, 2=Battery, 3=HotBattery, 4-7=Gen/Alt(1-4)light_strobe = 0, 5, 17.0 avionics = 0, 5, 17.0 directional_gyro = 0, 5, 17.0directional_gyro_slaving = 0, 5, 17.0additional_system = 0, 2, 17.0How do we decide which of these (and others available) an instrument is assigned to?It would seem that to assign one to the "avionics" above we would use this: { FAIL_SYSTEM_ELECTRICAL_AVIONICS, FAIL_ACTION_ZERO },in failures, but what about the others?Also, what the heck is tied to addition_systems? How would we tie to it?Can anyone clear up my understanding of this stuff?By the way, as I want both my directional indicator and attitude indicator to be electrical (ie. not on a vacuum system) I have this in aircraft.cfg:[direction_indicators]//1 Type: 0=None, 1=Vacuum Gyro, 2=Electric Gyro, 3=Electro-Mag Slaved Compass, 4=Slaved to another//2 Indicator number of slaving indicator if Type = 4direction_indicator.0=3,0[attitude_indicators]//Type: 0=None, 1=Vacuum Gyro, 2=Electric Gyroattitude_indicator.0 = 2 Patrick
July 4, 200619 yr If you really want to model an electrical system then do it all yourself, don't use the MSFS one. Have a shared variable or an electrical systems class that controls power on your buses!
July 4, 200619 yr Author Moderator As mgipson wrote, the best method is to design your own system.Also, I have completely abandoned the SDK's "Failure System" largely because of its sometimes unpredictable behavior.As long as I'm coding the entire system, I may as well add my own failure system as well... ;) Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
July 4, 200619 yr Ok, so basically just make my own gyro instruments, and have them check for my own switch for power, and have that switch just provide power when the main battery is on or the generator is powering the circuit.Then, I can have my own instrument define how many amps it uses etc. and keep track of all of it. Since I'm using c++, I guess just create an electrical class is the way to go.Then, pretty much ignore aircraft.cfg electrical section.Thanks, guys.Patrick
July 5, 200619 yr Author Moderator >Then, pretty much ignore aircraft.cfg electrical section.Well, at least for those things that don't actually work, such as "Starter" current draw... ;)I've been working on the Columbia 400's electrical system. Since the a/c is fully electric, it has a dual battery, dual alternator system, including a crosstie switch.This would be completely impossible to accomplish using only the SDK parameters and tokens.As an added complexity bonus, certain instruments will "shed load" automatically under particular failure conditions, while others might require manual intervention, such as "pulling the circuit breaker for 10 seconds then resetting the circuit breaker." ;) Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
July 5, 200619 yr Sounds awesome. Yeah the main thing that stops me from just creating my own systems is that while my instrument might see power (from my variable) if the real battery is off, this could lead to strange situations.Patrick
July 5, 200619 yr Hi,"Sounds awesome. Yeah the main thing that stops me from just creating my own systems is that while my instrument might see power (from my variable) if the real battery is off, this could lead to strange situations."In aircraft.cfg, under "electrical" section, I use this "magic" line:electric_always_available = 1to tell FS that I need an endless battery charge.Starting point of my complete custom electrical system .Tom
July 5, 200619 yr Tom,To funny! I love it. I was just going over the aircraft.cfg stuff with a fine tooth comb, and saw that one and thought what would I ever use that for, lol.I finally understand now that the various "circuits" are basically hardwired to specific controls like a particular panel light. Hence, anything not enumerated gets stuck under "additional systems". All of this meaning that I could ######ize one of the circuits (like wing_lights, on a helicopter).Anyway, seems to make more sense and to be easier to just turn it on, then create a global bool and use that for power. Then we don't have to worry about the dreaded flat battery syndrome either.Thanks all.
July 6, 200619 yr Author Moderator Depending on just how "detailed" you want to be, you can also "flatten the battery (ies) however you like. The Columbia has two 24 volt battry systems, plus several small, backup batteries to provide emergency power to critical systems.It's nice to be able to design the system as realistically as possible. Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
Create an account or sign in to comment