[PROGRAM]YSFlight Replay Merger

Note that alterations to the YSFlight .EXE is forbidden
Post Reply
User avatar
Flake
Core Staff
Core Staff
Posts: 4266
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 814 times
Been thanked: 1159 times
Contact:

[PROGRAM]YSFlight Replay Merger

Post by Flake » Tue Mar 29, 2016 9:06 am

This Program was developed at the request of Kujo and by proxy VNAF ONE.

This program aims to overcome the 1000 second limit in YSFlight Replays by splitting the records into multiple files and than rejoining together.
Image
1) In YSFlight, you fly the first ~1000 seconds of your routine, Exit flight and save a backup.
2) Using the flight record editor in YSF, trim the replay to be 0 to 1000 seconds (or where you want it to end, eg: 0 to 500 seconds...)
3) Save that replay as part 1.
4) load the original record again and delete 0 to 1000 Seconds.
5) Save that replay as part 2
6) Resume flight as the flight lead at time 0.00 in the part 2 replay, and start recording again... up to 1000 seconds.
7) Rinse and repeat.
8) When done with the entire routine, join your records together with this program: Select part 1 as the first file and Part 2 as the second.
9) Now join the result of the last process, we'll call it _Merged, with part 3.
10) Repeat this step till all records are joined.
11) Done.
---

Note also for developers: This program comes with source code and it is a good library for loading and saving and editing replay files - it handles all data for aircraft (eg animations, smoke on/off) and most data for grounds (positions, headings... no other special data though.)

User avatar
VNAF ONE
Senior Veteran
Senior Veteran
Posts: 2143
Joined: Fri Feb 11, 2011 2:16 am
Favorite Aircraft: A-10C Thunderbolt II
Location: Indiana/Florida
OS: Windows 10
Has thanked: 229 times
Been thanked: 404 times

Re: [PROGRAM]YSFlight Replay Merger

Post by VNAF ONE » Tue Mar 29, 2016 7:50 pm

Dude, I'm gonna point out right now that this is literally the biggest thing to happen to YS Aerobatics since a four-point roll. If you don't get what I mean, you will see at AirFest ;)

Very well done Flake! I iz so happeh todeh!
VNAF Aerobatics Commanding Officer and Founder - - - YSAS Member - - - YS Aerobatic Pilot
YS ACC A-10 East Coast Demo Team pilot - - - B-1B Razor Demo Team pilot
VFA-49 GhostHawks Commanding Officer
Image

User avatar
Flake
Core Staff
Core Staff
Posts: 4266
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 814 times
Been thanked: 1159 times
Contact:

Re: [PROGRAM]YSFlight Replay Merger

Post by Flake » Wed Mar 30, 2016 12:51 am

Cheers all, I hope the program is working as expected!

Fun fact - the 1000+ second lag, I'm pretty sure, is a result of poor calculations involving floating point numbers. If you delete the last digit off the timestamps in a normal <1000 second replay, you get the same effect.

I think if soji changed from single precision floating point to double precision floating point (ie from float to double) this problem would cease to exist.

That said, floating point calculations are a LOT faster than doubles. The program would lag a tiny bit more if soji did that.

User avatar
u2fly
Veteran
Veteran
Posts: 1191
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 669 times
Been thanked: 267 times
Contact:

Re: [PROGRAM]YSFlight Replay Merger

Post by u2fly » Wed Mar 30, 2016 1:09 am

Where resulted file saved?
I test it on linux with Mono, all gone well, I get "Done" message and full bar, but cant find resulted merged replay.
--
UPDATE: Sorry, all work well, only problem, think, that user cant choose resulted file name and location where to save it.
On Linux with Mono it will paste "\" symbols to path but for Linux need replace it with this "/" symbol.
/!\ READ YSFLIGHT HANDBOOK (.PDF) | updated 2017/05/03

U.S. Senator John McCain wrote:
“Spending #NewYearsEve w/ brave #Ukrainian Marines at a forward combat outpost - we stand w/ them in their fight against #Putin's aggression”
http://pic.twitter.com/vkz0gdozVV
(31 DEC 2016)

User avatar
Kujo
Veteran
Veteran
Posts: 1001
Joined: Fri Feb 08, 2013 2:28 am
Favorite Aircraft: Lockheed Martin F-16 Fighting Falcon
Location: Las Vegas, NV
OS: Windows 8.1 - 64 Bit
Has thanked: 779 times
Been thanked: 715 times
Contact:

Re: [PROGRAM]YSFlight Replay Merger

Post by Kujo » Wed Mar 30, 2016 5:52 am

u2fly wrote:Where resulted file saved?
I test it on linux with Mono, all gone well, I get "Done" message and full bar, but cant find resulted merged replay.
--
UPDATE: Sorry, all work well, only problem, think, that user cant choose resulted file name and location where to save it.
On Linux with Mono it will paste "\" symbols to path but for Linux need replace it with this "/" symbol.
I'm sure the file will save in the folder where you originally found your replays. So if you found the records from one folder, it will save in the same folder. You can always rename the file afterwards ;)
Image

User avatar
Flake
Core Staff
Core Staff
Posts: 4266
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 814 times
Been thanked: 1159 times
Contact:

Re: [PROGRAM]YSFlight Replay Merger

Post by Flake » Wed Mar 30, 2016 7:55 am

It's a quick and dirty power user level tool. A lot of my work is power user tools. Refining it to be usable by everyone takes a lot of time and once a project works, I tend to want to spend my time on new ventures. It does the job. It's open source. I do invite anyone to use my sources to help them code, but other than that. I think we're done here.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest