Jump to content
The simFlight Network Forums

thomsany

Members
  • Posts

    19
  • Joined

  • Last visited

Posts posted by thomsany

  1. Pete,

    Is not that I am ignoring you, I wasn't understanding you. When I read the explanations on the word document, it was kind of confusing and since you work with C its a bit hard to understand the different variables etc.

    Anyways, I got it to work :)

    Finally hahaha When Jeff posted the VB example it was easier for some reason.

    Thanks much Pete and Jeff!!!

    Teo

  2. Hi Peter,

    I am still having issues with the Altitude value.. for some reason I did the following...

    Requesting both Offsets and getting them as Int 64bit and saving each to a variable called groundaltinputa and groundaltinputb.

    Dim groundaltinputa As Offset(Of UInt64) = New FSUIPC.Offset(Of UInt64)(&H574)

    Dim groundaltinputb As Offset(Of UInt64) = New FSUIPC.Offset(Of UInt64)(&H570)

    After that, I am doing the following:

    Dim groundalta As Double= CDbl(groundaltinputa.Value) 'Converting to double

    Dim groundaltb As String = CDbl(groundaltinputb.Value) / (65536.0 * 65536.0) Converting second value from 0570 to Double and applying formula.

    Now here is where I am having issues. I have both values but how do I put them together to make up the altitude.

    I have the first value from 0574 and the second from 0570.

    Here is where I'm stuck.

    I hope this might give you a better view of my issue.

    I already have the Lat/Long working, the Groundspeed and the UTC time which is great. I am missing this one.

    Thanks for everything, I know your time is valuable.

    Regards,

    Teo

  3. OK just did a search and found out that my compiler does allow 64bit Integer, its called UInt64 in VB for reference.

    So basically, I take out the Integer value out of it and append the 8 bits of the lower part and divide it by the numbers you have. I will try that, sorry for all the confusion, I am starting to get things now.

    I am doing this software on the side and I am not a full time programmer, and yeah, I don't know that much either :P

    But thanks so much for your help, its really appreciated!

  4. Single is a float in VB. Its A floating-point (decimal) positive or negative number with a value in the range of up to 3.402823E38 (scientific notation).

    Double is the same, double A floating-point (decimal) positive or negative number with a value in the range of up to 1.79769313486232E308.

    The only one I can't find is fractional. I don't know what type of variable that is.

    I am looking at the logs but to be frankly I am not that familiar looking at Hex entries.

    Any suggestions on what the fractional type of value might be.

    I don't see that in my variable types in VB. How many bits?

    Regards,

    Teo

  5. Hi Pete,

    Sorry, I'm very confused on the types of variables I should use for each reading.

    For example, for 32bit altitude reading, I used a variable of type Single. Also for the fractional part.

    Its my first time working with your software for developing and I am having a hard time know which variable type to use for example, 32bit integer, long long 64 bit, etc. I get confused on which type of variable I should use for each one. Now that I

    I believe that's my main problem, not the documentation.

    I will try to solve it on my own.

    Regards,

    Teo

  6. Yeah I will have to use the search function to look things up, lots of stuff going on in there hahaha :)

    Sorry I keep bothering you so much :roll:

    Anyways, ok, I did some testing by setting the values for the altitude from 0574 to a Long value (8bit) and displaying it, however I am getting a loooong number in negative -1170756313435. I don't know how to interpret this to convert it to a normal altitude value. In the documentation you don't specify if I have to divide it or multiply it by something to get the value. For example the value I am showing you is for 432MSL of altitude. Is there a number I need to multiply, divide or convert?

    Once again, sorry for hassling you so much. I just want to understand how to do things so I can move on with the application. As soon as I have it ready, I want you to try it, and let me know :)

    Regards,

    Teo

  7. Ok great, I was thinking on that as well. Its better than loops.

    Other than that, I am getting somewhere reading your documentation. Its very helpful :)

    The only problem I am having right now is when I import the Ground Altitude from Offset H020. I get the value and divide it by 256 to get the Metres value. For some reason the value is not accurate at all.

    Here is my declaration and my conversion to the variable so that I can display it in the label inside VB.

    Dim groundaltinput As Offset(Of Integer) = New FSUIPC.Offset(Of Integer)(&H20)

    FSUIPCConnection.Process()

    Dim groundalt As Integer = (groundaltinput.Value / 256) * 3.28

    lblaltitude.Text = groundalt.ToString

    For some reason I am at 3000 feet and the output is 385. Very strange.

    Basically I am taking the value, converting it to meters by dividing it by 256 and then multiplying the result by 3.28 to get the altitude in Feet.

    Do you see an error on my code?

    Regards,

    Teo

  8. Hi Pete,

    Just a quick question.

    How can I do so that my data from the Process() function can return new values every 1 second?

    I am looking into Loops but I don't see how I can use it to spit out the refreshed values from the FSUIPC module.

    Any suggestions?

    Here is what I have:

    FSUIPCConnection.Process()

    Dim groundspeedKnots As Integer = groundspeed.Value / 65536D

    Dim groundalt As Integer = (groundaltinput.Value / 256) * 3.28

    Dim zulutimehour As String = zulutimehourinput.ToString

    Dim zulutimemin As String = zulutimemininput.ToString

    'Asigno valores a los labels

    lblgroundspeed.Text = groundspeedKnots.ToString

    lblaltitude.Text = groundalt.ToString

  9. The problem is that I am building the ACARS program to interfase with FSUIPC 3.51 and above. I would just need the string, not the actual weather handling parameters.

    Just so I can give the user on request the METAR text string.

    Is there a way to do this without SimConnect?

    Thanks much,

    Teo

  10. Hi!!!

    I am doing some testing on getting information out of FS9 using the FSUIPC module.

    I got most of the stuff I need, but I have just one more thing that I need.

    Is there a way I can get the active airport the airplane is parked at?

    Also the active airport where the airplane is once it lands?

    Is there a way to do this? Which would be the HEX code for it?

    Thanks much in advance,

    Teo

×
×
  • 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.