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.