The simFlight Network Forums  # dwhsmart

Members

7

## Posts posted by dwhsmart

Hi Pete

Thank you very much for your  information.

Thank you!

Steven Ding

Hello Paul Henty

I want to use FSUIPC to add AI aircraft, I do not know what to do? Please also trouble you to make some suggestions.

Thank you!

Steven Ding

3. ### Development questions

Hi Thomas:

Thank you very much for your help and information, I have to solve these problems about the idea.

Thank you!

Steven Ding

4. ### Development questions

6 hours ago, forstmeier said:

You can read and write offsets for the PMDG-777 with the Pmdg777 SDK.

When coding with VB.net you can include the translated SDK  (x VB.net) for the Pmdg777. You read and set all those values.

You need the Microsoft.FlightSimulator.Simconnect.dll and the PMDG_777X_SDK.h  > in your  VB.net "Release" Folder.

By the way: you can use the FSX Simconnect.dll for reading and setting the Spoiler "Tick number" and the "Spoiler position value". There is no problem with using different sistems together.

The route distance "from" > "to" can be calculated in this way: (this is the real nautical mathe formula)

```
Dim LatitudeAircraft As Offset(Of Long) = New FSUIPC.Offset(Of Long)(&H560)  'Latitude
Dim LongitudeAircraft As Offset(Of Long) = New FSUIPC.Offset(Of Long)(&H568) 'Longitude

Lat1 = LatitudeAircraft.value
Lon1 = LongitudeAircraft.value

lat1 = lat1 * 90 / (10001750D * 65536D * 65536D)
lon1 = lon1 * 360 / (65536D * 65536D * 65536D * 65536D)

'Dim d As Double
'lat2, lon2 = destination coordinates that could be the runway center Start position
d = distance(lat1, lon1, lat2, lon2, "N")  'distance between 2 Pos

'Function calculate lat, lot between 2 points in distance
Function distance(ByVal lat1, ByVal lon1, ByVal lat2, ByVal lon2, ByVal unit) As Double
Dim theta, dist
theta = lon1 - lon2

'Dim dist As Double
'read distance result with 1 or 2 decimals    .ToString("f2")
dist = acos(dist) ' used if theta in calculation is used

distance = dist * 60 * 1.1515
Select Case UCase(unit)
Case "K"    'Kilometer
distance = distance * 1.609344
Case "N"    'Nautic miles
distance = distance * 0.8684
End Select

End Function

deg2rad = CDbl(Deg * pi / 180)
End Function

End Function

'get arccos using the arctan function
Dim pi As Double = 3.14159265358979
acos = 0
acos = pi
End If
End Function

Public Function Atan2(ByVal y As Double, ByVal x As Double) As Double
Dim Pi As Double = 3.14159265358979

If y > 0 Then
If x >= y Then
Atan2 = Math.Atan(y / x)
ElseIf x <= -y Then
Atan2 = Math.Atan(y / x) + Pi
Else
Atan2 = Pi / 2 - Math.Atan(x / y)
End If
Else
If x >= -y Then
Atan2 = Math.Atan(y / x)
ElseIf x <= y Then
Atan2 = Math.Atan(y / x) - Pi
Else
Atan2 = -Math.Atan(x / y) - Pi / 2
End If
End If

End Function```

Always specify when referring to a PMDG aircraft

You would need a similare calculation approach when using the pmdg / VB.net SDK.

Raimund

.

Very helpful to me, thank you!

5. ### Development questions

Oh, the PMDG model needs to use the PMDG SDK to read the Information,I will go to understand and try. Is it possible that other models will use FSUIPC's standard interface to get these values? For example: Aerosoft Airbus model and so on.

6. ### Development questions

Hi Thomas

I am using FSUIPC Version 4.955c. The aircraft model is PMDG-777-300ER. The development environment is Visual Studio  2015(.net framework4.0 , VB.Net). The FSUIPCClient.dll that is used is V2.4.

About the Spoilers offsets, whether on the ground or in the air, 0BD0, 0BD4, 0BD8 these three are able to get to the value, only 0BCC can not get the value.

In addition to the GPS system, are there other offsets that can get information on approach status, route distance and estimated flight time?

7. ### Development questions

Hi Paul Henty:

I am developing a program that uses FSUIPC as the interface to detect the status of the aircraft in FSX and P3D, but I have encountered some problems in the development:

1.Through 0BCC can not get the state of Spoilers armed.

2.Through 60FC 6108 615C 6140 6137, can not get the relevant state of the aircraft approach.

3. Through 61A0,6198, can not get the Route total distance and  Destination ETE.

My english is poor,please forgive me.

Steven Ding

×