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 5: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: 16
Joined: Thu Oct 17, 2019 11:19 pm

Re: record and replay aircraft flight information?

Postby jano » Wed Feb 12, 2020 3: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: 178
Joined: Thu Nov 29, 2007 11:32 pm
Location: france
Callsign: jano
Version: git
OS: debian SID

Re: record and replay aircraft flight information?

Postby Hooray » Wed Feb 12, 2020 5: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: 11510
Joined: Tue Mar 25, 2008 8:40 am


Return to Multiplayer events

Who is online

Users browsing this forum: YandexBot [Bot] and 1 guest