Board index FlightGear Multiplayer events

record and replay aircraft flight information?

Virtual fly-ins, fun flies, competitions, and other group events. Find out details of upcoming events, register for competitions, or organize your own tour of a favorite location.

record and replay aircraft flight information?

Postby emrcnort » Fri Feb 07, 2020 6:34 pm

Hello to everyone,
I plan to use two different fighter jets from two different computers.
The aircrafts will launch missiles at each other during the flight. Is there a way to save flight information and then replay the simulation over and over?

NOTE: I can receive the launched missile data over the network with a protocol I wrote. I need to be able to get this data over the network when the simulation is played again.

*EDIT: I tried adding this line to the command line but my flight information was not saved to any files:
--generic = file, out, 1, flightData.csv, playback
emrcnort
 
Posts: 21
Joined: Fri Oct 18, 2019 12:19 am
Version: 2019.1.1
OS: Windows 10

Re: record and replay aircraft flight information?

Postby jano » Wed Feb 12, 2020 4:52 am

I do something like that with network tools on linux, i record the udp traffic with wireshark, then use a bit of magic (tcp-edit) if i need to change destination for the traffic, and in the end send it back with tcpreplay.
this allow to replay ad lib the flight, to take multiple camera point of view, or to train for an aerobatic formation ...

an exemple taken with the ufo, on a pc allowing a decent framerate for video capture, which was impossible on the machine used for the the flight.




a wiki page about that

to have tcpreplay keep the same time flow as the pc clock is the tricky part :) (core affinity + nice + a bit of replay acceleration with the "-x" option)

imho it's the only way to keep all the action recorded for multiples mp planes.
jano
 
Posts: 221
Joined: Fri Nov 30, 2007 12:32 am
Location: france
Callsign: jano
Version: git
OS: debian SID

Re: record and replay aircraft flight information?

Postby Hooray » Wed Feb 12, 2020 6:26 pm

it should be fairly simple to write a tiny wrapper script in Python to do exactly that - apart from that, you can use a combination of Linux shell tools to accomplish the same thing.
There is also a dedicated logging/instant replay (flight recorder/fgtape) subsystem in FlightGear, it would be fairly simple to adapt that to make it MP/network aware.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: record and replay aircraft flight information?

Postby Johan G » Wed Mar 11, 2020 4:44 pm

jano wrote in Wed Feb 12, 2020 4:52 am:I do something like that with network tools on linux, i record the udp traffic with wireshark, then use a bit of magic (tcp-edit) if i need to change destination for the traffic, and in the end send it back with tcpreplay.

[...]

a wiki page about that

Nice. I wish more people documented good stuff they figure out. Also, I took the liberty to do some copy editing (hope you like it :) ).
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6634
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: record and replay aircraft flight information?

Postby Hooray » Wed Mar 11, 2020 4:51 pm

agreed, that's neat and pretty clever !

It would be cool to have a higher level interface, possibly in Python to inject arbitrary traffic that way - i.e. without having to actually run fgfs, which could quickly become superior to the legacy AI traffic system, for the reasons outlined by Durk a while ago: http://wiki.flightgear.org/FGTraffic
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU


Return to Multiplayer events

Who is online

Users browsing this forum: No registered users and 7 guests