Jump to content
The simFlight Network Forums

Cooper94

Members
  • Posts

    17
  • Joined

  • Last visited

Cooper94's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hey there I would like to know if it is possible to get the title of the aircraft that is loaded? I use the offset H3160 as of now but that only shows the ATC name, so is it possible to get the aircraft title? Thank you all for your help!
  2. Ok thank you for all of that information and do you know were I might be able to find an SDK of the FS9 multiplayer so that maybe I can connect it to an external program such as SB did? Thank you again for all the help!
  3. Is it possible to create a program like squawkbox using the FSUIPC interface? Thank You
  4. Ok I have researched more about how this all works but now I am getting another problem. I use the offset HB80 and this tells me how much fuel can be put into the left engine. But is there anyway to read what is in that engine say the capasicty is 2500 and its at 1500 how can I get that 1500? Thank you
  5. I am sorry that I missed that, is there any other way to find out the fuel on FS9? If not is there a way to read how much fuel there is in the plane at a certain point in time? Thank You
  6. Oh is there a fuel code for FS9 or no sir? That is most likly the reason why and I am sorry for that. Thank you
  7. I do thank you all for your help and patients but that sadly did not work below is the code to my whole program. Imports FSUIPC Public Class Form1 Private Const AppTitle As String = "PiREP Reporting System" Const Message As String = "Error 1222" Dim airSpeed As Offset(Of Integer) = New FSUIPC.Offset(Of Integer)(&H2BC) Dim touch As Offset(Of Integer) = New FSUIPC.Offset(Of Integer)(&H30C) Dim down As Offset(Of Integer) = New FSUIPC.Offset(Of Integer)(&H366) Private altitude As Offset(Of Long) = New FSUIPC.Offset(Of Long)(&H570) Dim Fuel As Offset(Of Single) = New FSUIPC.Offset(Of Single)(&H90C) Private Sub OpenFSUIPC() Try FSUIPCConnection.Open() Me.Timer1.Interval = 200 Me.Timer1.Enabled = True Catch ex As Exception MessageBox.Show(Message, AppTitle, MessageBoxButtons.OK, MessageBoxIcon.Error) End Try End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Button1.Enabled = False Button2.Enabled = False TextBox2.Enabled = False TextBox3.Enabled = False TextBox4.Enabled = False CheckBox1.Enabled = False ComboBox1.Enabled = False Label25.Enabled = False Label27.Enabled = False Timer2.Enabled = False TextBox3.CharacterCasing = CharacterCasing.Upper TextBox2.CharacterCasing = CharacterCasing.Upper OpenFSUIPC() End Sub Private Sub Form1_FormClosed(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles MyBase.FormClosed FSUIPCConnection.Close() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Starttime As String = TimeOfDay Timer2.Enabled = True Label13.Text = Starttime TextBox2.Enabled = False TextBox3.Enabled = False TextBox4.Enabled = False ComboBox1.Enabled = False Button1.Enabled = False End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click FSUIPCConnection.Close() End Sub Private Sub InformationToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles InformationToolStripMenuItem.Click MsgBox("Version 1.0 Created By Nicholas Cooper") End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click End End Sub Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click End End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Try FSUIPCConnection.Process() Dim deptime As String = TimeOfDay Dim airpeedKnots As Double = (airSpeed.Value / 128D) Me.Label15.Text = airpeedKnots.ToString("f1") Dim touchrate As Double = (touch.Value / 256.0) * 3.28084 * 60.0 Dim altFeet As Double altFeet = altitude.Value / (65536.0 * 65536.0) * 3.28084 altFeet = Math.Round(altFeet, 0) Label18.Text = altFeet Dim fuelleft As Single = (Fuel.Value) Label26.Text = fuelleft.ToString("f1") If airpeedKnots >= "60" Then Label16.Text = "In-Flight" Else Label16.Text = "On-Ground" End If If airpeedKnots <= "10" And Label23.Text = "3" Then Label27.Enabled = True Label25.Enabled = True Label27.Text = touchrate.ToString("f1") End If Catch exFSUIPC As FSUIPCException If exFSUIPC.FSUIPCErrorCode = FSUIPCError.FSUIPC_ERR_SENDMSG Then FSUIPCConnection.Close() MessageBox.Show("The connection to Flight Sim has been lost.", AppTitle, MessageBoxButtons.OK, MessageBoxIcon.Exclamation) End End If Catch ex As Exception End Try End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Button1.Enabled = True Button2.Enabled = True TextBox2.Enabled = True TextBox3.Enabled = True TextBox4.Enabled = True CheckBox1.Enabled = True ComboBox1.Enabled = True Button3.Enabled = False Button4.Enabled = False TextBox7.Enabled = False TextBox8.Enabled = False End Sub Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick Label20.Text = Val(Label20.Text) + Val(1) If Label20.Text = 360 Then Label23.Text = Val(Label23.Text) + Val(1) Label20.Text = Val(0) End If If Label23.Text = 10 Then Label21.Text = Val(Label21.Text) + Val(1) Label23.Text = Val(0) End If If Label20.Text = 1 Then Dim flthrs As String flthrs = Label21.Text + "." + Label19.Text End If End Sub Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged If CheckBox1.Checked Then Label17.Text = "Yes" Else Label17.Text = "No" End If End Sub End Class I thank you all once again for all you help!
  8. Ok this is my code: Dim Fuel As Offset(Of Integer) = New FSUIPC.Offset(Of Integer)(&H90C) Dim fuelleft As Double = (Fuel.Value) Label26.Text = fuelleft.ToString("f1") The H90C is the offset 090C in the SDK manual, it recieves fuel from the left engine and how much is used from the start of the flight. I havnt got it to work but I hope this code will help you guys understand a little bit more as to what I am looking to do. Thank You P.S- I know VB very well just I have been trying to get fuel total for a long time and I couldnt get it so I seeked help. Thank you again.
  9. I really dont understand the offsets to be honest, such as BXXX but and in VB it is HXXX. So if you could help me out that would be great!
  10. I am coding it in VB 8 and yes I am trying to read te fuel.
  11. I am trying to now calculate fuel from the aircraft. I would like it to add the fuel from start to finish from both engines. I have scene it in the sdk but I dont know how to use the offsets properly. Any help would be greatly aperciated. Thank You
  12. Here is some code but it never worked: Dim landed As Offset(Of Integer) = New FSUIPC.Offset(Of Integer)(&H814) ' Basic integer read example Dim landed As Double If landed = "1" Then Me.TextBox5.Text = touchrate.ToString("f1") End If
  13. I thank you for the help It works great I am sorry cant help but ask is there anyway to make my program know that the aircraft has landed so my program can do things such as If landed = 1 Then label1.text = landingrate End If
  14. I would like to thank you for that information and also one more thing I see that the altitude has alot of numbers after the "." is there anyway to make that not appear? Thank You So MUCH
×
×
  • 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.