The online racing simulator
// File format for CAR_info.bin files (LFS 0.5U15)
// -----------------------------------------------
// Note : Press letter O in the garage to export CAR_info.bin


offset  description

0       identifier : LFS_CI
6       0 byte
7       version : currently 1 - do not read file if increased
8       short car name (3 chars + zero)
12      byte : passengers - bit 0:driver, 1:front, 2:r_left,
                                3:r_midde, 4:r_right
13      0 byte
14      0 byte
15      0 byte

// Body matrix - 9 floats - in LFS, X right, Y forward, Z up

16      Body matrix : (a, d, g) is right vector,
                      (b, e, h) forward,
                      (c, f, i) up

// From this point, most values are 4 byte floating point or
   4 byte integer values

52      Reference point position in WORLD coordinates
                        x, y, z (integer : 65535=ONE)
64      CoG             position in WORLD coordinates
                        x, y, z (integer : 65535=ONE)
76      CoG relative to reference point, in LOCAL coordinates
                        x, y, z (float)
88      Fuel Tank Pos  rel to ref point, in LOCAL coordinates
                        x, y, z (float)

100     0
        0
        0

112     0
        0
        0
        0

// Now 4 aero blocks - rear wing, front wing,
                       undertray, body : 20 bytes each)

128     Position : x, y, z
        Lift : multiply by speed squared to get lift value
        Drag : multiply by speed squared to get drag value

// Moment of inertia matrix, required for dynamic modelling

208     moment of inertia matrix (9 floats : 36 bytes)
        0
        0
        0

256     max torque (Nm)
        @rpm
        max power (kW)
        @rpm

272     fuel litres
        mass total
        approx wheelbase in metres (at zero suspension compress)
        approx weight distribution (at zero suspension compress)

288     byte : number of forward gears
        byte : Drive - 1=rwd, 2=fwd, 3=all
        0 byte
        0 byte
292     torque split
        drivetrain efficiency
        0

304     reverse gear
        1st gear
        ...
        7th gear

336     final drive ratio
        0
        0
        0

352     parallel steer (1 = parallel)
        brake strength
        brake balance
        0

368     0
        0
        0
        0

// offset 384 - wheels : rear then front
                         left then right
                         128 bytes each

0       tyre type byte
        0 byte
        0 byte
        0 byte
4       pressure
        air temperature
        toe in

16      centre of contact patch (local coords x, y, x)
        unsprung mass

32      width of tyre
        sidewall height proportion of width
        rim radius
        rim width

48      spring constant (vertical, at wheel)
        damping - compression
        damping - rebound
        anti roll

64      camber
        inclination
        caster
        scrub radius

80      moment of inertia
        current suspension deflection (vertical, at wheel)
        maximum suspension deflection
        0

96      tyre spring constant at current deflection / temperature
        current vertical tyre deflection
        0
        0

112     0
        0
        0
    0
FGED GREDG RDFGDR GSFDG