PDA

View Full Version : New builder - starter questions



Dutcheeseblend
08-05-2015, 04:05 PM
Hi there,

My name's Daan Kaasjager, aka Dutcheeseblend, and I'm an aircraft addon developer for FSX. I've created the Fokker D.21 fighter for FSX and now I'm working on a Fokker T.5 bomber. Believe me, it's fun, but I want to expand it a little bit, so: at least I want to recreate the virtual gauges for real, FS-controlled gauges.

So, to give you an idea what I'd like to replicate to a certain extent, the D.21's main panel:

https://googledrive.com/host/0B3rXXshj-mHdRjcwOTRWam9aY2s/custom_envmap01.png

After a little searching on he web, I came out at Opencockpits: the workflow seems quite easy for me. To get settled, I've got a few questions though:
- I want to start with one gauge; what hardware do I need to purchase?
- What software is needed to get the stuff working (besides FSUIPC and SIOC)?

Thanks in advance!

Cheers, DCB

Geremy Britton
08-05-2015, 06:06 PM
Its important to consider whether you want real guages with servos or if you will use a computer screen behind a panel to give the guage effect. This latter method keeps costs down whilst compromising on authenticity a little.

Shawn
08-05-2015, 06:40 PM
I just bought Air Manager the other day and so far I'm really impressed with the gauges that are provided and the ability to create and alter existing gauges. With a panel covering a monitor and a bit of work creating the gauge bezels I think that software displayed gauges are quite good. If nothing else it's a heck of a lot cheaper and would allow you to fly more than one type of aircraft panel. These gauges are displayed using Sim Plugins, another software gauge package that I really like. Both of these options allow you to run the gauges on a seperate computer from the one running FSX which is nice to take a bit of the workload off the sim computer.
http://www.mycockpit.org/forums/attachment.php?attachmentid=10463&stc=1

Shawn
08-05-2015, 06:44 PM
Not the best photo to show you I guess. None of the gauges are properly lined up with the cutouts in the overlay : ( This is a little better.

http://www.mycockpit.org/forums/attachment.php?attachmentid=10464&stc=1

Dutcheeseblend
08-06-2015, 02:10 AM
Hi guys,

Thanks for the replies! I've been thinking about this option (putting a monitor behind the panel), but it's not suitable for my situation. The panel structure for the D.21 doesn't allow for it.

So, my first trade-off has been made, I've chosen for servo gauge.

Cheers!

Avro748
08-06-2015, 12:53 PM
Since you made the aircraft, you have a huge advantage for this. What I would do is (assuming you used XML) collapse all of the variables involved in each of the needles movement into a single L:Var. IIRC, you just add "d (>L:NewVarNameHere,UnitHere)" after the gauges logic within the rotation/move tags. Then, either using an FSUIPC Lua script or a C Gauge, you then write a code to check the state of this new L:Var and write it to one of the free offsets described in the FSUIPC Manual. These offsets can be used with Link2FS (Arduino), SIOC (OC IOCards), Ruscool Boards, and many other popular output cards.

Here's an example of my modification to the HS748's Ammeter:
<value minimum="-100" maximum="300"><value minimum="-100" maximum="300"><value minimum="-100" maximum="300">

<value minimum="-100" maximum="300">Value Minimum="-100" Maximum="300">
(L:DC_Volt_Switch, number) -2 == if{ (A:Electrical battery load,amps) }
els{ (L:DC_Volt_Switch, number) -1 ==
if{ (A:Electrical genalt1 bus amps,amps) 7 * }
els{ (L:DC_Volt_Switch, number) 0 ==
if{ (A:Electrical main bus amps,amps) 7 * }
els{ (L:DC_Volt_Switch, number) 1 ==
if{ (A:Electrical genalt2 bus amps,amps) 7 * }
els{ (L:DC_Volt_Switch, number) 2 ==
if{ (A:Electrical battery load,amps) } } } } } d (>L:Ammeter1_SIOC,number)
/value>
"d (>L:Ammeter1_SIOC,number)" is what I added, everything else was already there
</value></value></value></value>

As you can see, there are a lot of variables involved in making this gauge work, but the resulting movement is written to a single Variable.

Dutcheeseblend
08-06-2015, 04:39 PM
...

Ok, thanks!

I imagine this is only for custom (local) variables? Most needles in the plane are just animations based on stock variables, ie. (A:AIRSPEED INDICATED,kilometers/hour). I assume these can be accessed directly from the FSUIPC offsets? I have some custom animations though, like an ammeter, voltmeter and a few more.

Just because I need to choose: I've chosen for SIOC/IOCards as the infrastructure.

So, the basic layout for a servo-controlled gauge will be:

FSX -> LVars if present -> FSUIPC offsets -> SIOC custom script (I assume) -> IOCards USB Servo Motors Card (+ power supply) -> Servo

Is that the complete outline?

Cheers, Daan

Dutcheeseblend
08-07-2015, 02:52 AM
Thanks Avro748!
I assume this is only needed for gauges that display a custom variable? Most of my gauges are just like
(A:AIRSPEED INDICATED,kilometers/hour) vars. Some are custom...

If I understand everything correctly (given I'm using SIOC), this is the complete architecture for a simple servo gauge:

FSX -> LVars if present -> FSUIPC offsets -> SIOC custom script -> IOCards USB Servo Motor Card -> Servo + power supply

Is this correct?

Regards, Daan

Dutcheeseblend
08-07-2015, 12:38 PM
Posted something here twice, but still not showing up...


Edit: Hmm, this one does.


Anyway, what I said in the other posts:


Thanks Avro 748! I assume this workflow is needed for custom coded gauges? I have a lot of standard gauges in my VC, having a simple standard variable like (A:AIRSPEED INDICATED,kilometers/hour), with a scale and bias of course. Some of my gauges are LVar based though, like my Ammeter.
So, I have chosen to use OpenCockpits. Am I correct that, for a simple servo gauge, this is the complete architecture:


FSX -> LVars if present -> FSUIPC offsets -> SIOC custom script -> SIOC -> USB Servo Motor Card -> Servo with power supply.


Thanks guys! Daan




By the way: typing in the reply fields here is very difficult. Sometimes, keys aren't taken along, so if I want to write: "hello", instead "hllo" will appear. Others having this as well?