Open NCC21864 opened 2 months ago
I'm sorry, the question is not very clear. Please read the documentation.
The message formats XPPlanes can deal with are documented there. You need to send data in such a format. I recommend using the XPPTraffic format as that can control all available features. You send the data to broadcast port 49800 or multicast port 49900, or what you configured the plugin to listen to.
Example .JSON
files are provided in docs
. An example Python script, which can send such .JSON
files, is provided in script/SendData.py
.
Installation instructions for the plugin itself are provided as well. Granted...all of that is fairly brief as I am assuming that people developing for X-Plane have experience with X-Plane setup, plugin installation, and for this project also in development. Don't forget to install CSL models, which only are the plane objects XPPlane will draw. For its installation the documentation refers to my LiveTraffic plugin with a very detailed instructions.
I can try to help you as best as I can afford, but you would need to be more specific what you have trouble with.
could I get a simple way to communicate?I need get solution in a hurry
My UDP data send from a server,which struct is:ID,LocalX,LocalY...HDG etc. I wish the plugin can receive the message like this
In the documentation you would find that XPPlanes also understands a simple comma-separated format named RTTFC
taken over from RealTraffic. It is specified in this PDF in the secton "RTTFC/RTDEST format" starting on page 4 and looks like this:
RTTFC,hexid, lat, lon, baro_alt, baro_rate, gnd, track, gsp, cs_icao, ac_type, ac_tailno,
from_iata, to_iata, timestamp, source, cs_iata, msg_type, alt_geom, IAS, TAS, Mach,
track_rate, roll, mag_heading, true_heading, geom_rate, emergency, category, nav_qnh,
nav_altitude_mcp, nav_altitude_fms, nav_heading, nav_modes, seen, rssi, winddir,
windspd, OAT, TAT, isICAOhex,augmentation_status,authentication
Most of these fields aren't essential for XPPlanes and you can leave them empty. Haven't tried...but you should be good by just sending values for "RTTFC", hexid, lat, lon, gnd, ac_type, timestamp, alt_geom, true_heading. For any fields you don't fill just send nothing, but keep the separating commans in the data, so you'll always have 42 commas in the data.
Also for this format there is an example file available.
now I Have receive and convert my data to json and send by udp port 49800,the status of plugins display as (waiting for data)ðŸ˜,can't wait to get your contact way and get your help,best wishes
now the plugin has received the data,log says that Couldn't convert to FlightData object, unknown format or data insufficient: maybe my frequency of data sending is too high? I have about 200 "json" to send,if any need, I can slow it down
Attach X-Plane's Log.txt
and one of your JSON you had sent.
I Have successfully Build it,thanks for your help
more,I wanna know about the max amount of aircraft
XPPlanes implements no limit on the number of aircraft.
that's incredible,you are just completely genius
i'm back!,now i have a problem.i need the plane "shouldBeRemoved" if there is no data received in 2 seconds,i have set the gracePeriod = 2,but the plane didnt disappear as my wish,looking forward to your help
To be able to help you please set logging level to debug (LogLevel 0
in XPPlanes.prf
), run another session that produces your issue, then attach both XPPlanes.prf
and the resulting Log.txt
file from the X-Plane directory.
I'm building an ATC simulator,now I wonder how can I transfer my UDP data From Server to the Flight data,my own UDP data just decode like AI_ID[idx] = sAC_ID; //x Temp[0] = MyArray[11]; Temp[1] = MyArray[12]; Temp[2] = MyArray[13]; Temp[3] = MyArray[14]; AI_X[idx] = BitConverter.ToSingle(Temp, 0); //y Temp[0] = MyArray[15]; Temp[1] = MyArray[16]; Temp[2] = MyArray[17]; Temp[3] = MyArray[18]; AI_Y[idx] = BitConverter.ToSingle(Temp, 0);
............................................................. Temp[0] = MyArray[35]; Temp[1] = MyArray[36]; Temp[2] = MyArray[37]; Temp[3] = MyArray[38]; AI_SPD[idx] = BitConverter.ToSingle(Temp, 0); I wonder How can I connect The Plugin in and create Aircraft