Jump to content
Sign in to follow this  
dragonflightdesign

Attitude Indicator - Vacuum or Electric?

Recommended Posts

I have an a/c with two attitude indicators; one vacuum and the other electric.I have the aircraft.cfg file set for both types:[attitude_indicators]//Type: 0=None, 1=Vacuum Gyro, 2=Electric Gyroattitude_indicator.0=1 attitude_indicator.1=2What do I need to do in the C gauge code to indicate that the electric one is - well electric - so it won't tumble with vacuum loss?


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
Guest Patrick_Waugh

I was never able to do so, but this is likely more a reflection of my skill/knowledge. :)I humbly suggest just rolling yer own. =)

Share this post


Link to post
Share on other sites

>I was never able to do so, but this is likely more a>reflection of my skill/knowledge. :)>>I humbly suggest just rolling yer own. =)Well, not surprisingly, the SDK simply mentions the ability to define them in the aircraft.cfg, but says absolutely nothing about how to code them in either XML or C...The problem is that the bank and pitch variables themselves are being dynamically changed with vacuum loss, presumably to some "un-caged" value.Ideally, an electric attitude will "tumble" only on loss of power, and for that I need variables that don't automatically change!


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
Guest Patrick_Waugh

Yes, hence why I rolled my own. :)I actually created a "gyro" object that is almost self-aware (ok, not quite). It "senses" power, and then "spins" up/down as required without any effort on my part. All I do in the gauge is say something like: displayedHeading = gyro->Heading; displayedBank = gyro->Bank;But it was initially painful to write the object, and get the spool just right through painfully emperical means. But now, I can create as many gyros as I need in a second.I'm betting someone else has a better way though.

Share this post


Link to post
Share on other sites
Guest ridgell

well i read your post to get answers...nearly afraid to offer one:) mentioned that you cant use (A:PLANE PITCH DEGREES,radians/degrees)(A:PLANE BANK DEGREES,radians/degrees)...i use those vars for my HUD, to prevent being affeted by vacum pressure. i have not noticed them responding to vacum loss. i will look again after closing this page.but i fear that will be your only option, short of creating your own seperate vacum system/responce.

Share this post


Link to post
Share on other sites

The only variables available are:PLANE_PITCH_DEGREES,ATTITUDE_INDICATOR_PITCH_DEGREES,PLANE_BANK_DEGREES,ATTITUDE_INDICATOR_BANK_DEGREES,I haven't tried PLANE_xxx variables, yet......nor have I tried using the XML tokens.There is obviously some way simple to implement the "electric attitude" otherwise why have the aircraft.cfg settings?


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

Hi Bill,What happens if you remove the vacuum gauge from you aircraft.cfg file and just leave the electric?I wonder if you fail the vacuum system in the 737, does the attitude indicator tumble! If it tumbles, then MS overlooked this area.The Twin Star (DA-42) is an all electric aircraft, so this might be a problem for simulating it or any other aircraft that are all electric.W. Sieffert

Share this post


Link to post
Share on other sites

Hi,the type of vacuum resides in the .air file.Using an utility like Air Ed you can set which kind of vacuum you like to have in your plane:Item 1512-Int32-Indipendent vacuum pump(electric)-Engine driven pump-Emergency vacuum pump (electric stby vacuum).Cheers

Share this post


Link to post
Share on other sites

>Hi Bill,>>What happens if you remove the vacuum gauge from you>aircraft.cfg file and just leave the electric?>>I wonder if you fail the vacuum system in the 737, does the>attitude indicator tumble! If it tumbles, then MS overlooked>this area.>>The Twin Star (DA-42) is an all electric aircraft, so this>might be a problem for simulating it or any other aircraft>that are all electric.The DA42 is indeed all electric. I've already finished coding the gauges for that project and - since they are all electric - the problem doesn't exist given the appropriate aircraft.cfg entry.However, I am in the process of coding the gauge system for Roy Willbank's Piper Twin Commanche (the one AOPA gave away a few years ago), and it is fitted with TWO attitude indicators.The primary is vacuum driven, whereas the standby is all electric, and in fact has it's own battery for emergency situations.Furthermore, the SDK says that we can define more than one type to be used in the same aircraft via the aircraft.cfg file://Type: 0=None, 1=Vacuum Gyro, 2=Electric Gyroattitude_indicator.0=1attitude_indicator.1=2What the SDK does not say is how to code the gauge as either the .0 or .1 type definition! :-newburn :-bang


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

>well i read your post to get answers...nearly afraid to offer>one:)>> mentioned that you cant use (A:PLANE PITCH>DEGREES,radians/degrees)(A:PLANE BANK>DEGREES,radians/degrees)...i use those vars for my HUD, to>prevent being affeted by vacum pressure. i have not noticed>them responding to vacum loss. i will look again after closing>this page.>but i fear that will be your only option, short of creating>your own seperate vacum system/responce. Well, as it happens you pointed to a solution, even though it likely isn't the "correct answer" to the actual question.Indeed, using these for the vacuum driven gauge:{ATTITUDE_INDICATOR_PITCH_DEGREES};{ATTITUDE_INDICATOR_BANK_DEGREES};as well as these for the electric driven gauge:{PLANE_PITCH_DEGREES};{PLANE_BANK_DEGREES};will allow me to have both types in the same aircraft. Interestingly enough, the latter pair aren't even tied to the electrical system at all, meaning that I can now easily simulate both main battery and emergency battery operations!All I need is some code that will slowly "spin up the electric driven gyro" from the main battery source, or from it's own internal backup battery, which I can also make "dischargable over time..." :)


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

So, this is what I've come up with. It works pretty good. Now I just need to code some "vibration" into the mix. When the gyro stabilizes, both the card and ring "vibrate" up/down, back/forth for about 20 seconds before becoming stable.Also I need to code a discharge cycle for the standby battery so it will provide about 45 minutes use before going flat.// Erect Electric Pitch if ( ( mbat == 1 || stby_battery == 1 ) && fast_erect_pitch == 0 ) { if ( attitude_electric_pitch < 0 ) attitude_electric_pitch = attitude_electric_pitch + 0.1 ; else fast_erect_pitch = 1 ; }// Erected Pitchif ( ( mbat == 1 || stby_battery == 1 ) && fast_erect_pitch == 1 ) { attitude_electric_pitch = PLANE_PITCH_DEGREESvar.var_value.n ; }// Unerect Pitchif ( mbat == 0 && stby_battery == 0 && fast_erect_pitch == 1 ) { if ( attitude_electric_pitch > -20 ) attitude_electric_pitch = attitude_electric_pitch - 0.1 ; else { attitude_electric_pitch = -20 ; fast_erect_pitch = 0 ; } }// Erect Electric Bank if ( ( mbat == 1 || stby_battery == 1 ) && fast_erect_bank == 0 ) { if ( attitude_electric_bank > 0 ) attitude_electric_bank = attitude_electric_bank - 0.1 ; else fast_erect_bank = 1 ; }// Erected Bankif ( ( mbat == 1 || stby_battery == 1 ) && fast_erect_bank == 1 ) { attitude_electric_bank = PLANE_BANK_DEGREESvar.var_value.n ; }//Unerect Bankif ( mbat == 0 && stby_battery == 0 && fast_erect_bank == 1 ) { if ( attitude_electric_bank < 30 ) attitude_electric_bank = attitude_electric_bank + 0.1 ; else { attitude_electric_bank = 30 ; fast_erect_bank = 0 ; }


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
Guest ridgell

good news! probably a couple of years ago i was posting here looking for a solution to stopping the hud and back up attitude from all locking when the 'cage' was pulled on the main attitude, and was told that 'Position and Speed Data' was independent of the outside stuff affecting 'Instrumentation Data'

Share this post


Link to post
Share on other sites

Hi BillI know you're using xml rather than C but... I stopped using the FS system failures as long ago as FS98 because in general they're almost next to useless i.e. everything gets a FAIL_GAUGE_NONE. From then I have always created my own failures system when needed. That includes winding gyros up and down, tumble failures etc. etc. Figuring out the C code to topple a gyro for an aborted commercial project was an interesting exercise; I still have it somewhere. Surely there has to be some equivalent to FAIL_GAUGE_NONE in the xml system?-Dai

Share this post


Link to post
Share on other sites

>Hi Bill>>I know you're using xml rather than C but... ??? Huh ???Did the code segment I posted look like XML?I only use XML when absolutely required to do so by the project's developer/publisher.Well, that's not entirely accurate. Since FSX aircraft models use embedded XML exclusively, I have become quite adept at writing C code that extensively uses XML variables in order to make synching the 2d panel system and 3d systems easier... ;)WRT to the so-called "Faiure System," I've never bothered to even test it at all... "NULL" is used a lot in my code... ;)


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

>>I know you're using xml rather than C but... >>??? Huh ???>>Did the code segment I posted look like XML?>*:-* (because there's no blush smiley)-Dai

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...