Search the archive:
YaBB - Yet another Bulletin Board
 
   
 
Page Index Toggle Pages: 1
Send Topic Print
I want to write a couple of gauges...... (Read 753 times)
May 19th, 2010 at 6:16pm

JBaymore   Offline
Global Moderator
Under the curse of the
hombuilt cockpit!

Gender: male
Posts: 10261
*****
 
....and I am wondering how hard this will be to do.  All of this is geared to simpit use.

#1  GPU
I want to write a Ground Power Gauge.  What it needs to do is supply AC/DC 24 V power to the standard MS offset accessible power buss whenever it is switched on.  When it is switched on, the battery does not drain, but is recharged.  Aircraft systems need to be powered until either APU generator takes over, or an engine generator is turned on.  It needs to toggle on and off, preferably using an offset that FSUIPC can access....not a "keypress" or one of the so-called "unused assignments" (bacaues in my simpit there ARE no unused assignments  Wink ).  It should monitor "aircraft on ground" and "parking brake set"... to make sure it cannot work in-flight or when moving.

#2  APU Generator
I want to write a APU Generator Power Gauge.  What it needs to do is supply AC/ DC power to the standard MS offset accessible power buss whenever it is switched on.  When it is on, the battery does not drain, but is recharged.  It needs to toggle on and off, preferably using an offset that FSUIPC can access....not a "keypress" or one of the so-called "unused assignments" (because in my simpit there ARE no unused assignments  Wink ).


#3  APU RPM
I want to write an APU RPM Gauge.This gauge needs to monitor the state of a switch (keypress) that is used to start the APU unit (this APU gauge already exists) and when that key is pressed, assign a slowly increasing numeric value into an FSUIPC accessible offset, and then set another FSUIPC offset to "true" from "false" when the numeric value reaches a pre-set maximum.  When the numeric value goes the other way, the "True" needs to change back to "False" at a certain numeric value.  (These offset locations will get monitored to drive some cockpit display gauges... one will read that increasing numeric value and display the APU spooling up, and the other will light an "APU Ready" light.)

Any thoughts appreciated.

best,

.............john
 

... ...Intel i7 960 quad 3.2G LGA 1366, Asus P6X58D Premium, 750W Corsair, 6 gig 1600 DDR3, Spinpoint 1TB 7200 HD, Caviar 500G 7200 HD, GTX275 1280M,  Logitec Z640, Win7 Pro 64b, CH Products yoke, pedals + throttle quad, simpit
IP Logged
 
Reply #1 - May 20th, 2010 at 6:06pm

Travis   Offline
Colonel
Cannot find REALITY.SYS.
Universe halted.
Dripping Springs, TX

Gender: male
Posts: 4515
*****
 
I wrote one gauge (a flaps switch) for my Angel 44, and it took me several tries just to get the concept down.  And about three days worth of work, as well.

That was a simple and straightforward gauge, as well.  What you're talking about is fairly complex and involved.  I would recommend that you take a look at anything that resembles what you're trying to accomplish and see how that author did it, then download the Panels and Gauges SDK and read (unfortunately) the ENTIRE thing.  You'll understand more about it if you have a reference gauge to look at when you read.

Good luck . . . you're gonna need it! Wink
 

...
IP Logged
 
Reply #2 - May 21st, 2010 at 6:05pm

Tech Diver   Offline
Colonel
Concord, Massachusetts

Gender: male
Posts: 196
*****
 
John, there are essentially two aspect of working with variables in gauges: Displaying the status of the variable, and toggling its state.

Can you give me some more details on the gauge? For example, if the APU is turned on, do you want a push-button to light up or would you want a graphic icon to appear on one of the MFD screens? How do you want to activate the APU?

If you can give some of the above info, I could probably put together some sample code for you regarding the APU (as a start) as well as the others you have listed.

As far as charging the battery, that is all taken care of within FSX itself. As soon the variable "APU GENERATOR ACTIVE" is TRUE, everything else is handled by the sim.

Peter
 
IP Logged
 
Reply #3 - May 22nd, 2010 at 10:21am

JBaymore   Offline
Global Moderator
Under the curse of the
hombuilt cockpit!

Gender: male
Posts: 10261
*****
 
Tech Diver wrote on May 21st, 2010 at 6:05pm:
John, there are essentially two aspect of working with variables in gauges: Displaying the status of the variable, and toggling its state.

Can you give me some more details on the gauge? For example, if the APU is turned on, do you want a push-button to light up or would you want a graphic icon to appear on one of the MFD screens? How do you want to activate the APU?

If you can give some of the above info, I could probably put together some sample code for you regarding the APU (as a start) as well as the others you have listed.

As far as charging the battery, that is all taken care of within FSX itself. As soon the variable "APU GENERATOR ACTIVE" is TRUE, everything else is handled by the sim.

Peter


Peter,

Thanks for the input and the kind offer.

I'm living in the "Simpit Realm" here.  A different kind of insanity.  So that sort of changes everything as to the mental orientation of this project. 

Also living in the "FS2004 World". FS2004 does not emulate the APU at all.

First of all I need to be able to create a "sub-system" within the gauge that is external to the sim itself, since the functions I need are not modeled by Microsoft in any way.  I unfortunately can't "fake" an APU out of using another non-thrust creating engine (simple), because I already fly a four engine jet.

Secondly, I then need to be able to turn this subsystem on and off, and likey not by using "unused key assignments", since my simpit already uses about every normal token key assignment that Microsoft built into the default sim.  So that likely will entail "poking" values directly into FSUIPC accessible memory offsets to turn things on and off and adjust them.

I don't need ANY displays of any kind within the sim istelf.  These are gauges in the panel that do not even need to be visiable at all.  No animations.  No lights.  No displays.  It is about the functions of the gauge, and access to those functions, not the displays.  The simpit provides all the displays (and very expensively I might add  Roll Eyes .  But they certainly ARE immersve!  Smiley)

FSUIPC can "read" the values at any given memory offset location directly.  This can then easily pass the value over to some of the simpit specific hardware.  So, for example, when the value at a certain memory offset changes from false to true, FSUIPC detects that change and then tells something like the Phindget's LED 64 controller card to turn on green LED #27, which on the physical overhead panel in the simpit is the "APU Gen On" annunciator light.  And so on.

To get info INTO the sim, a switch on maybe say the overhead APU panel, can be thrown and then a Phidgets' input controller card will know that the switch for the APU Start was thrown to the on position.  The controller then can either send ANY key combination input to the sim, or if a key sequence will not work or is not avaialble, it can also send a key combination to FSUIPC that FSUIPC then converts to a normal Microsoft SDK token value or places directly into a memory offset.

Hope this helps you understand my needs better.

best,

....................john
 

... ...Intel i7 960 quad 3.2G LGA 1366, Asus P6X58D Premium, 750W Corsair, 6 gig 1600 DDR3, Spinpoint 1TB 7200 HD, Caviar 500G 7200 HD, GTX275 1280M,  Logitec Z640, Win7 Pro 64b, CH Products yoke, pedals + throttle quad, simpit
IP Logged
 
Reply #4 - May 22nd, 2010 at 11:37am

Tech Diver   Offline
Colonel
Concord, Massachusetts

Gender: male
Posts: 196
*****
 
Hi John, Thank you for the explanation. I understand what you are saying and it is definitely quite a bit different from the way I have been interacting with the variables in the flight sim thus far. Additionally, it is for FS9 which has a number of significant differences from FSX. With all that being said, I will have to do a bit more research on this topic.

Regards,
Peter
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print