PDA

View Full Version : I'm new to MyCockpit!



pilotgil
09-20-2010, 11:22 PM
Hello All,

I'm new to MyCockpit. My name is Gil. I have been flying MSFS for many years. Also, I am a "real" commercial pilot and flight instructor. I also have my own Cessna. I have built a generic fixed-wing sim and it's been operational for five or six years. I use it mainly for instrument currency and it has proven to be very reliable and functional.

I have a "professional" background in simulators as I worked for both Boeing and McDonnell-Douglas. I have hundreds and hundreds of hours in Level D (CAE and FlightSafety) sims such as MD-11, MD-90, B-717, etc. I also did freelance service work on general aviation sims suchs as ATC, Frasca, etc. My background in electronics is extensive (hardware and low-level assembly coding) but I am a Windows weakling.

Much of my current "home" sim is plug and play with MSFS 2004, Goflight, etc. I do have several "extras" designed around some PIC micros.

My goal is to replace the Goflight modules, not because they are bad, but because I want the realism even better. This is where I need help. I really know nothing about FSUIPC and how MSFS really works at the gut level. I figure once I understand how these work, I may be able to come up with some neat designs for radios, etc.

I'm sure I'll have plenty of stupid questions at first but I'm hoping I can give back in some way.

Ronson2k9
09-21-2010, 01:14 AM
WOW.. Sounds like you'll be helping us more then we'll be helping you. Welcome to Mycockpit. There are tons of threads here to get you started .. Well re-started on your sim. Like many things there are quite a few solutions to the same problem depending on your skill set and amount of time/money you'll willing to part with. From yours I can see you'll fit right in here :)

Do you have a particular aircraft or aircraft system you wish to improve on?

Cheers
Ron

Nick1150
09-21-2010, 01:22 AM
Welcome Gil to MC.org ;)

Relax and have a good time :D

Geremy Britton
09-21-2010, 05:16 AM
Great to have an experienced pilot with us, as Ron said i'm sure you'll be able to help us out as well.
Have a great time, and the MD-11 is a great aircraft. :)

Joe Cygan
09-21-2010, 09:42 AM
Welcome to mycockpit pilotgil!

nricky
09-21-2010, 01:31 PM
Hi Gil

Welcome to the forum, now we only need pictures in what you have done. With such a backround can't wait to see what you have done.

Hope you have lots a fun here just us I have here.

Cheers Norbert

pilotgil
09-22-2010, 12:22 AM
Thanks everyone.

I'll take some pictures this weekend and make them available. My sim is simple and built out of plywood but came out fairly well.

I keep it at the airport in my hangar and it has seems to have quite a following of pilots who come by to work on instrument skills. While they can't "log" the time, I can make them sweat (I have the FS Instructor station networked in) - nothing like an engine failure in IMC to cause panic. Also, for students learning to fly, we do their cross country work in the sim first.

My problem with my sim is that the avionic controls are not "real" enough and cause a negative learning experience. For example, the "autopilot" controls are not like a real KAP140 and are not in the correct place. I know I can spend $5,000 for a Simkits avionics stack but I don't have the "extra" cash for that.

The autopilot is the biggest problem. My first project is to build a more realistic version of the autopilot. I plan to first start with a GF-46 Goflight circuit board and add a PIC microcontroller and display as a front end. The PIC front end will act "almost" as a KAP140 (I'll leave out the trim test and baro setting). The PIC frontend will control the Goflight module. I think this will work fairly well but it will be clunky and a "hack" in an engineering sense.

If I knew how FS and FSUIPC worked, I think I could eliminate the Goflight module (it's a good module and their products have served me well - I recommend them) and have a pure engineering solution. I just don't know enough at this time.

blueskydriver
09-22-2010, 01:52 AM
Hey Gil,

Welcome to MYC! Rather than explaining anything first, let me ask you these things:

1. Have you downloaded/purchased FSUIPC and read the PDF manual that comes with the program. If not, read that and don't try to get it all at once. This will give you an introduction to FSUIPC, and you'll learn more as you go.

2. You've been using FS9 (2004), are you planning to go to FSX?

3. You've used GoFlight units, so imagine them as I/O cards with the buttons, switches, leds, and etc. attached directly to the the I/O card behind a pretty panel with GoFlight Name on it. Now, just think the I/O cards being a seperate thing and the buttons, swtches, leds and etc are on a different pretty panel not attached. GoFlight uses it's own software coding, but now you would have seperate I/O Card that would just use FSUIPC as the offset coding (interface between the buttons, switches, and leds I/O card) to FSX (or FS9). Of course you can get more intense programs that work with the cards, like SIOC or InterfaceIT

4. Where are you located in the USA, which city and state? There might be other sim pilots really close too you that have a project going with FSUIPC and who could come visit you...

5. Have you gone to Peter Dowson's (FSUIPC) website? He is the God and creator of FSUIPC, so going to his site will provide a lot more in the realm of answers for in depth coding with FSUIPC and FSX (or FS9).

6. Which aircraft are you going to simulate for sure? Do you have an add-on for it? Or, are you just using default planes yet? If possible get an add-on, you might be able to simulate more with it.

7. How many computers are you (or will you be) using to run this sim or new sim? Read about WideFS.

8. Have you looked at I/O cards by different companies? Like Flightdeck Solutions (FDS) SYS cards, Opencockpits I/O cards (too many to list), or other type companies that produce cards, they all have different ways of doing the I/O part, but the idea is to read up on theirs to understand how to make your own, if that is the grand plan for you.

9. What are you using for flight surface controls? Will you be using FSUIPC to interface those? If not, you should, as you get more functions with FSUIPC for this.

10. What other add-ons are you using? Sometimes they can make a difference with FSUIPC. For example, you could use the instructor's station to control (change) the weather or the runway surface being wet or dry by using offsets in FSUIPC and with whatever add-on that relates to this. An example would be using FSUIPC, PMSytems (project magenta), TSR 737 add-on, FSX and FSUIPC together for working with a B737 sim.

Finally, if you can get photos posted sooner, that would really give a good idea of what you got, and if you're staying with that, it provides a better frame of reference. The most important part is what aircraft are you really looking to simulate? Unless, you really plan to keep it generic, and this will somewhat compund the problem, but nothing you couldn't work through...

John

pilotgil
09-23-2010, 12:39 AM
I have both FS9 and FSX on my system but run FS9 as my primary sim. I have tried to read the FSUIPC manual but start going cross-eye real quick. I have just started trying things out and seem to have made some progress with the FSUIPC buttons, keys, etc. (very cool by the way!) The "offsets" are confusing as all heck because I just don't see where and how they relate to the sim. I see "offsets" mentioned and talked about but there isn't, for a beginner, an easy to understand description, and examples at altering or reading an offset. I need pictures rather than words to understand the relationship. I have no idea where "offsets" go, what are their values, or how you control them. I am sure when it "clicks" I'll be off and running but I just can't find a coherent source for my understanding...yet. I'll get there.

I am assuming that offsets are memory locations from a base address which are bits, nibbles, bytes, or words and each has a function (e.g. lights on/off, flaps 10,...). But I really don't know. I guess that FSUIPC somehow lets other applications access to the tables where the offsets from some base address are written or read. But, again, I don't know. For example, the ADF "value" or frequency must be somewhere. It must exist in a table somewhere. How does Goflight grab that data, through FSUIPC, and get it to the Goflight display?

See for me, it would be easy for me to design an PIC controlled "copy" of a KAP140. No problem, I could design the hardware, write the code for all the knobs, buttons, and displays to work. It's a snap. Polling the switches, multiplexing the displays, calculating power requirements, simple. But...how in the heck do I make the thing talk to FSUIPC and the sim...no idea.

As far as IO boards, I have seen that there are so many and each may or may not have it's own language or some sort of script. But FS has assignments, FSUIPC has it's own button/key functionality, etc. For someone with little FS or Windows knowledge, jumping to the discussion of offsets is like drinking from a firehouse.

The easy way, in a generic Cessna model, is just one monitor for the panel (which I have done) with my own panel instruments (using FS Panel), fsuipc, a projector for the visual, and then the Goflight for avionic controls. Oh, I did forget to mention the yoke and throttle. mixture, prop, which I use the Simkits board and my own design for the controls. My sim works amazing well. I can program the weather to be 200 and 1/2 and shoot an ILS to minimums using a life-size panel (monitor #1) and the projector is there where I break out and land. I built a fuselage shell that feels real enough. As a certificated pilot who has an instrument rating and quite a bit of actual IMC time, I can tell you that the sim is almost a real as flying my own "real" plane in the same conditions.

I am not looking to build a 747, I just need to improve the avionics in my sim...for now.

blueskydriver
09-24-2010, 12:41 AM
Gil,

Okay, you've provided a better picture of where your going; although, I understand your abilities to design and program your own pic controllers, but why (IMO) reinvent the wheel. Unless, you plan on making I/O cards with the pics being programmed, and then selling them?

Let me try to shed a little light on this for you*.

*[First A Disclaimer: All rights of FSUIPC belong to Peter Dowson. Please goto his site for more complete information, as I am only trying to help explain FSUIPC from a users point of view and thus, my information could be incorrect or outdated due to FSUIPC version upgrades].

Okay, so now let's move on. This is taken from Peter Dowson's user guide on FSUIPC:

"It seems some folks are rather confused about what this means, so I should emphasise here that Flight Simulator Panels (including their Gauges), Aircraft, Scenery and other graphics, and pretty much everything else within Flight Simulator, are mostly NOT correctable or influenced in any way by FSUIPC. Apart from some assistance in providing weather data to adventures (pre-FS2004), making adjustments in the weather itself, providing A.I. Traffic data and enabling better access to some engine variables for some Gauges, FSUIPC can only help external applications talk to FS, nothing more."

The last sentence says it all. That FSUIPC is an interlink between FS and the external programs. So, an I/O hardware card, let's use FDS SYS1 card as an example for the external. Then FSUIPC is the middleman; where as the FS is the internal on the other end. Now FDS SYS1 is what you have for the swicthes, buttons, rotaries and etc to be connected as inputs, and then the LED's are connected as outputs.

When you setup a switch for example to turn on the landing lights of an aircraft in FS. You first wire the switch to the input of the card and that card has its own software (called InterfaceIT). You choose the numbered input for where that switched is connected to on the card, and then in the software menu (called InterfaceIT) you would select the FSUIPC offset number. Where do you get that number from; well there are different ways, like with InterfaceIT the offset might be in a drop-down list that you select from and it has the name of what it does next to it.

For example, you would use Lights offset 0D0C Size 2, now in that offset it's a byte offset, and it has 0-9 bits that represent different aircraft lights under this offset. So, it would look like this:
0 Navigation
1 Beacon
2 Landing
3 Taxi
4 Strobes
5 Instruments
6 Recognition
7 Wing
8 Logo
9 Cabin

Thus, you would have the offset of 0D0C Size 2 selected for the offset name and size, and then you put bit 2 (this is for landing lights) in the bit section. You would select the "set bit" (meaning turing it on) for the up of the switch and then set the down of the switch as "clear bit" for turning off. This in turn tells the FSUIPC to tell FS to switch the landing light on or off.

I've only described one tiny aspect of this and there are many, many more. Here is another example: You have a CH joystick setup and through FSUIPC and the buttons and switches tab, you plan to set one of the buttons to make a keyboard press for you. In this case, you would go into the FSUIPC drop down from within FS9/FSX and goto the buttons and switches tab. Here you select a button on the joystick and push it, FSUIPC identifies the button (or see's it), you then tell FSUIPC what you want that button to do when pressed, or released if you prefer (at this time you press the Caps Lock key and then select "set"). Now, that makes this button a push to talk (PTT) button and for it to work in multiplayer while flying in FSX and Gamespy world, since Caps Lock Key is whats used.

Normally, you would press and hold Caps Lock key to transmit across the com freq. you have set in the radio panel for multiplayer in gamespy. You then release the Caps Lock key to release or clear (no longer talk) within gamespy. Well, in this case (like above), I would set this button in FSUIPC button and switches tab to do a keypress for me. Thus, it is acting like my finger pressing the Caps Lock key for me, when I only press the button on the joystick. Because FSUIPC already knows how to handle key pressing, I don't have to find the offset from the offsets list, nor find out if it's a byte or find the right bit or anything.

It sounds complex, but its really simple. There are so many aspects of this I haven't even discovered yet, but because it gets easier as I go, I am learning you can do so much more. And, for things like key presses from a joystick that is connected directly to the computer that FS9/FSX and FSUIPC are on, it's even easier. That is because FSUIPC sees these joysticks w/axis, buttons and etc through FS and Windows.

Don't be fooled by that though and think FSUIPC is only easier for direct connects and harder for external items. Really, FSUIPC is easy to work with for either the external software and hardware aspects or the direct connects, but it just takes a little more time on the users part to understand the externals.

I know there are a lot more details I am not providing, in fact I am just trying to give you idea. Really, you need to sit down and read the user manual first, and then you can look at the Advance FSUIPC stuff, and finally goto the FSUIPC SDK to really get your hands into the nitty gritty of programming-for programmers! Don't skip straight to the nitty gritty first because you need to understand this from a users prospective before writing your own software/hardware with pics and then planning to incorporate FSUIPC.

Do what most of us have done; print out the manual and find a good chair to relax in and read all 50 pages or so of that user manual, and then go from there. You'll discover a lot more then I can tell you here. You're not lacking in anything with FSUIPC or Windows, you just need to step back from the computer, read the manual, then come back to the computer. It'll all make sense after this point...

There is a part in the user guide that you'll find very interesting...WideFS! With WideFS and FSUIPC together it's crazy how much can really be done! Thank you Peter Dowson!!!!

John

By the way, you can find the user manual here (please check the version it might be the current or previous manual):

http://www.flypfc.com/downloads/FSUIPC%20User%20Guide.pdf

Here are some of the Offsets that are used by Project Magenta

http://www.projectmagenta.com/resources/FSUIPCOffsets.html

Here is the link to the SDK and FSUIPC Offsets:

http://www.schiratti.com/files/dowson/FSUIPC_SDK.zip?timestamp=010309

Mike.Powell
09-24-2010, 11:00 AM
FSUIPC is an interprocess communications module that runs in the Flight Simulator process space. In the earliest versions, back in the days of FS5, an offset was an index into the shared memory space used by Flight Simulator. As Flight Simulator (and, I suspect, the software development tools used to code it) evolved, the allocation of memory for Flight Simulator variables became more and more fragmented. FSUIPC has evolved along with FS so while offsets no longer index into a simple heap of data memory, they still give that appearance.

pilotgil
09-24-2010, 08:46 PM
Mike, Thanks for the great info, Makes sense!

pilotgil
09-24-2010, 08:47 PM
John, Thank you. That was a great explanation. It is starting to make sense. Thank you.

blueskydriver
09-25-2010, 01:24 AM
Hey Gil,

You are most welcomed. Yes, Mike is right; FSUIPC was/is made to fill a void in FS. Although, FS has evolved over time, Peter Dowson with FSUIPC has evolved with it; especially, with FSX, Sim-Connect and Lua. Lua is a programming language that works for those special aspects of programming for FS. I plan to learn it in the future, but I'm still working on learning SIOC for OpenCockpits cards for now.

You can learn more about Lua here:

http://forums.simflight.com/viewtopic.php?f=54&t=73176

and here:

http://www.lua.org/about.html

On a different note, I understand that the KAP 140 as being a Autopilot unit and that you've been using it with a Cessna type aircraft sim. If it is your plan to continue to use it with this type of aircraft, I ask what model of the Cessna will it be, and is this Cessna an add-on or a default aircraft. The reasoning is to find out if the model is supporting the KAP 140 already? If it is, that makes things easier because you can use FSUIPC to push the buttons, turn the knobs and more.

If you're planning to make your own KAP 140, that can be done too. You could use a program like Panel Studio. However, isn't it shift-2 that brings up the KAP-140 in a Cessna? If not, I found this for you:

http://www.avsim.com/pages/1006/Gauges/Gauges.htm

You could use the KAP-140 that is part of the Friendly Panels FP Gauges Pack 1 package.

It can be purchased here:

http://www.fspilotshop.com/product_info.php?products_id=1114

For more information about KAP-140 Autopilots, go here:

Note- this is a powerpoint that opens in the browser, I found it to be safe to open.

http://www.flyingneutrons.com/documents/KAP140_Autopilot.ppt#256,1,KAP 140 Autopilot

Finally, to answer your questions about FSUIPC being used with this panel, it would be easy. You could use a small screen like a Playstation (PS) One screen or smaller LCD screen to place behind a panel with the KAP-140 style facing. You'd need some push buttons and a single or dual rotary. You could have Flightdeck Solutions (FDS) are a similar company to make button annunciators that look like the ones on the front of the KAP-140, and even have them make the panel as a back lit type panel. You could make this yourself if you have access to a laser engraver and plexi supplies.

The FSUIPC part would be used to work the panel in FS, so if you push HDG button on the KAP-140, the HDG info would show on the LCD screen behind the panel Or, if you turn the rotary you'd see info change on the KAP-140 LCD screen in relation to that turning. As for the I/O hardware cards, you could use FDS SYS cards or Opencockpits; I like FDS SYS cards because I don't have to learn SIOC any more than needed.

Additionally, if you can program your PIC to do more, then go at that, but you need a way for the hardware to be connected to the PIC, and the PIC software to talk to FSUIPC. In my opinion, I'd go with an FDS SYS card with Inputs and Outputs, and a card to handle the rotaries. A FDS-FC1 card could do that and also work as your joystick controller card. Opencockpits has the Encoders Card to handle rotaries and the Master card could do the Ins and Outs. Opencockpits is cheaper in price, but you might need to use SIOC.

If you have no problem learning that, then SIOC is great for programming. However, I just like FDS SYS cards because they're way easier, so that is why I'd suggest them first.

You can get more info about FDS and OpenCockpits here:

http://www.flightdecksolutions.com/list_products.php?id=22

http://www.opencockpits.com/index.php

Good luck with your adventures.

John

RojanTrojan
09-25-2010, 11:26 AM
Welcome to Mycockpit.org Gil. Great to have someone with such extensive experience in professional aircraft simulators.

Cheers

Rhydian

blueskydriver
09-25-2010, 07:30 PM
Gil,

It's amazing to talk about something and then that thing comes along really quick. In the classifieds someone posted this today, here:

http://www.mycockpit.org/mcpclass/for-sale/p612-pfc-430w-control-interface.html

This almost looks like your KAP-140. Not 100%, but the same idea is there about the buttons, rotaries, lcd screen and etc. I'm sure there are the I/O cards behind it that you don't see, as well as the software to interface with FSUIPC, or this is likely dedicated like GoFlight Software. Still, it's in line to what you have in mind...

One last thing, I apologize if my postings might sound as if I could be talking downwards. I am not thinking that at all, I just have a tendency to explain things a little more because I know there might be another person who is a similar boat as you, but they're further behind. So, maybe the longer explanations help them catch up.

As you've said, you can do this KAP-140 on your own, with own hardware and software coding and it's mainly understanding FSUIPC further, that you're looking to do. Thus, I'd say take a look at the FSUIPC Offsets lists that I put in the earlier post. The list really gives you a run down of the offsets.

You'll find this out pretty quick, that Peter Dowson has offset values that are common (meaning not belonging too anyone) and then there are offsets that are dedicated (in a sense) to developers/companies. That is why you see a Project Magenta offsets list.

Finally, I overlooked this, but Mike Powell posted here and yet I forgot about his book (sorry Mike). Please check out his book "Building Recreational Flight Simulators"-A Mike's Flight Deck Book. You can find more about here:

www.mikesflightdeckbooks.com

You'll find a lot of the answers that might help out on pages 541-563 "Interfacing with MSFS" chapter. Yet, the entire book has so much more information, you'll find it useful for just about every part of building and flying flight simulators.

Otherwise, some of the big Guru's of FSUIPC, who are programmers, and hang out on MYC, can jump in here to really help you dive in deeper...

Best Regards,

John

pilotgil
09-25-2010, 09:58 PM
Wow! Great information! Makes perfect sense! I spent the day reading and going through FSUIPC trying this and that....Heck, before the day was out I had the so-called Garmin 530ish looking GPS in FS humming with buttons and keys. I hijacked the GoFlight controls to test out how the "process" works and it was not hard at all.

Don't worry about the sound of words because there's lots to learn and with these few posts I have been able to make a significant investment in understanding the MSFS.

Heck, I no longer have to move windows all around during startup. Everything is exactly in the right place on startup. I have been moving windows around for years but NO MORE!

And now I have button and knob control over the GPS (just testing)!

Now my brain is swimming with ideas and my original Goflight module idea has been tossed! With what you have taught me and the eight hours I spent in the hot (it must have been a 100) hangar was well worth it!

Lots to learn! Thanks...

pilotgil
09-25-2010, 10:04 PM
Oh...yep I'm buying the book!

pilotgil
09-25-2010, 10:05 PM
Thanks...I appreciate the welcome!