April 20, 200422 yr I want to output a signal to a serial port when the aircraft in flightgear is on the ground and moving.Now two ways ive thought of doing this 1. Output signal when altitude is <= 0 althoug i take it altitude is taken above sea level so this will not necessarily work.2. Output signal when FlightGear says aircraft is on ground. Unfortunately i cannot find in the vast amount of source code where flightgear stores this yes/no? and what varible flightgear stores it under?Any help or advice would be appreciated.
April 20, 200422 yr Each gear object has a separate "weight on wheels" boolean that you can use for this purpose. This is the trigger for the touchdown and ground rumble sounds, for example.Also, development questions like this one are more likely to be answered when sent to the [email protected] list. Not everyone reads the web forums regularly.
April 20, 200422 yr Cheers I will have a look and see what i can find. While im here i dont suppose anyone knows how i would just ouput a +5V signal to a specific pin on a serial port whilst the 'wow' flag is set to true?Im using microsoft visual C++ 5.0Many Thanks
April 22, 200422 yr >Cheers >>I will have a look and see what i can find. >>While im here i dont suppose anyone knows how i would just>ouput a +5V signal to a specific pin on a serial port whilst>the 'wow' flag is set to true?The Serial Port voltages won't work here. a logical '1' is usually between -5 to -15 Volts and a logical '0' corresponds to +5 to +15Volts.The parallel port would probably be more suitable.However, there might be some problems concerning rights to write to the port, depending on operating system, DLLs used and so on.There might also be another problem if you want to actually drive something (like eg. a Lamp or relay) from that port, It can provide only very few milliamps by itself.If you are interested in connecting more stuff to flightgear, have a look at http://cockpit.varxec.de/electronics/PHCC.htmlThis is a project I'm working on.Regards,Manuel
April 22, 200422 yr how would i go about outputting it to the parallel port then?i would be using msvc++any help appreciatedcheerswes
April 22, 200422 yr >how would i go about outputting it to the parallel port>then?>i would be using msvc++>>any help appreciatedsorry, I'm not a windows programmer. I only do Linux/Unix.The usual way this is done nowadays under windows is via a DLL.I've read about this only, never done it myself.there are a couple of DLLs out there that let you toggle bits on the parallel port. search via google for something like "parallel port DLL"Regards,Manuel
Create an account or sign in to comment