June 21, 200520 yr Offset value 0898 or &H898 in VB for Engine1 N1 Gauges... it s states 0-16384 (100%) what does that factor up to? (add, subtract, mupltiply, or divide) I don't have clue according to FSUIPC offset table notes.For ex:I wroteDim N1 as long If FSUIPC_Read(&H898, VarPtr(N1),dwResult) Then If FSUIPC_Process(dwResult)Then End If End IfLblN1.Caption = Format (N1 ??? , " 0")If I don't factor up, I get strange result... so anyone with VB6 skills can you help?
June 21, 200520 yr I would take the value and divide by the 100% value (16384) then multiply by 100, giving you the N1% in a value from 0-100...Example:N1=1600 (after using the FSUIPC_Process)Dim N1Pct as VariantN1Pct = (N1/16384*100) & "%"Use N1Pct as a variant and append a "%" then put that value in the caption...that should get you started. Aaron
June 22, 200520 yr Thanks Aaron, one more thing...in order to make a better rendering on 2d graphic, it needs better frame rate. VB can only run 55ms 18 FPS. Is there a way to write code on increasing FPS or graphic acceleration in VB along with FSUIPC SDK structure? Let me know
June 22, 200520 yr unfortunately, not that I know of, hence the reason I learned OpenGL and C++. When I made the transition, I had already known a bit of basic C, so It wasn't like I was popping my cherry in programming a new language, but finding sources for C++ operation in OpenGL was a bit difficult.If you're interested, I could clear out some of my code and make a basic structure you could put your code into to get started in C++ OpenGL. If not, thats fine too. VB is much easier, but the performance stinks for gauges and such. I have 3 VB apps in my 737 software suite and they're all ones that are graphical user interfaces. In C++, making a GUI isn't as easy as click here, drag there, click on the control to start writing code for it.Let me know and good luck. Aaron
June 22, 200520 yr I can obviously see VB performace sucks at graphic rendering. Not unless there is intervial codes including to upgrade the rendering performace. You can see Pro MFD's graphical performace... Robert Prather wrote these code in VB. So apparently there is some type modules or classes that can help improving performace in rendering. I guess I will keep trying to find a way to get it worked, if not. I might as well, like it or not... have to do the "hard way" learning how to use openGL in C++ You can send me basic structure of c++/openGL to [email protected] or anyhow... I will keep that with me in case if I am unable to do anything in VB.
June 23, 200520 yr The thing about synoptics though is that the update rate is in the thousands of milliseconds. So every synoptic (except the engine page and flight control page), only update like once every three seconds. Then the graphical calculations from the engine and flight control pages can be coded to only calculate when the page is visible, freeing up frames while on other pages.For primary flight displays, which have to update many times per second, Open GL or Direct X are really the best ways to go. Software based rendering is just too slow to keep up with PFD/ND graphics.Robert
Create an account or sign in to comment