carlosuc99
-
Posts
21 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Downloads
Posts posted by carlosuc99
-
-
Yeah!! I fix the problem. Thanks for all!
-
I have another problem now. I only get the position at the start and the current position. But, I take-off and I return to the same airport. I have a problem because the position at the start and the current are near and it only shows me that I flown, for example, only 0.23NM but It´s false.
I think I can fix this problem resetting the position in the timer1, and plus it than the value of the FlownTextBox. I test a lot of forms to this but doesn´t work.
Paul, Do you have an idea to do this?
-
Thank you, Paul. It works fun!
-
Ok, I read the User Guide. But, I have a problem. I want to calculate the distance flown from the start position (position when I connect with the simulator) to current position.
I tryed it:
Public Class MainForm
'Some Code
Dim StartPoint As FsLatLonPoint
' Initialise some of the variables we will need later
Public Sub New()
InitializeComponent()
Dim StartLat As FsLatitude = New FsLatitude(Latitude.Value)
Dim StartLon As FsLongitude = New FsLongitude(Longitude.Value)
StartPoint = New FsLatLonPoint(StartLat, StartLon)
End Sub
[/CODE]And in the timer this:
[CODE]
Dim Lat As FsLatitude = New FsLatitude(Latitude.Value)
Dim Lon As FsLongitude = New FsLongitude(Longitude.Value)
Dim Lat2 As Double = (Latitude.Value * 90.0 / (10001750.0 * 65536.0 * 65536.0))
Me.LatitudeBox.Text = Lat.ToString()
Me.LongitudeBox.Text = Lon.ToString()
'Distance Flown
Dim CurrentPosition As FsLatLonPoint = New FsLatLonPoint(Lat, Lon)
Dim distance As Double = 0
Select Case (Me.FlownUnitsCombo.Text)
Case "Nautical Miles"
distance = CurrentPosition.DistanceFromInNauticalMiles(StartPoint)
Case "Statute Miles"
distance = CurrentPosition.DistanceFromInFeet(StartPoint) / 5280D
Case "Kilometres"
distance = StartPoint.DistanceFromInMetres(CurrentPosition) / 1000D
End Select
Me.FlownBox.Text = distance.ToString("N2")
[/CODE]But, the result is my current postion to 0 postion. Because don´t read
[CODE]Latitude.Value[/CODE]at the StartLatitude and
[CODE]Longitude.Value[/CODE]at the StartLogintude. But, I replace that for the cordinates like EGLL in the VB EXAMPLE. Works but it shows me the distance to heatrow and not the distance flown, logical.
-
OK, that wasn't clear.
I don't think your aircraft appears in the AI Traffic tables in FSUIPC. I can't check at the moment, Pete do you know?
Paul
Read the first message of Paul. But If it don´t work, How FSAcars, FSFK... Can Put the Flight Status? (Boarding, Taxing, Departing...)
-
Can you please explain again what information you want because I think we're talking about different things.
I only want the state of my aircraft (Departing, Landing, EnRoute...)
-
Getting AI Traffic information is not as simple as declaring an offset. As I said, you should use the AI Traffic facilities provided by my DLL. You don't need to declare any offsets, the DLL does all the hard work for you.
To give you an idea of how difficult it is, the DLL contains about 900 lines of code to handle the AI Traffic. I'm sure you don't want to replicate all that, and I don't want to explain it all.
Just read from page 22 in the UserGuide.pdf and see how it's done and use what I've given you. All the correct code can be seen there (there is no point in my pasting it in here). I'm not sure you've even looked.
Paul
I read it.
I need to put the it:
Private Sub readAI()
FSUIPCConnection.AITrafficServices.RefreshAITrafficInformation()
this.listBox1.Items.Clear()
For Each Plane As AIPlaneInfo In FSUIPCConnection.AITrafficServices.AllTraffic
Me.listBox1.Items.Add(Plane.ATCIdentifier & " (" & Plane.State.ToString() & ")")
End Sub
[/CODE]I need to put in the timer. It is correct? Where I need to put the name of TextBox that it will be contains the state? I need to change listBox1 to the Text Box that it will be contains the state?
-
Thanks Paul, I´m trying do this like the Aircraft Type. It is correct?
No, it not works. I tryed with this:
Dim TCASData As Offset(Of String) = New FSUIPC.Offset(Of String)(&HE080, 37)
[/CODE]and:
[CODE]
Me.FlownBoxNm.Text = TCASData.Value
[/CODE]Why?? Can you put the code correct or say me the error?
-
Thanks Paul, I´m trying do this like the Aircraft Type. It is correct?
-
Hi,
I´m using VB .NET and the Offset E080 to give me the flight status.
I use it:
Dim TCASData As Offset(Of BitArray) = New FSUIPC.Offset(Of BitArray)(&HE080, 37)
[/CODE]And in the timer:
[CODE]
Me.FlightStatusTextBox.Text = TCASData.Value(37)
[/CODE] -
Hi,
I use VB.NET How Can I obtain the distance flown? For expample. I take-off from Heatrow and I land at Chicago O`Hare. I want to obtain the distance flown in the flight. But I want to see the always the distance flown, not only when I arrival. If I am in the middle of the Atlantic I want to see the distance flown too. I want to see the distance flown anywhere. I don´t found any offset to do this.
-
Thanks Paul, You´re a crack!! I only change one thing:
Dim Message as String = IIF(currentParkBrakes, "Parking brake ON", "Parking Brake OFF")
[/CODE][CODE]
Dim Message as String += IIF(currentParkBrakes, "Parking brake ON", "Parking Brake OFF")
[/CODE]I want a blackbox!! Thanks!!
-
Hi,
Paul or anybody. Can you put an example table in VB .NET with the report of parking brakes? For any time that I put the parking brakes creates a line in the table with a colum: Like Name: Parking Brakes SET.
If you can´t don´t worry. I know How can I creat a table but I don´t know how can I insert the action of FSUIPC and put a correct while. Because I don´t know the times it need to run.
PD: I´m thinking do it with a rich textbox. I think is easier. How Can I put the dates here? With a while?
-
I fin it:
3366
1
This byte reflects the FS2004 ―Engine on Fire‖ flags. I‘m not sure if FS actually simulates such events, but it appears to have allocated Gauge-accessible variables to indicate them. This byte uses bits 2^0–2^3 as flags for fires in Engines 1 to 4, respectively.
Ok-SimC
Ok-SimC
But, I don´t know How I can used in .NET? I don´t know If I need 1 to set fire in engine 1 or anything? Anybody can put an example?
-
Are there any offsets to engine fire for FSX?
-
Commands? The FSUIPC interface is the same no matter whcich offsets you want to handle. If by "commands" you mean "offsets", then the list is provided in documents (one for FS9 and before, one for FSUIPC4 and FSx) within the FSUIPC SDK.
I'm afraid I cannot help specifically with VB.NET, but you might do well looking in the Download Links subforum, in the thread FSUIPC Client DLL for .NET - Version 2.0.
Regards
Pete
Ok, I find the offsets in the VB .NET document. It load the offsets like this:
' Register the Offsets we're interesing in for this application
Dim airSpeed As Offset(Of Integer) = New FSUIPC.Offset(Of Integer)(&H2BC) ' Basic integer read example
Dim avionics As Offset(Of Integer) = New FSUIPC.Offset(Of Integer)(&H2E80) ' Basic integer read and write example
Dim fsLocalDateTime As Offset(Of Byte()) = New FSUIPC.Offset(Of Byte())(&H238, 10) ' Example of reading an arbitary set of bytes.
Dim aircraftType As Offset(Of String) = New FSUIPC.Offset(Of String)("AircraftInfo", &H3160, 24) ' Example of string and use of a group
Dim lights As Offset(Of BitArray) = New FSUIPC.Offset(Of BitArray)(&HD0C, 2) ' Example of BitArray used to manage a bit field type offset.
Dim compass As Offset(Of Double) = New FSUIPC.Offset(Of Double)(&H2CC) ' Example for disconnecting/reconnecting
Dim pause As Offset(Of Short) = New FSUIPC.Offset(Of Short)(&H262, True) ' Example of a write only offset.
Dim com2bcd As Offset(Of Short) = New FSUIPC.Offset(Of Short)(&H3118) ' Example of reading a frequency coded in Binary Coded Decimal
Dim playerLatitude As Offset(Of Long) = New Offset(Of Long)(&H560) ' Offset for Lat/Lon features
Dim playerLongitude As Offset(Of Long) = New Offset(Of Long)(&H568) ' Offset for Lat/Lon features
Dim onGround As Offset(Of Short) = New Offset(Of Short)(&H366) ' Offset for Lat/Lon features
Dim magVar As Offset(Of Short) = New Offset(Of Short)(&H2A0) ' Offset for Lat/Lon features
Dim playerHeadingTrue As Offset(Of UInteger) = New Offset(Of UInteger)(&H580) ' Offset for moving the plane
Dim playerAltitude As Offset(Of Long) = New Offset(Of Long)(&H570) ' Offset for moving the plane
Dim slewMode As Offset(Of Short) = New Offset(Of Short)(&H5DC, True) ' Offset for moving the plane
Dim sendControl As Offset(Of Integer) = New Offset(Of Integer)(&H3110, True) ' Offset for moving the plane
[/CODE]But the code number isn´t all like the PDF. In some offsets the number it is without &H and in other &H is the same than 0. Why?
-
Hi,
I think will be the most stupid question, but I need to do it. I know a little bit about .NET and I´m learning more, and using FSUIPC SDK. I see the VB example it is beatiful. But, If I want to do another comands like flaps register. It isn´t in the VB example. Where I see all the comands I can use for .NET?
-
There are a number of failures you can se up, through FSUIPC offsets, including engine fire and maybe preventing landing gear action. But it will depend also on which add-on aircraft you use, or a default.
FS itself doesn't simulate cabin pressurisation, so de-pressurising it isn't possible. However, you could try to work out what the results would be and try to make those things happen. Same goes for a lot of things.
Pete
Thank you Pet for you answer. I´m you FAN I love you work.
Ok, I need to do configurations for all aircrafts models I use to simulate fails?
-
Hi,
I´m programming at VB .NET. How Can I do an aircraft fail with FSUIPC? I think the fail will be for example:fire in a engine, cabin depressurization, landing gear don´t work...
Flaps Position
in FSUIPC Support Pete Dowson Modules
Posted
Hi,
I want to see in a Text Box the flaps position (0, 2, 5...). I call the offset like this:
And I write it in a text box like this:
Dim FlapsPosition As Double = Flaps.Value
Me.FlightLogBox.Text = FlapsPosition.ToString("F1")
[/CODE]
But the value is incorrect.