Replies: 8 comments 12 replies
-
Hi @hesetone, Regarding the first topic: I'd suggest sending the same command values than previously for all the parameters that you do not plan to change. For example, say you sent The answer to the second topic is in the code below jsbsim/src/input_output/FGUDPInputSocket.cpp Lines 109 to 123 in 8fb7741 You need to prepend the data you send by a time stamp and JSBSim will use it to make sure that the current data packet is newer than the last data packet that it has processed. The time stamp does not need to match the elapsed simulated time nor real time, its purpose is just to discard older data packets because I believe that the UDP format does not guarantee the packets to be received in the same order than they were sent. @dpculp is the author of the |
Beta Was this translation helpful? Give feedback.
-
Correct, so you can view the timestamp as effectively a sequence counter.
The UDP protocol, unlike the TCP protocol, first of all doesn't guarantee delivery, i.e. there is no automatic re-transmission for missing packets etc. by the OS, and secondly, again unlike TCP doesn't guarantee they will be received in the same order that they were transmitted. Although realistically when using UDP between 2 processes on the same PC or even on a LAN as opposed to over the internet across multiple routers etc. you won't typically see non-delivery or out of order delivery. But the code receiving the UDP packets in JSBSim has to take the possibility into account, so it quietly drops/ignores an update if it is older that the last one if received. |
Beta Was this translation helpful? Give feedback.
-
Hmm, although English is my first language, I'm not 100% sure 😉 Pretty sure both are in use. I made it one word to emphasize the variable name in the code more than anything else. Merriam Webster seems to lump both of them together. |
Beta Was this translation helpful? Give feedback.
-
Hello, I have a question from the same subject: the input of unreal engine. Can someone help me about the normalization please: if the elevator command is at 0.3, what does that mean in deg or rad? Thank you in advance! |
Beta Was this translation helpful? Give feedback.
-
I have another question related to unreal engine please: How can i change the aircraft in the UEreference application? Are all the aircraft files available adapatble to the UEReference App? |
Beta Was this translation helpful? Give feedback.
-
Looks like you're switching from a 2-engine specific jet engine to possibly a 1-engine piston aircraft? My guess is if you try switching to say the 737 model you wouldn't see these errors. I'm not really familiar with the UE plug-in, but I'm guessing there may be a separate single-engine piston blueprint option? |
Beta Was this translation helpful? Give feedback.
-
@MariaALJ Please create a new discussion and provide more details of exactly what you're doing. We all thought you were the original author of this discussion and we are making assumptions based on the original author's details.... |
Beta Was this translation helpful? Give feedback.
-
JSBSim doesn't provide anything in terms of visual models of aircraft etc. So you're just switching the FDM (Flight Dynamics Model) when you enter say |
Beta Was this translation helpful? Give feedback.
-
Hello, I am learning about JSBSim&UE5, but there is something puzzles me. Now, the
Flight Commands
in jsbsim/UnrealEngine/README.md are not suitable for my project, I want to formulate commands by myself and send them to JSBSim via UDP socket. As we can see, the contents of 737.xml(L896-L07) indicates properties that will be sent to JSBSim:jsbsim/aircraft/737/737.xml
Lines 896 to 907 in 8fb7741
so, the point puzzles me shows as below:
1, I don't want to change any other states of the 737 plane, but just set elevator to -0.3. Should i formulate my command as
0.0,-0.3,0.0,0.0,0.0,0
?2, what the meaning of
+ 1 for the time stamp
in 737.xml(line 899)? Does it means that I have to attach a time stamp at the header of socket contents? I have checked the rules of how socket contents will be interpreted in FGUDPInputSocket.cpp. it shows as below:jsbsim/src/input_output/FGUDPInputSocket.cpp
Lines 96 to 129 in 8fb7741
how can i insert the time stamp into socket contents? the real world time is not defined by user, how can i insert the correct time into socket contents?(the description of question 2 maybe not clear enough, i will appreciate if you can help me figure it out.)
Beta Was this translation helpful? Give feedback.
All reactions