PDA

View Full Version : Thinking out loud about OpenCockpits



MrRoper
02-06-2009, 07:39 AM
Hi guys,

I have ordered some parts from Opencockpits so I can get into some SIOC programming, I am a programmer by trade so Feel i will be able to pick this up easily.

Now thinking ahead, I know that the PMDG 737 doesn allow us full access to the systems etc, so people like Ian have "simulated" alot of the annuciators etc using clever wiring.

Has anyone replicated these systems using sioc? if so does SIOC code run quick enough for this to not be a problem?

My hope is to replicate all the overhead indicators in SIOC code reacting to switches etc, does this sound "doable"

sorry for the ramble!!

Chris!

MortenHa
02-07-2009, 03:01 PM
Hi Chris!

You should have no problem with the language! its simple, a mix of event-driven programming language and a operator language. And does not actually deserve the programming language title, it is a special purpose scripting language. Very limited when it comes to generic programming abilities. Doesn't support stacks, heaps or arrays. Does not come with a library. And only supports boolean, integer and floating point variables (with strange limitations)

IF-ELSE is the only flow control (but being a programmer by trade, you know that flow control in higher languages is broken down to IF-ELSE semantics on assembly level, so nothing is really lost).

BUT

It is a excellent platform for connecting OC hardware to your sim.
And does it with grace and ease.

As to your question on PMDG and SIOC read this post:

http://www.mycockpit.org/forums/showthread.php?t=13084

It based on sending PMDG keystrokes to FS (when flicking a switch)

But I don't know if it is possible to assign keys to the PMDG overhead switches (have serious doubts).

In fact, I think that the PMDG Overhead panel software will not play well with OC hardware no matter what you try. As SIOC is primarily contructed to manipulate/display FSUIPC offsets values.

And we all know the story there: PMDG has not published any offsets for programming use:(

I cannot tell you if it is fast enough, we don't use PMDG panels, but PM.

Enjoy SIOC! and perhaps consider PMSystems for your overhead logic

Have a nice weekend

Morten

MrRoper
02-07-2009, 03:37 PM
Hi Morten,

many thanks for your reply :) Unfortunatly PM isnt an option for me as I am going to be building on a budget, However after looking at the systems operation manual i think I could simulate a lot of these systems in SIOC

here is an example using the GND Power switch for the PMDG 737

ok so first of all create a mouse macro using fsuipc for the switch, then assign this to a keypress,

in SIOC

using an initialisation Var
{
check if the aircraft is on the ground and the parking brake is set, if this is true then illuminate the ground power available light
}

using switch event for grnd power
{
send the keypress
turn off light
}

obviously there is more to this but, looking at first glance, i reckon I could simulate a **** of a lot of the overhead lights!

NigelD
02-07-2009, 06:45 PM
Hi Mr Roper!
Could you let us know how it goes for you? I (like many I guess) anticipate using Opencockpits int he near future. I have only rudimentary knowledge of programming, but HOPE to be able to pick this up! Your experience would be appreciated...

Nigel.

MrRoper
02-07-2009, 07:38 PM
sure will mate :)

been looking into a bit more, with the use of SIOC and LUA scripts from within FSUIPC i think im going to be able to replicate most systems.

If anyone wants to swap building knowledge for Software knowledge I will be more than happy, I can write code..but im not to good with a saw! :)

im not looking forward to cuttiong out my MIP! :)

bagarie
05-23-2009, 01:36 PM
Hi Mr Roper

I'm started to build a SIOC code to inteface my Home Made Overhead panel with PMDG 737.
It's a big work also because I'm not a rela programmer.
Have you any news about your project?

Many Thanks
Arnaldo Vacca

ADW
05-23-2009, 03:14 PM
I seem to recollect that Pete Dowson attached a full macro file for the PMDG overhead with his release of FSUIPC that had the macro capability. Perhaps others could confirm?

If so that should cut down your preparation work and allow you to concentrate on the SIOC code to automate it all. The best of luck. It would be very helpful to many people if you could take the PMDG overhead logic forward to allow switch operation and associated annunciators.

Andy