Board index FlightGear Support Interfacing

issue with UDP socket to set position

Connecting two computers, using generic protocol, connecting with Matlab?

issue with UDP socket to set position

Postby Wizmo » Mon Nov 20, 2017 5:18 pm

Hello guys.

I have an issue while using an UDP socket to set the position of my plane. I'm sorry if there is already this kind of posts but I didn't find a solution to my problem.

I use the command line
Code: Select all
--fdm=null
--generic=socket,in,5000,127.0.0.1,80,udp,simpleLongLat_in


And my simpleLongLat_in file is like that :

Code: Select all
<?xml version="1.0"?>
<PropertyList>
<generic>

   <input>
      <line_separator>\n</line_separator>
      <var_separator>tab</var_separator>
      
      <chunk>
         <name>Longitude Degree</name>
         <node>/position/longitude-deg</node>
         <type>float</type>
         <format>%f</format>
      </chunk>
      
      <chunk>
         <name>Latitude Degree</name>
         <node>/position/latitude-deg</node>
         <type>float</type>
         <format>%f</format>
      </chunk>
   </input>
</generic>
</PropertyList>


When I try to send data into my socket there is nothing happening on FlightGear. I don't have any idea on how fixing my issue because I don't even know if FlightGear receive the data.

I have to add that I already did the same thing in the other way (getting value of FlightGear in my java application using --generic=socket,in,5000,127.0.0.1,80,udp,simpleLongLat_in).

So, do you have any ideas on how I can fix my issue ?

Wizmo
Wizmo
 
Posts: 18
Joined: Mon Sep 25, 2017 3:53 pm

Re: issue with UDP socket to set position

Postby daweed » Tue Nov 21, 2017 10:26 am

When sending data to FG, you can open the properties tree browser, navigate to /position branch and check if longitude-deg and latitude-deg are updated when you send data.

Properties tree browser can be open by pressing "/" key on your keyboard.
Windows 10 / Linux Mint 20
AMD Ryzen 7 3700X |32 Go RAM GeForce RTX 3070 Ti 8 Go
FG Interface
Lyon Saint Exupery Scenery

ATC on LFLL on Friday 19:00 UTC => 22:00 UTC
daweed
 
Posts: 398
Joined: Thu Dec 11, 2014 11:45 am
Location: LFKP LFLL
Callsign: daweed
OS: Linux Mint 20


Return to Interfacing

Who is online

Users browsing this forum: No registered users and 4 guests