-
Posts
11 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Downloads
Posts posted by Alp
-
-
Hello,
I need a information about how can i detect current airport?
I am coding a acars system and i want to detect pilot's landed airport icao. If i detect pilot's current airport, thats perfect. If it is not possible i can search nearest airports and i think closest airport is the pilot's location. 2 approaches is ok for me but i dont know how can i do these. Any body can help me?
Regards
-
I fixed my problem. I used wrong syntax.
-
Hello,
I'm using FSUIPC web socket for my web project but i could not got a latitude longitude information via 0568 and 0560 offsets. I'm getting nonsensical numbers. Can you help me please. My javascript code is under the below.
var cmdoffsetsread = new function () { var ws = null; // WebSocket this.start = function() { }; this.stop = function () { if (ws) { ws.close(); } }; var clearMessages = function () { document.getElementById("connectionStatus").innerText = ws ? "Connection Open" : "Connection Closed"; }; this.openConnection = function () { if (!ws) { clearMessages(); var serverURL = document.getElementById("serverURL").value; ws = new WebSocket(serverURL, "fsuipc"); ws.onopen = function () { document.getElementById("connectionStatus").innerText = "Connection Open"; cmdoffsetsread.send_main_offsets(); cmdoffsetsread.send_main_read_request(); }; ws.onclose = function () { cmdoffsetsread.send_stop_request(); document.getElementById("connectionStatus").innerText = "Connection Closed"; ws = null; }; ws.onerror = function () { document.getElementById("connectionStatus").innerText = "WebSocket Error"; }; ws.onmessage = function (msg) { var response = JSON.parse(msg.data); if (response.success) { switch (response.command) { case 'offsets.declare': document.getElementById('connectionStatus').innerText = 'All settings loaded and instructor panel started'; break; case "offsets.stop": document.getElementById('connectionStatus').innerText = 'Updates for "' + response.name + '" have been stopped'; break; case 'offsets.read': switch (response.name) { case 'allSettingsOffsets': showOffsetValues(response); break; } break; default: document.getElementById('connectionStatus').innerText = 'Unknown command: ' + response.command; break; } } else { var error = 'Error for ' + response.name + ' (' + response.command + '): '; error += response.errorCode + " - " + response.connectionStatus; document.getElementById("connectionStatus").innerText = error; } }; } } var showOffsetValues = function (response) { //VARIABLES var playerLon = (((response.data.playerLon / 10001750) / 65536.0) / 65536.0) * 90.0; // longitude document.getElementById("latitude_longitude").value = playerLon; } this.send_main_offsets = function () { clearMessages(); var request = { command: 'offsets.declare', name: 'allSettingsOffsets', offsets: [ { name: 'playerLon', address: 0x0568, type: 'uint', size: 8 } ] } if (ws) { ws.send(JSON.stringify(request)); } } this.send_main_read_request = function () { clearMessages(); var request = { command: 'offsets.read', name: 'allSettingsOffsets', interval: 100 } if (ws) { ws.send(JSON.stringify(request)); } } this.send_stop_request = function () { clearMessages(); var request = { command: 'offsets.stop', name: 'allSettingsOffsets' } if (ws) { ws.send(JSON.stringify(request)); } } this.closeConnection = function () { if (ws) { clearMessages(); ws.close(); } } };
-
Thank you so much. My version wa 3.0.3. I upgraded now.
-
aaaaa i got it. I thought 0020 is giving me directly agl information. When i do msl altitude minus 0020 value; i'm getting real altitude (agl). I tried now and i got a solution. Thank you so much Mr. Dowson.
-
Hello,
When i tried to use 0020 offset with this code;
Private agl As New Offset(Of UInteger)(&H20) aglStatus.Text = agl.Value()
i am getting a constant number like a 12719. And this number did not changing (when airplane is flying)
When i tried to use 0B4C offset with this code;
Private agl As New Offset(Of UInteger)(&HB4C) aglStatus.Text = agl.Value()
i am getting a constant number like a 49. And this number did not changing (when airplane is flying)
-
Firstly thank you for your response but when i tried these offsets, i am getting ridiculous numbers return. how can i fix it?
-
Hello,
I'm trying the light data via 0D0C offset but i couldn't any data. I am getting a error. My code is in the below.
Private lights As New Offset(Of Byte)(&HD0C)
TaxiLightStatus.Text = lights.Value(3)
-
First of all thank you for your response. Well, how can i get altitude (AGL) ? When i trying search agl offset in the document, i could not found.
-
Hello,
I need get altitude (agl). When i trying use 0020 or 0B4C offsets, i could not get any meaningful result. For example: When my airplane was on the ground, result is 85. My app screenshot is https://prnt.sc/w8qh7z . By the way i'm using VB.NET.
My code is in the below
Private agl As New Offset(Of Short)(&HB4C) Dim aglmttoft = agl.Value() * 3.2808399 Me.AGLDurum.Text = aglmttoft
Detect Current Airport or Closest Airport
in FSUIPC Client DLL for .NET
Posted
Thank you. As far as I understand, Fsuipc does not provide this data directly. Is it true?