Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

C++ / OpenGL / Fsuipc / ...

Featured Replies

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*

Lucky guy...I wish i knew c++...I once tried with the DirectX sdk... never been able to do anything :(

Congrats, Philippe.Mikewww.mikesflightdeck.com

If you find Visual C++ and know some basic programming you could learn together with me. I can make it open source anytime :(

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?

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 ;)

I sent you e-mail

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

Absolutely unpossible to have done it without NeHe, for sure.

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)

>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.nl1704.png

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 ?

>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.nl1704.png

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.