[Request] .yfs file parameters

Topics about .fld, .stp, .ter, .yfs, and Scenery Editor.
Post Reply
User avatar
decaff_42
Staff
Staff
Posts: 3838
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 844 times
Been thanked: 1726 times
Contact:

[Request] .yfs file parameters

Post by decaff_42 »

Hello,

As I mentioned in the mchat yesterday, I'm working on a series of 200-odd test points to gage the effect airspeed and altitude have on throttle in straight and level flight (autopilot #2). The goal is to predict the maximum range or best speed/ altitude to fly at to reach a destination the fastest and turn it into a useful tool for long-range civilian flights.


Now on to my request.

I am wondering if there is any documentation as to what the various parameters in the .YFS file are. If the throttle position is included in these, I would love to know, as I am introducing some error with my current method of getting the throttle percent. (Take a screenshot and measure the ration of pixels covered/uncovered by the throttle indicator)

I know that the following parameters:

Code: Select all

Time
x-position / altitude / z-position / ... the rest are unknown to me
this line is unknown to me
0 to finish off the entry

Then there are other parts of the code at the end that I have no clue about. :( but it looks like a bunch of srf files with vertex and face definitions.


Does anyone have a better idea as to what these are? I assume that there are some regarding flaps gear, and other animations, but I am unsure. Any help would be greatly appreciated!!! :D

I thought I would ask the community before doing too many test points and then find out there is a better way. ;)
Check out my website YSDecaff for all my tutorials and addon releases.
Visit my GitHub page for Python codes: https://github.com/decaff42?tab=repositories

YSFlight Addon Database - Find links to nearly every addon made for YSFlight!
Submit Addon To Database
User avatar
Lor599
Modding Team
Modding Team
Posts: 119
Joined: Sun Nov 18, 2012 3:39 pm
Favorite Aircraft: Boeing 787
Location: Eastern U.S.A
Has thanked: 63 times
Been thanked: 73 times

[Request] .yfs file parameters

Post by Lor599 »

Hmmm...I can't remember much off the top of my mind about the yfs files. But, probably tomorrow, I will study the yfs file some more. Right now ,though, I've got to study for school...not yfs files :lol:
I might write the document also.
User avatar
waspe414
Staff
Staff
Posts: 1581
Joined: Thu Feb 10, 2011 9:35 pm
Favorite Aircraft: Kiowa, Mitten, Hornet
Location: Canada
Has thanked: 154 times
Been thanked: 506 times

[Request] .yfs file parameters

Post by waspe414 »

Have a dump of my YSF analysis text file:
(I skimmed just before uploading, but can't actually remember any of this. I can refresh my memory if things aren't clear.)
YFSVERSI 20130805
FIELDNAM AOMORI 0 0 0 0 0 0 FALSE LOADAIR:FALSE
ENVIRONM DAY
ALLOWGUN TRUE
ALLOWAAM TRUE
ALLOWAGM TRUE
ALLOWBOM TRUE
ALLOWRKT TRUE

==================================================================================

EVTBLOCK

WNDCHG 0.0 0
WIND 0.000000m/s 0.000000m/s 0.000000m/s
ENDEVT

TXTEVT 0.0 0
TXT Text here
ENDEVT

VISCHG 0.0 0
VISI 8000m
ENDEVT

VISCHG 15.0 0
VISI CLDLYR OVC 800ft 1000ft
ENDEVT

PLRAIR 0.000000 0
OBJID 5
ENDEVT

AIRCMD 370.237000 0
AIRID 5
TXT MALFUNCT HUDFLICKER
TXT MALFUNCT POWER 0.7
TXT MALFUNCT RADAR
TXT MALFUNCT VOR
TXT MALFUNCT ADF
TXT MALFUNCT ALTIMETER 100ft
TXT MALFUNCT VSI
TXT MALFUNCT AIRSPEED 1.29m 0.00m/s
TXT MALFUNCT ATTITUDE 1.51rad 0.01rad 0.00rad
TXT MALFUNCT FLAP
TXT REPAIRFN POWER
TXT REPAIRFN FLAP
TXT REPAIRFN RADAR
TXT REPAIRFN VOR
TXT REPAIRFN ADF
TXT REPAIRFN AIRSPEED
TXT REPAIRFN ALTIMETER
TXT REPAIRFN VSI
TXT REPAIRFN ATTITUDE
TXT REPAIRFN HUDFLICKER
ENDEVT


WPNCFG 3.230000 0
AIRID 1
CFG IFLR 20
CFG RKT 38
CFG B250 8
ENDEVT

EDEVTBLK

----------------

Type / time / 0
Specifics

WNDCHG changes wind to specified velocity

TXTEVT writes text TXT at time

VISCHG changes visibility to VISI
or adds cloud layers

PLRAIR changes the camera focus to OBJID at time (Pain in the ass)

==================================================================================

AIRPLANE F-16C_FIGHTINGFALCON TRUE SUBST:F-18C_HORNET
STARTPOS NA MISAWA_RW10
IDENTIFY 0
IDANDTAG 5 ""
AIRPCMND UNLOADWP
AIRPCMND LOADWEPN IFLR 20
AIRPCMND LOADWEPN AIM120 2
AIRPCMND LOADWEPN AIM9 6
AIRPCMND LOADWEPN AGM65 6
AIRPCMND LOADWEPN FUEL 1000
AIRPCMND LOADWEPN AIM9X 2
AIRPCMND LOADWEPN B500HD 2
AIRPCMND LOADWEPN FUEL 800
AIRPCMND LOADWEPN FLR 20
AIRPCMND SMOKEOIL 100.0kg
AIRPCMND SMOKECOL 0 135 180 255
AIRPCMND INITFUEL 75%

AIRPCMND POSITION -68031.14m 32.11m 21996.24m
AIRPCMND ATTITUDE -89.93deg 0.00deg -0.00deg
AIRPCMND CTLLDGEA TRUE
AIRPCMND INITSPED 0.000000m/s
AIRPCMND INITFUEL 80%

INTENTIO
MINIALTI 0
FORMATIO 0 -15.85 -7.00 -15.85 : formation
FOM_TRNS -5.28 -7.00 -15.85
FOM_TRNS 0.00 -7.00 -15.85
FOM_TRNS 0.00 -3.00 -15.85
FOM_AFTR 4 -15.85 -3.00 -15.85
FOM_AFTR 5 15.85 -3.00 -15.85
FOM_SYNC TRUE
ENDINTEN
***or***
INTENTIO
AIRROUTE
ROUTETAG "CARRIER_LOOP"
ROUTEIDX 0
LEGSTART 0.000000m 0.000000m 0.000000m
MINIALTI 330
ENDINTEN
***or***
INTENTIO
DOGFIGHT G7.00 B20.00 F6
CLOSEINMAXSPEED FALSE
TARGETFLYINGONLY TRUE
COMBATTHRESHOLD 31484.0m
GIVEUPDS 20000.0m : give up distance [how does this differ from combatthreshold?]
MINIALTI 1000
ENDINTEN
***or***
INTENTIO
MINIALTI 330
DEFENDER
TEAMLABEL ENEMY_1 ENEMY_2 ENEMY_3 ENEMY_4 ENEMY_5 ENEMY_6 ENEMY_7 ENEMY_8 ENEMY_9 ENEMY_10 ENEMY_11
READINESS READINESS_24HOUR
NMUSTBEINTHEAIR 4
NENGAGE 3
RTBFUELTHR 0.2
RTBRUNOUTSAAM TRUE
RTBRUNOUTGUN TRUE
DFTIMELIMIT 360sec
DEFENDBASE TRUE
HOMEBASE AIRPORT AOMORI
HOLDINGALT 13500ft
ENGRADIUS 30SM
ADIZRADIUS 32SM
ENDINTEN
***or***
INTENTIO
GNDATACK
ATKSTATE INBOUND_AGM_ROCKET
TURNAWAY FALSE
TNAWYHDG 0.000000deg : turnaway heading, direction to fly after weapon release?
TNAWYDST 15000.00m : turnaway distance, distance to fly after release? Or distance from target?
BOMBRALT 1523.999998m : bomb release altitude
ATACKALT 1523.999998m : attack altitude
AGMRDIST 3050.000000m : agm release distance
RKTRDIST 2550.000000m
GUNRDIST 700.000000m
RADLIGHT 5000.000000m : what even are these two??
RADHEAVY 10000.000000m
INBSPEED 150.000000m/s : inbound speed
FLARITVL 5.000000sec : flare interval
EVADEMSL FALSE : evade missile
MINIALTI 330 : minimum altitude
ENDINTEN
***or***
INTENTIO
GOTOPOSI 15279.8 500.0 -21794.0
AIRSPEED 160kt
ENDINTEN
***or***
INTENTIO
LANDING_ 1 1
GNDTARGT "28-CRESCENT"
ENDINTEN
INTENTIO
TAKEOFF_ 2500ft
REFUEL__
ENDINTEN

LANDLWFL 0.00
land low fuel, when fuel is below %

AIRPCMND SETCNTRL TRIM:0.2
NUMRECOR 66 3

RELDCMND UNLOADWP
RELDCMND LOADWEPN IFLR 20
RELDCMND LOADWEPN AIM120 2
RELDCMND LOADWEPN AIM9 2
RELDCMND LOADWEPN AIM9 4

==================================================================================

AIRCRAFT
-----------------------------
AIRPLANE F-16C_FIGHTINGFALCON FALSE
IDENTIFY 0
IDANDTAG 3 "name'"
USERNAME "name"
AIRPCMND *0 TRUE
AIRPCMND *3 5000kg
AIRPCMND *4 2500kg
AIRPCMND *5 5000kg
AIRPCMND *6 3.2kg
AIRPCMND *7 0.25kg
AIRPCMND *11 0.384rad
AIRPCMND *12 -0.262rad
AIRPCMND *13 306m/s
AIRPCMND *14 680m/s
AIRPCMND *15 TRUE
AIRPCMND *16 TRUE
AIRPCMND *17 FALSE
AIRPCMND *18 0
AIRPCMND *19 0
AIRPCMND *20 0.1
AIRPCMND *21 0.2
AIRPCMND *22 0.5
AIRPCMND *23 2
AIRPCMND *24 35m^2
AIRPCMND *25 0.401rad
AIRPCMND *26 0.087rad
AIRPCMND *27 6.283rad
AIRPCMND *28 10
AIRPCMND *29 1
AIRPCMND *30 5
AIRPCMND *31 3
AIRPCMND *32 3
AIRPCMND *46 306m/s
AIRPCMND *47 6096m
AIRPCMND *48 46.3m/s
AIRPCMND *49 0.175rad
AIRPCMND *50 2000m
AIRPCMND *53 0.3
AIRPCMND *54 0.8
AIRPCMND *57 20.577778m/s
AIRPCMND *58 41.155556m/s
AIRPCMND *110 0
AIRPCMND *61 8m
AIRPCMND *66 10
AIRPCMND *1 117684N
AIRPCMND *2 72571.8N
AIRPCMND *73 100m/s
AIRPCMND *74 1
AIRPCMND *154 20
AIRPCMND *100 TRUE
AIRPCMND *101 0.00m 0.00m 1.00m
AIRPCMND *102 0.00m 0.00m 1.00m
AIRPCMND *103 0rad
AIRPCMND *104 0rad
AIRPCMND *105 0rad
AIRPCMND AIRCLASS AIRPLANE
AIRPCMND *80 1
AIRPCMND *123 FALSE
AIRPCMND *124 0
AIRPCMND *129 0.04sec
AIRPCMND AUTOCALC
AIRPCMND *130 0
AIRPCMND GUNSIGHT TRUE
AIRPCMND *175 0
AIRPCMND SMOKECOL 0 255 255 255
NUMRECOR 5728 4

34.094
45693.328 2.056 -10563.98 -1.7453 0.0247 0.0 0.0
6 255 255 255 255 199 0 0 240 10 0 0 0 0 0 0 0 0
0 0.0000 0.0000 0

----------------

TIME
pos[x? y? z?] / rot[x? y? z?] / Gforce
flight state (6=stopped,5=on fire,4=dead,3=left the airplane,2=stall,1=rolling,0=flying) / VGW(255) / Airbrake(255) / Gear(255) / Flap(255) / Brake(255) / Smoke (Boolean 0-1) / Vapor trail (Boolean 0-1) / Misc(totalled: 128=landing,64=strobe,32=nav,16=beacon,8=overrun,4=Velocity indicator,1=Afterburner) / strength(decreases with damage) / Throttle(99) (slaved to reverser) / Elevator(+-99) / Aileron(+-99) / Rudder(+-99) / Trim(99) / TV(99) / Reverse Thrust(99) / Bomb bay(99)
Turret number / [ Turretx(rad) / Turrety(rad) / Firing (0/2) ] {not shown if no turret}



#NOTES Aircraft die at 1 health, not zero. F-16 has 9 HP
Rotation, starting from Aomori 10, is yaw, pitch, roll (when horizontal) [-3.13 < yaw < 3.13: W~1.6, S~-3.1, E~-1.56]


==================================================================================

GROUND
-----------------
GROUNDOB AIRCRAFTCARRIER FALSE
IDENTIFY 0
IDANDTAG 873 "IFF1CARRIER"
GRNDCMND MAXSPEED 0kt
GRNDCMND MAXROTAT 0deg
GNDPOSIT 0m 0m 0m
GNDATTIT 0rad 0rad 0rad
GNDFLAGS 16
NUMGDREC 1 3

1.576
47969.1 0.0 7971.33 -0.0 0.0 -0.0
0 10
0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0 0 0
0 0 0 0 0 0
0

----------

TIME
pos[x? y? z?] / rot[x? y? z?]
state (0 = alive, 1 = dead) / strength
Rest unknown

Transition from state 0 to 1 triggers fire particles. Object invisible/not colliding in state 1

===================================================================================

BULRECOR
VERSION 4
NUMRECO 43

1.466 0 45698.23 2.30 -10563.93 -1.74 0.02 0.00
178.16 5000.00 12 A4 P
1020.00 1.57 0.52 -1

-----------------

Time / Type(0=gun,1=AIM9,2=AGM,3=500lb,4=rocket,5=flare,6=AIM120,7=250lb,9=500lbHD,10=A-AAM,12=fuel) / pos[x? y? z?] / rot[x? y? z?](radians)
Note 1 / Range / Damage / Aircraft number* / (P)layer or (N)ot
Missile velocity / Turn rate (rad/s) / Tracking cone radius (rad) / Target aircraft number (-1 for no target)

#NOTES
Note 1: Launch velocity: Bullets have a value of 1700, all other weapons have a value that is the aircraft velocity at launch, in m/s
Note 2: Missile velocity appears for missiles and rockets, not bombs. The numbers after only appear for guided weapons. (Missile final velocity)
* Aircraft number is assigned, starting with 0, in order of listing (See top) [IDANDTAG #-1]

-------------------------
-------------------------

KILLCREDIT 1 5
0 A4 G117 P 46633.5 28.2 -11209.7 20.0
0 A4 G116 P 46647.0 28.8 -11241.0 20.7
0 A4 G115 P 46772.1 31.4 -11290.1 21.2
0 A4 G114 P 46909.3 33.6 -11272.9 21.8
0 A4 G113 P 47044.4 36.2 -11303.5 22.3
1 A0 A1 P -2382.7 3374.9 40.6 11.5
1 A4 A5 P 57874.8 3251.7 -10940.3 11.3
10 A6 A4 N 53228.4 2039.5 -17974.4 105.1
6 A6 A2 N 45428.9 301.1 -12599.3 139.5
1 A4 A6 P 49505.7 2042.3 -14008.0 162.6
ENDRECO

---------------

Weapon type / Launch aircraft / Target / Launch is Player or Not / pos[x? y? z?] / time

-------------------------
-------------------------

EXPRECOR
VERSION 3
NUMRECO 8
11.294 57873.95 3251.87 -10937.36 10.00 1.00 25.00 N 1 0
11.294 57874.84 3251.66 -10940.35 20.00 5.00 18.00 N 1 0
105.129 53221.57 2034.86 -17972.03 10.00 1.00 23.00 N 1 0
105.129 53228.38 2039.53 -17974.40 20.00 5.00 23.00 N 1 0
139.512 45436.04 305.42 -12606.79 10.00 1.00 23.00 N 1 0
139.512 45428.92 301.09 -12599.31 20.00 5.00 25.00 N 1 0
162.569 49508.53 2044.34 -14009.68 10.00 1.00 24.00 N 1 0
162.569 49505.73 2042.26 -14008.04 20.00 5.00 18.00 N 1 0
ENDRECO

---------

Explosion record
Time / xyz / duration / ? / radius / N / 1 / 0

===================================================================================

WEATHERX
CONSTWIND 0.000000m/s 0.000000m/s 0.000000m/s
VISIBILIT 20000.000000m
ENDWEATHER
SLDCLOUD
0 12
Surf

#NOTE .srf goes here, with vertices for all clouds, then connects all vertices into cloud shapes. Only geometry stored, and shaded by the game into cloud volumes

-------------------------
-------------------------

The old cloud renderer from 2004 is still valid in 2015:

CLOUDCFG
1
4
255 0 0
20000.0 4000.000000 -20000.0
20000.0 40000.000000 20000.0
-20000.0 4000.000000 20000.0
-20000.0 000.000000 -20000.0

----------------------
Number of blocks
Number of vertices in this block
Colour
List of vertices

--
This type of cloud has a render range of just over 18km at screen center (longer range toward screen edges)
Loading replays on servers: YS throws an error when aircraft replays are loaded, but it runs fine as long as the NUMRECOR for the aircraft is less than or equal to 1536. If NUMRECOR is greater than or equal to 1537, the aircraft just won't show up online (but works fine offline)
Clouds and EVTBLOCKs are not transferred from server to client. Clients grab the current wind at login, but further wind EVTs don't update it
Actual UltraViolet
Image Image
Image
I stole your turnip. Now you must come and defend your honour. ~ Hank Green
User avatar
Flake
VFA-49
VFA-49
Posts: 4375
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 861 times
Been thanked: 1279 times
Contact:

[Request] .yfs file parameters

Post by Flake »

waspe414 wrote:[post]90235[/post] AIRCRAFT
-----------------------------

34.094
45693.328 2.056 -10563.98 -1.7453 0.0247 0.0 0.0
6 255 255 255 255 199 0 0 240 10 0 0 0 0 0 0 0 0
0 0.0000 0.0000 0
If you were to split each value by a space, ignoring new lines from top (34.094) being value 0, to bottom (0) being value 26...

Aircraft timestamp info, straight from my debug the other week for loading replays into OYS:

Code: Select all

                    //RecordArray[0] = Input[0].Split(' ')[0];    //TimeStamp
                    
                    //RecordArray[1] = Input[1].Split(' ')[0];    //PosX - Float
                    //RecordArray[2] = Input[1].Split(' ')[1];    //PosY - Float
                    //RecordArray[3] = Input[1].Split(' ')[2];    //PosZ - Float
                    //RecordArray[4] = Input[1].Split(' ')[3];    //HdgX - Float
                    //RecordArray[5] = Input[1].Split(' ')[4];    //HdgY - Float
                    //RecordArray[6] = Input[1].Split(' ')[5];    //HdgZ - Float
                    //RecordArray[7] = Input[1].Split(' ')[6];    //LoadFactor - Float

                    //RecordArray[8]  = Input[2].Split(' ')[0];   //AirState Direct
                    //RecordArray[9] = Input[2].Split(' ')[1];   //VGW 0-255
                    //RecordArray[10] = Input[2].Split(' ')[2];   //Boards 0-255
                    //RecordArray[11] = Input[2].Split(' ')[3];   //Gear 0-255
                    //RecordArray[12] = Input[2].Split(' ')[4];   //Flap 0-255
                    //RecordArray[13] = Input[2].Split(' ')[5];   //Brake 0-255
                    //RecordArray[14] = Input[2].Split(' ')[6];   //Smoke 0-255
                    //RecordArray[15] = Input[2].Split(' ')[7];   //??? - Leave 0
                    //RecordArray[16] = Input[2].Split(' ')[8];   //Animation flags (Lights, gun, contrails, burners)
                    //RecordArray[17] = Input[2].Split(' ')[9];   //Strength 0-255
                    //RecordArray[18] = Input[2].Split(' ')[10];  //Throttle 0-100
                    //RecordArray[19] = Input[2].Split(' ')[11];  //Elevator - Signed Byte -100 to +100.
                    //RecordArray[20] = Input[2].Split(' ')[12];  //Aileron - Signed Byte  -100 to +100.
                    //RecordArray[21] = Input[2].Split(' ')[13];  //Rudder - Signed Byte -100 to +100.
                    //RecordArray[22] = Input[2].Split(' ')[14];  //Trim - Signed Byte -100 to +100.
                    //RecordArray[23] = Input[2].Split(' ')[15];  //Thrust Vector 0-100
                    //RecordArray[24] = Input[2].Split(' ')[16];  //Thrust Reverse 0-100
                    //RecordArray[25] = Input[2].Split(' ')[17];  //Bomb Bay 0-100

                    //RecordArray[26] = Input[3].Split(' ')[0];   //Terminator, leave as 0
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!
User avatar
decaff_42
Staff
Staff
Posts: 3838
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 844 times
Been thanked: 1726 times
Contact:

[Request] .yfs file parameters

Post by decaff_42 »

Thanks for the info guys! This is super helpful. I noticed that in some tests the throttle would fluctuate and a single image wouldn't get that very well. The .yfs throttle lets me average the throttle level over a cycle, getting good data!

@ Flake, Just a note about the throttle level. It seems that the .yfs file only allows 0-99 for that entry. I had a ground test at mil power and it read 99 rather than 100.

I'm saving the .yfs files now. In the future I may make a tool that will allow me to extract all kinds of information to examine flaps, brake, gear performance, etc.

One interesting thing I found while trying to find the max speed (By starting above it and then going into autopilot) was that the autopilot only commanded 98, but I could take control and command 99 throttle level.

Because of the fluctuating throttle I decided to go back and redo the points I already got, and the extra practice I have now helped me get the points much faster.
Check out my website YSDecaff for all my tutorials and addon releases.
Visit my GitHub page for Python codes: https://github.com/decaff42?tab=repositories

YSFlight Addon Database - Find links to nearly every addon made for YSFlight!
Submit Addon To Database
Grigor
Contributor
Contributor
Posts: 201
Joined: Wed Mar 16, 2011 7:57 am
Favorite Aircraft: Ball-Bartoe Jetwing
OS: Windows XP
Has thanked: 58 times
Been thanked: 122 times

Re: [Request] .yfs file parameters

Post by Grigor »

This is interesting! Possibly the basis for a piggyback program that involves missions / credits / buying better planes and weapons with credits etc... A sense of CONTINUITY rather than a series of random flights. For single player, of course...

By the way, does anyone know what the KILLCREDIT 1 5 number represent? They don't seem to correlate... will check it out.
User avatar
decaff_42
Staff
Staff
Posts: 3838
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 844 times
Been thanked: 1726 times
Contact:

Re: [Request] .yfs file parameters

Post by decaff_42 »

For continuity, here's a link to some of the results of this testing.

I'm working on a new effort to understand lift and drag. I've done some better preparation and right now I'm writing a test plan and working on figuring out what data I actually need and how to reduce errors. I am writing a longish (already 15 pages of content with a few for titles and lists) document with my preparation, plan and results.

I wrote a python code to calculate a whole mess of parameters from the YFS file (such as Angle of Attack and Angle of Side Slip and their first and second derivatives) so I plan on modifying that code to calculate only the small subset of parameters I actually need for the different test objectives.

If someone would like to help develop the plan and do some of the test flights, please contact me via PM so we can discuss things. Looking ahead I know this will be an intensive project.
Check out my website YSDecaff for all my tutorials and addon releases.
Visit my GitHub page for Python codes: https://github.com/decaff42?tab=repositories

YSFlight Addon Database - Find links to nearly every addon made for YSFlight!
Submit Addon To Database
User avatar
decaff_42
Staff
Staff
Posts: 3838
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 844 times
Been thanked: 1726 times
Contact:

Re: [Request] .yfs file parameters

Post by decaff_42 »

Pardon the additional Necro, but with the compilation of information in my YFS2CSV program I thought I'd directly share the information about the YFS parameters that are stored in the YFS File. Please not that this takes largely from Waspe414's post and is expanded in areas to indicate directions and values for certain things.

Code: Select all

  A. Time Step
-------------------------------------------------------------------------------
Looking at any output data it is possible to see that the YFS recording does
not proceed with a consistant time change between recorded data. This is a
method of space-saving and only when there are change to the aircraft's state,
position or orientation, will data be recorded.


  B. Parameter Descriptions
-------------------------------------------------------------------------------
+-----------+---------+------------------------------------------------------+
| Parameter | Units   | Description                                          |
+-----------+---------+------------------------------------------------------+
| Time      | Seconds | The truncated time of the recorded slice of data.    |
|           |         | Time may go out to three decimal places.             |
+-----------+---------+------------------------------------------------------+
| X-Pos     | Meters  | The X-direction coordinate of the aircraft's         |
|           |         | position. Positive X values are to the East of the   |
|           |         | map center, while negative X values are to the       |
|           |         | West of the map center.                              |
+-----------+---------+------------------------------------------------------+
| Y-Pos     | Meters  | The Y-direction coordinate of the aircraft's         |
|           |         | position. Also the altitude of the aircraft.         |
+-----------+---------+------------------------------------------------------+
| Z-Pos     | Meters  | The Z-direction coordinate of the aircraft's         |
|           |         | position. Positive Z values are to the North of      |
|           |         | the map center, while negative Z values are to       |
|           |         | the South of the map center.                         |
+-----------+---------+------------------------------------------------------+
| Compass   | Radians | The Compass Heading of the aircraft with 0 being     |
| Heading   |         | due North. Value ranges between -pi/2 to pi/2,       |
|           |         | which both represent due south. Positive values are  |
|           |         | for when the aircraft is pointed east of north.      |
+-----------+---------+------------------------------------------------------+
| Pitch     | Radians | The Pitch Angle of the aircraft. Positive when nose  |
| Angle     |         | is towards the sky, negative when the nose is        |
|           |         | pointed towards the ground. 0 is when the            |
|           |         | aircraft is pointed at the horizon. Value ranges     |
|           |         | from -pi/2 to pi/2.                                  |
+-----------+---------+------------------------------------------------------+
| Bank      | Radians | Rotation of aircraft about nose-to-tail axis.        |
| Angle     |         | Turn to the left is a positive value and a turn      |
|           |         | to the right is a negative value. 0 is when the      |
|           |         | aircraft is upright and wings-level. Value           |
|           |         | ranges from -pi/2 to pi/2.                           |
|           |         | Note: Breaks Right Hand Rule Convention              |
+-----------+---------+------------------------------------------------------+
| G         | N/A     | The G-load on the aircraft. Positive or negative.    |
|           |         | Only goes to one decimal place.                      |
+-----------+---------+------------------------------------------------------+
| Flight    | N/A     | 0 = Flying                                           |
| State     |         | 1 = Rolling                                          |
|           |         | 2 = Stalled                                          |
|           |         | 3 = [Unknown]                                        |
|           |         | 4 = Dead                                             |
|           |         | 5 = Aircraft On Fire                                 |
|           |         | 6 = Stopped                                          |
+-----------+---------+------------------------------------------------------+
| VGW       | N/A     | The position of the Variable Geometry Wing on the    |
|           |         | aircraft. Value goes from 0 (Swept back) to 255      |
|           |         | (Swept forward).                                     |
+-----------+---------+------------------------------------------------------+
| Airbrake  | N/A     | Position of the spoilers. 0 is retracted, 255 is     |
|           |         | fully deployed.                                      |
+-----------+---------+------------------------------------------------------+
| Flaps     | N/A     | Position of the flaps. 0 is retracted, 255 is fully  |
|           |         | deployed. Default Values:                            |
|           |         | 0 = Flaps Retracted                                  |
|           |         | 63 = 1/4 Deployed                                    |
|           |         | 127 = Half Deployed                                  |
|           |         | 191 = 3/4 Deployed                                   |
|           |         | 255 = Fully Deployed                                 |
+-----------+---------+------------------------------------------------------+
| Landing   | N/A     | Position of the landing gear. 0 is fully retracted   |
| Gear      |         | and 255 is fully deployed down.                      |
+-----------+---------+------------------------------------------------------+
| Brakes    | N/A     | Value of brake application from 0 (not on) to        |
|           |         | 255 (full braking).                                  |
+-----------+---------+------------------------------------------------------+
| Smoke     | N/A     | Boolean Value: 0 = OFF, 1 = ON.                      |
+-----------+---------+------------------------------------------------------+
| Vapor     | N/A     | Boolean Value: 0 = OFF, 1 = ON.                      |
| Trail     |         |                                                      |
+-----------+---------+------------------------------------------------------+
| Misc      | N/A     | The SUM of the following values to determine         |
|           |         | other aircraft conditions:                           |
|           |         | 1 = Afterburner ON                                   |
|           |         | 4 = Velocity Indicator                               |
|           |         | 8 = Overrun                                          |
|           |         | 16 = Beacon Lights ON                                |
|           |         | 32 = Navigation Lights ON                            |
|           |         | 64 = Strobe Lights ON                                |
|           |         | 128 = Landing Lights ON                              |
+-----------+---------+------------------------------------------------------+
| Strength  | N/A     | Strength of the aircraft. When this value reaches    |
|           |         | 0, the aircraft is "killed".                         |
+-----------+---------+------------------------------------------------------+
| Throttle  | N/A     | The throttle position of the aircraft. Note this is  |
|           |         | slaved to the thrust reverser, so as that spools     |
|           |         | up, so will the throttle. Values from 0 (No Thrust)  |
|           |         | to 99 (Maximum Thrust). Even in different stages     |
|           |         | of Afterburner, these values will still be used.     |
+-----------+---------+------------------------------------------------------+
| Elevator  | N/A     | The position of the Elevator. Values go from         |
|           |         | -99 to +99 with 0 being the neutral position.        |
|           |         | Positive values indicated a pitch up elevator        |
|           |         | position.                                            |
+-----------+---------+------------------------------------------------------+
| Aileron   | N/A     | Aileron Position with 0 being neutral. Left roll     |
|           |         | is a positive value, right roll is a negative value. |
|           |         | Values are from -99 to 99.                           |
+-----------+---------+------------------------------------------------------+
| Rudder    | N/A     | Ruder Position with 0 being neutral. Left turn       |
|           |         | is a positive value, right turn is a negative value. |
|           |         | Values are from -99 to 99.                           |
+-----------+---------+------------------------------------------------------+
| Thrust    | N/A     | Thrust Vectoring Control. Values from 0 to 99:       |
| Vector    |         | 0 = Forward Thrust                                   |
|           |         | 9 = 1st Step                                         |
|           |         | 19 = 2nd Step                                        |
|           |         | 29 = 3rd Step                                        |
|           |         | 39 = 4th Step                                        |
|           |         | 49 = 5th Step                                        |
|           |         | 59 = 6th Step                                        |
|           |         | 69 = 7th Step                                        |
|           |         | 79 = 8th Step                                        |
|           |         | 89 = 9th Step                                        |
|           |         | 99 = Full Thrust Vector                              |
+-----------+---------+------------------------------------------------------+
| Reverse   | N/A     | Thrust Reverse Command. Requires DAT file            |
| Thrust    |         | to slave in the Throttle. 0 (No Reverse) to 99       |
|           |         | (Full Reverse).                                      |
+-----------+---------+------------------------------------------------------+
| Bomb      | N/A     | Bomb Bay Position (0 = Closed, 99 = Open)            |
| Bay       |         |                                                      |
+-----------+---------+------------------------------------------------------+
| Turrets   | N/A     | [Unknown] Aircraft with more turrets will have       |
|           |         | extra columns with no header.                        |
+-----------+---------+------------------------------------------------------+
Check out my website YSDecaff for all my tutorials and addon releases.
Visit my GitHub page for Python codes: https://github.com/decaff42?tab=repositories

YSFlight Addon Database - Find links to nearly every addon made for YSFlight!
Submit Addon To Database
User avatar
Strava
Rookie
Rookie
Posts: 32
Joined: Fri Nov 17, 2017 11:47 am
Favorite Aircraft: Piper Cub
Location: Ohio
OS: Windows 7 HP
Has thanked: 11 times
Been thanked: 18 times

Re: [Request] .yfs file parameters

Post by Strava »

Is there an event command that would allow changing the LIGHTSRCD value?
Changed at intervals, this could be used to simulate time of day.
Or just set it once to get the light where you want it.

I like the way the shading looks with the light at a low angle.
This setting is the right angle for sunset in November:
LIGHTSRCD -0.920000 0.100000 -0.390000
User avatar
Flake
VFA-49
VFA-49
Posts: 4375
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 861 times
Been thanked: 1279 times
Contact:

Re: [Request] .yfs file parameters

Post by Flake »

Ooooh that's real clever, I didn't know you could set the light source direction so accurately. Is this a 2015+/OpenGL2 variable or can we use that in 2011 and back?

My understanding is that this sets the light source direction, not the lighting type. Sadly, only way to set day/night is on an open source server.
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!
User avatar
Strava
Rookie
Rookie
Posts: 32
Joined: Fri Nov 17, 2017 11:47 am
Favorite Aircraft: Piper Cub
Location: Ohio
OS: Windows 7 HP
Has thanked: 11 times
Been thanked: 18 times

Re: [Request] .yfs file parameters

Post by Strava »

I am running the 20150425 windows version of YSF.
The LIGHTSRCD variable is in the flight.cfg file.
It's where all the settings are saved from options>config.
And that's the problem.
Every time I change an option the lightsrcd gets reset to one of the preset choices and I have to edit flight.cfg to put my value back in. That is why I am looking for an alternate way to set it.
User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1485
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 1051 times
Been thanked: 339 times

Re: [Request] .yfs file parameters

Post by u2fly »

Strava wrote: Sat Nov 18, 2017 3:51 pmThe LIGHTSRCD variable is in the flight.cfg file.
Yeah, LIGHTSRCD is part of flight.cfg and is NOT a part of .YFS file format.

So, the only solution could be ask Soji Yamakawa for making such variable for next versions of YSFlight.

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”

pic.twitter.com/vkz0gdozVV [archived]
(31 DEC 2016)
User avatar
decaff_42
Staff
Staff
Posts: 3838
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 844 times
Been thanked: 1726 times
Contact:

Re: [Request] .yfs file parameters

Post by decaff_42 »

Posting here for the alert, will also update the post from waspe/UV above.

Flight State 5 is when the aircraft is on fire, but the player is still in the aircraft. UV's testing shows that this locks the player from the F1 views.
Check out my website YSDecaff for all my tutorials and addon releases.
Visit my GitHub page for Python codes: https://github.com/decaff42?tab=repositories

YSFlight Addon Database - Find links to nearly every addon made for YSFlight!
Submit Addon To Database
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests