Jump to content
The simFlight Network Forums

High-Octane

Members
  • Posts

    72
  • Joined

  • Last visited

Everything posted by High-Octane

  1. Pete, I am doing FSUIPC_Write on Offset 0AF8 Fuel Tank Select and I notice something unusual when succed writing. 0AF8-- 0=Off------------------->FSI shows = 0 1=All-------------------->FSI shows = 1 2=Left------------------->FSI shows = 14 3=Right------------------>FSI Shows = 3 4=LeftAux---------------->FSI Show = 4 5=RightAux--------------->FSI Show = 5 6=Center------------------>FSI Shows = 6 7=Centre2----------------->FSI Shows = 7 8=Centre3----------------->FSI Shows = 8 9=Ext1--------------------->FSI Shows = 9 10=Ext2-------------------->FSI Shows = 10 11=RtTip------------------->FSI Shows = 11 12=LftTip------------------->FSI Shows = 12 13= ?----------------------->FSI Shows = 13 14=CrossFeed Left to Right---->FSI Shows = 14 15=CrossFeed Right to Left----->FSI Shows = 15 16=?-------------------------------> FSI Shows = 16 17=?------------------------------->FSI Shows = 17 (Max) As for Number 2-Left... I get 14, which is for crossfeed.. I tried to find 2 but couldn't I am flying 2002 and I haven't tried 2004. So let me know what's wrong
  2. Interesting Theory Pete, I got this working now.... I created two VB button, one for increasing and other one for decreasing fuel, At that time, I simply click it at both ways and they either dump or increases fuel by 10 pounds on every button clicks. Now I am working on VB "doevent" function (loop) and see if I could get it to lose few pound automatically following by clock ticks as if I engages fuel jettison. Your theory really helps. Thanks
  3. I evidently don't understand VB at all. What is actually setting or changing Perhaps, I got really confused. Seem like I got myself in mess.. I have suceed getting my application to Read Fuel Capacity, Lbs, and Percentage. But Unable to clarify the logic in writing them. Actually it's my first time doing this Say, if you were me... You use C ?? (I assume thats the programming language you are familar with) and you wanted to increase or decrease fuel % for center tank. How would you implement it? with calculation of Fuel Level and Capacity? Let me know Arthur
  4. Apparently, I must mistype it, I type the whole thing in this previous post instead copying it out of VB appl... So, 'setLFuelPct' correct ....
  5. I created application that has two command button and a label.... One command button is to increase value and other command button is to decrease value. Using FSUIPC write...so here's code snippet. Private Sub Increase_Click() Lfuelval 1 End Sub Private Sub Decrease_Click() Lfuelval -1 End Sub Private Sub Lfuelval(ByVal argNum As Long) Dim dwresult As Long Dim setLfuelPct As Long Dim Value Call FSUIPC_Write(&HB7C, 4, VarPtr(setLfuel), dwresult) Call FSUIPC_Process(dwresult) setLfuelPct = Val(100) + argNum / 8372890 * (128 * 63556) LFuelPct.Caption = Val(LFuelPct.Caption) + argNum End Sub It did not work, what did I do wrong?? if you can help I'd be appreicated.[/b]
  6. Well if you could... run FS, select jetliner aircraft such as 737, 747, or 777, select fuel from the aircraft menu. Then you would notice pounds of these three tanks (L+C+R). That's what I'm trying to figure out getting exact same thing into my VB appl. So would offset 0B98-Cap Gallon, 0B94 Level, or reverse from my best memory (don't have offset table with me at work) change too based on different altitude? Uh-Oh that's going to be complicated... :? but I believe I would figure out somehow.
  7. Pete... with offset 0AF4 -- Fuel weight... I assume it adds up total fuel weight for aircraft... In FSInterrogate It shows #/256 lbs/gal, a 1715 as buffer and factored up 6.69922. Now I am trying to get exactly fuel weight for Left, Center and Right tank, how could I calculate it? Would I have to calculate it with L+C+R Fuel Cap Gal, Level? Let me know
  8. Yes, I have seen several fuel offsetzs, but never thought they can be used as refueling... Oh, sound good.. I will give it a try, Never tried FS_Write in VB before... How about Fuel Jettison? wouldn't that occur only in specific aircraft types?
  9. Are there any offset on Refueling aircraft? I went through Offset Table and FSInterrogate, couldn't find any. I recall someone did use offset on refueling back then on this forum. Anyone?
  10. efratomer That's only solution... otherwise we can't really help by giving the exact you need.
  11. efratomer, Without looking at FSInterrogate, this is where you get value wrong. For example You wrote: Dim dwResult As Long Dim GndAlt As Integer Private Sub Timer1_Timer() GndAlt = 0 If FSUIPC_Read(&HB4C, 2, VarPtr(GndAlt), dwResult) Then If FSUIPC_Process(dwResult) Then Label1.Caption = "Altitude: " & GndAlt End If End If End Sub GndAlt = 0 will always stay 0 because you set to 0, otherword it does nothing but stay 0. Now try this code... Dim dwResult As Long Dim GndAlt As Integer Private Sub Timer1_Timer() If FSUIPC_Read(&HB4C, 2, VarPtr(GndAlt), dwResult) Then If FSUIPC_Process(dwResult) Then GndAlt = 3.28084/ 256 Label1.Caption = Format(GndAlt,"Altitude: 000") End If End If End Sub How do I know? Well it's in FSInterrogate, showing how to write equation for offset value. I know it sound complicated for beginner., I have been there. Without FSI none of programmer would have got it worked. My strong advice to you... Play around with it, click on everything but dont save it, learn it, make it useful and you will understand it. I promise you, you would feel it's worth it. :wink:
  12. Okay :) Will keep on reading, reading and reading. Will try to play around and anaylize and find some crucial information on offsets. Thanks
  13. Yeah Pete, Sometime I wish there is easy way for you to hack some variables in FS, so that way everyone can entitle to use so many varible that FS uses for their 3rd party or written program. Perhaps next version could be better for you :wink: I have recongise some of variable listed in FS interrogation has already declared offset but FSUIPC does not support it. I was curious to know why?
  14. Hi Pete I was hoping there are offset that can get aircraft doors such as enterance/exit. cargo or perhaps engine doors. There are some type of addon aircraft that include it, and it can be found under FS2002 or higher command control "select exit" or wing fold/unfold. Let me know
  15. Correct Pete... VB doesn't support unsigned, But it can be converted. For example when come across operation, HiWords or LoWord in C . VB would have to strip out the high bit and add it back again later to avoid overflows and misleading results. I have seen it and its so far complicated than I thought. Assume, MS designed VB for Basic Programmers who doesn't have much knowledge in advance type of operations. It's supported :wink: You declare As Byte in VB. Of course because Bytes equals to 8 bits :D No Idea, In VB6 I don't think there is any compiler option... you just complie it once and if it detects error it will acknowledge you rather its declaration arguement or math operations is not properly converted. That would avoid from system crash, this is probably another reason why unsigned is not supported.
  16. Hope I can help a little: Integer...... 2 bytes, 16 bits Long.......... 4 bytes, 32 bits Single........ 4 bytes, 32 bits Double....... 8 bytes, 64 bits Currency....8 bytes, 64 bits Note: (got info from my programmer friend) There is a REALLY BIG difference between double and currency in VB, although they are both 64bit. Double is a floating point number stored as M*2^E which can store number as high as 1.7*10^308. The tradeoff is that looses precision because it has a limited number of bits (something around 50) so it has limited number of decimal places so adding 1.0 to 1.0E+30 will give you 1E+30 again. The currency type is a fixed-point type that always has 4 decimal places. It has no exponent etc, it's a integer value where the last 4 places are considered decimal. It has the range 922337203685477.5808 and is used for financial operations. It is better suited for calculations for no rounding occurs in this case. Hope that helps
  17. Double in VB About formula, Honestly.. I don't know why.. and it came from no where I just thought I had hunch... I have always read SDK programmer guide... I absoutely have no problem reading it. Just until I encountered with situation on FLOAT (never had it calculated before), that confused me knowing what is need to be declared in VB compared to C++. Now I have learned something about it after going through lot of search engines. Yeah, I realize that now.... after what yousaid I changed code around a bit. Dim Eng1FF as Double (not currency) Dim Eng1FFNum as Variant (Not Double) Eng1FFNum = Eng1FF / 1000 And it's working now... :D For the fact, I couldn't reject of using FSInterrogate, I find its very useful. But when it comes to field description.. there isn't much information on factoring up with float, that's where i got stuck. Just until I click read buffer and looked up at 'FLOAT64' and it show value of 10.##### so that's when I figured that it should be divied up to 1000 for jetliner Fuel Flow. Sometimes things don't come in sense at first just until then it does.
  18. How about VB/VB.Net for VB user on upcoming version on FSI? We, sometimes sure can get confused on variable type if mostly applied for C/C++ let me know.
  19. Pete, I know you re not expert in VB6 but assumedly you could help me understand FLOAT 64. VB Gurus help me if you can.... With offset 0918, bit 8 Engine 1 Fuel Flow PPH obviously tell that I need to convert it to FAKE 64.. so here what I did, following attempt from FSUIPC VB SDK docs and it didn't work... I am not sure I know how it should be factored up. Dim Eng1FF64 As Currency ' Fake64 Dim Eng1FFnum As Double Call FSUIPC_Read(&H918, 8, VarPtr(Eng1FF64), dwResult) Call FSUIPC_Process(dwResult) Eng1FFNum = Eng1FF64 * 10000# 'so it can be converted Eng1FFNum = Eng1FFNum / (10001750# * 65536# * 65536#) End Sub I get a real strange number... I was expected to see ##.# in result, can anyone tell me if I factored up wrong for fuel flow or anything?
  20. Pete, Very interesting.... Thanks for extra information on hydraulic stuffs 737 fan aren't you? :D Right, I wouldn't bother adding pressure...I didn't realize there are multiple hydraulic working separately in one aircraft. I always though one hydraulic for all parts such as engine, flap, landing gear and etc. And I realize it would be silly if they actually does that. I guess it's something that I learned today, the new information for me. Actually, What I was going to do is adding hydraulic status in my application (VB) Nothing complicated, just adding label "Hyd sys press" stating the hydraulic system pressure is on. And whenever it needs to be off the label would simply disappear. And at this point I am not sure when hydraulic will ever stop running. Just one question... does engine hydraulic system constantly running when engine is on? How about does it keep running when pilot is starting up engines at subsequent procedure? "Apu, fuel flow and etc..."
  21. Offset 08D8 (engine1) 0970 (engine2) obviously its both engine hydraulic pressure. But I am looking for Hydraulic System Pressure offset? Aren't there any of it listed in offset table? because I couldn't find one. My understanding, it has something to with entire aircraft hydraulic such as flaps, landing gears, brake, and etc.... And I am not sure if FS include that Let me know
  22. Pete, that makes sense.... My FS quality doesn't fit with my laptop's video driver(8mb)Perhaps that what's probably cause shutter. I should try it on a faster computer and see what effect it has take so I could determine the best for my software that I create. Thanks for the input, duly noted now. :wink:
  23. Nah don't bother... I have tons of to VB fourm link address... Its good places to visit... but UNFORTUNATELY, no one in this forum write VB/FSUIPC program for VB that'd make it harder to explain them. This is why I posted one here.
  24. No, I m just using me.line and me.circle function in vb.. I do know obtaining .jpg, .bmp or other graphic would generate much slower. I find its funny, when I test the line, circle function using scrollbar function, it goes smooth... but when getting replacing scrollbar into timer control it get slower, a little glitch at that point. I thought perhaps it has to be timer because of it take a while for MSFS to send data through FSUIPC ,then VB platform. and when generate a picture "autoredaw" it delays more causing a glitch. Have you ever use API such as directX? this may be much solution for it.
  25. I am create 2D graphic on VB platform, off from FSUIPC offset... they render O.K., kind of shutters. I would want to have it in smooth effects, but I realize that VB timer controls limit to 55ms (18FPS). So does anyone face same situation, and improve fps? does anybody have code that can make a better fps in VB and work out okay under FSUIPC structure (.BAS)module? If so, let me know.... :wink:
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.