Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hello Paul,

 

 

How to:

 

1) How to return number off pax onboard (I mean update by PayloadServices)

1.a) Takeoff Weight: 65054 kg

2) weather doecoded like this( Weather: Wind 196/1 | Temperature 25°C | Visibility 9999 m | QNH 1015)

3) QNH set to auto pilot (Altimeter setting changed to 1013 at 10 ft AGL)

4) Auto pilot on/off dual or single

5) Find ils etablished by NAV 1

6) Recognition Lights

7) Push back mine doesn't work anymore

Thanks by advance

Regards Fred

Posted

1. The number of passengers on board is not recorded in FS. Each plane, depending on how it's written, has a different number of payload stations. For example, the default 737 has playload stations representing rows of seats: e.g. First Class, Coach 3-10. All you can do is read and write the total weight for all these passengers.

 

Some complex payware aircraft have a payload station per seat.

 

 

1a. The Max Takeoff Weight is not available in FS. You can get the Max Gross Weight which is usually close. I've added this to the PayloadServices (new DLL attached). Either use the Max Gross Weight or you can just hold the real-world information in a table in your application.

        Dim ps As PayloadServices = FSUIPCConnection.PayloadServices
        ps.RefreshData()
        MsgBox(ps.MaxGrossWeightKgs.ToString("F0") & "Kg")

2. You can get back a weather structure from the weather services. You can then construct your string from the various properties. There is full Intellisense documentation to help with this. For example, making a temperature string:

        Dim ws As WeatherServices = FSUIPCConnection.WeatherServices
        Dim weather As FsWeather = ws.GetWeatherAtAircraft()
        Dim message As String = "Temperature " & weather.TemperatureLayers(0).DayCelsius & "°C"
        MsgBox(message)

3. The QNH can be set at offset 0x0330. The altitude above ground can be calculated by subtracting the height of the terrain (0x0020) from the altitude above sea level (0x6020).

 

 

4. Dual autopilots are not supported in FS. The main autopilot switch is at 0x07BC. Some payware aircraft may have dual autopilots, but you'll need to find out if/how you can access this information. Each aircraft will be different. 

 

 

5. See offsets 0x0C48 and 0x0C49 to get the position of the ILS/Glideslope indicators.

 

 

6. Offset 0x0D06, bit 6. See this thread on how to use a bitarray to make it easier. http://forum.simflight.com/topic/79536-little-understanding-problem-reading-from-project-magenta-offset/

 

 

7. Offset 0x31F4 controls the pushback. I cannot see anywhere in your application that this is declared or used. Looks like to need to add this.

 

 

Paul

 

FSUIPCClient3.0_BETA.zip

Posted

1. The number of passengers on board is not recorded in FS. Each plane, depending on how it's written, has a different number of payload stations. For example, the default 737 has playload stations representing rows of seats: e.g. First Class, Coach 3-10. All you can do is read and write the total weight for all these passengers.

 

Some complex payware aircraft have a payload station per seat.

 

Maybe ask to TOPCAT dev ?! I will make a try.

 

1a. The Max Takeoff Weight is not available in FS. You can get the Max Gross Weight which is usually close. I've added this to the PayloadServices (new DLL attached). Either use the Max Gross Weight or you can just hold the real-world information in a table in your application.

        Dim ps As PayloadServices = FSUIPCConnection.PayloadServices
        ps.RefreshData()
        MsgBox(ps.MaxGrossWeightKgs.ToString("F0") & "Kg")

Thank for improve your DLL ;)

 

2. You can get back a weather structure from the weather services. You can then construct your string from the various properties. There is full Intellisense documentation to help with this. For example, making a temperature string:

        Dim ws As WeatherServices = FSUIPCConnection.WeatherServices
        Dim weather As FsWeather = ws.GetWeatherAtAircraft()
        Dim message As String = "Temperature " & weather.TemperatureLayers(0).DayCelsius & "°C"
        MsgBox(message)

I'm thinking to get part of string (METAR return)

 

6. Offset 0x0D06, bit 6. See this thread on how to use a bitarray to make it easier. http://forum.simflight.com/topic/79536-little-understanding-problem-reading-from-project-magenta-offset/

Sorry in your FSUIPCClientExample_VB you have already answer to my question. So in the forum I have seen that it's seem easiest method to check value

Private Sub chkAvionics_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkAvionics.CheckedChanged
        Me.avionics.Value = IIf(chkAvionics.Checked, 1, 0)
    End Sub

7. Offset 0x31F4 controls the pushback. I cannot see anywhere in your application that this is declared or used. Looks like to need to add this.

Yes it is but with bad offset

Public pushback As Offset(Of Integer) = New Offset(Of Integer)(&H31F0)

Public Function getpushbackflag()
        Return pushback.Value < 3
    End Function
 

Thanks again,

 

Regards,

 

Fred

Posted

Hi Paul,
 
Need help setting up QNH (Hp)
 
 

    Public qnh As Offset(Of Integer) = New FSUIPC.Offset(Of Integer)(&H330)


   Public Function getqnh()
        Dim qhn As Integer = CInt(qnh.Value / 16)
        Return qhn.ToString()
    End Function

 
I have  value for 1015 Hp -> 66520055

 

I think all is wrong  :???:

 

 

Regards Fred

Posted

Hi Fred,

 

Offset 0x0330 is only 2 bytes. You've declared the offset as 'Integer' which is a 4 bytes in VB. The type tells the DLL how many bytes to read. A 2-Byte integer is a Short. This value is also unsigned so it's best to use UShort like this:

 

Public qnh As Offset(Of UShort) = New FSUIPC.Offset(Of UShort)(&H330)

 

My userguide.pdf explains which VB types to use. See the table on page 7.

 

Regards,

 

Paul

Posted

Paul, it's possible to write a zero to switch off Autopilot on offset 0x07BC?

 

In other hand, is there an offset for Autobrakes possition?

Posted

Paul, it's possible to write a zero to switch off Autopilot on offset 0x07BC?

 

Yes, this works if the plane is using the built-in FS autopilot. This may not work on Third-party payware where they have coded their own autopilot.

 

You can also send the Autopilot off control as follows (Must be using Version 3.0 of my DLL. It's attached to a previous reply in this thread.)

FSUIPCConnection.SendControlToFS(FsControl.AUTOPILOT_OFF, 0)

In other hand, is there an offset for Autobrakes possition?

 

 

 

Yes it's 0x2F80. Again, this will not work where aircraft developers have coded their own autobrake system.

 

Paul

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.