April 17, 200521 yr I just managed to write a code in C++ which connects to FSUIPC and shows an OpenGL window with both a text string "Speed - 120" (if speed would be 120 kts in FS) and a needle rotating according (same as the needle in the default cessna).*proud of myself**G*
April 17, 200521 yr Lucky guy...I wish i knew c++...I once tried with the DirectX sdk... never been able to do anything :(
April 18, 200521 yr If you find Visual C++ and know some basic programming you could learn together with me. I can make it open source anytime :(
April 18, 200521 yr Philippe, I would be interested in learning C++ w/FSUIPC. I already did my part getting needle movement for oil PSI and IAS using VB6 codes. As matter of fact, I don't like VB6 and would want to convert it in C++ instead. How about establish fourm discussion on this site or elsewhere sharing some information about building something out of FSUIPC using C++ codes?
April 18, 200521 yr Sure thing :)All I am building now will be Open Source ;)As the topic sais I'm down to the virtual horizon now. Almost done. AND IT WORKS :D All I have to do now is add another few lines and edit the text.As a fact I was on my way back down to the NeHe site to check how I can increase font size ;)
April 18, 200521 yr Those who want to check the file or the source, drop me an e-mail:pvanagt AD skynet DOT beor preferably check here: http://wiki.varxec.net/OpenF50I'll dedicate a few pages on the wiki 'bout all this.http://users.skynet.be/porreke/Fokker50EASIOpenGL.jpg
April 19, 200521 yr see philipe, what did I tell you? ;)I'm happy you learned it so fast and already get these nice results.But the NeHe site was a great help, wasn't it
April 19, 200521 yr Ok, I'm stuck.I read something from fsuipc. I want to convert this to a binary value to be able to question each bit as a bool.How do I do this ?I find dec2bin code on the web but they end with a printf (which i don't need i think)
April 19, 200521 yr >I read something from fsuipc. I want to convert this to a>binary value to be able to question each bit as a bool.Luckily everything in your program is already binary so the conversion is easy ;-)Just test the bits with a mask, like this:int n = read from FSUIPC;if ((n & 1) != 0) {} // bit 0 is 1 (TRUE)if ((n & 2) != 0) {} // bit 1 is 1if ((n & 4) != 0) {} // bit 2 is 1... and so onSucces,Nicowww.nicokaan.nl
April 19, 200521 yr Then how come if I show that "n" as text on my window it becomes decimal ??I'll give your code a try and see what comes out. Perhaps it converts from Bin to Dec before it shows it as text ?
April 19, 200521 yr >Then how come if I show that "n" as text on my window it>becomes decimal ??Sorry Philip but in a computer program there are only bits...It depends on the coding what these bits represent, e.g. (signed or unsigned) integers in two's complement binary, characters in ascii code, floating point values, ...If you have an integer value in an 'int' (like the n) and you print that on your screen and you specify %d as format specifier it will be formatted as an integer text string, but the under-lying value in your program is still just a number of bits..Nicowww.nicokaan.nl
April 19, 200521 yr It seem to work. Tnx for the great tip.However I thought I would be able to make somthing off "3300" but it seems to be doing wierd things.I will be checking "0872" and "0870" tomorrow to see if those hold the data necesary to visualise the ILS and GS indicators.
Create an account or sign in to comment