// BMW F1 Suspension
//////////////////////////////////////////////////////////////////////////
//
// Conventions:
//
// +x = left
// +z = rear
// +y = up
// +pitch = nose up
// +yaw = nose right
// +roll = right
//
// [BODY]  - a rigid mass with mass and inertial properties
// [JOINT] - a ball joint constraining an offset of one body to an
//           offset of another body (eliminates 3 DOF)
// [HINGE] - a constraint restricting the relative rotations of two
//           bodies to be around a single axis (eliminates 2 DOF).
// [BAR]   - a constraint holding an offset of one body from an offset of
//           another body at a fixed distance (eliminates 1 DOF).
// [JOINT&HINGE] - both the joint and hinge constraints, forming the
//           conventional definition of a hinge (eliminates 5 DOF).
//
//////////////////////////////////////////////////////////////////////////

// Body including all rigidly attached parts (wings, barge boards, etc.)
[BODY]
name=body mass=(0.0) inertia=(0.0,0.0,0.0)
pos=(0.0,0.0,0.0) ori=(0.0,0.0,0.0)

// Front spindles
[BODY]
name=fl_spindle mass=(6.00) inertia=(0.0200,0.0185,0.0170)
pos=(0.63,0.0,-1.65) ori=(0.0,0.0,0.0)

[BODY]
name=fr_spindle mass=(6.00) inertia=(0.0200,0.0185,0.0170)
pos=(-0.63,0.0,-1.65) ori=(0.0,0.0,0.0)

// Front wheels
[BODY]
name=fl_wheel mass=(17.10) inertia=(0.9270,0.6529,0.6529)
pos=(0.707,0.0,-1.65) ori=(0.0,0.0,0.0)

[BODY]
name=fr_wheel mass=(17.10) inertia=(0.9270,0.6529,0.6529)
pos=(-0.707,0.0,-1.65) ori=(0.0,0.0,0.0)

// Rear spindles
[BODY]
name=rl_spindle mass=(6.50) inertia=(0.0205,0.0190,0.0175)
pos=(0.635,0.0,1.395) ori=(0.0,0.0,0.0)

[BODY]
name=rr_spindle mass=(6.50) inertia=(0.0205,0.0190,0.0175)
pos=(-0.635,0.0,1.395) ori=(0.0,0.0,0.0)

// Rear wheels (includes half of rear-axle)
[BODY]
name=rl_wheel mass=(19.80) inertia=(1.1083,0.8029,0.8029)
pos=(0.685,0.0,1.395) ori=(0.0,0.0,0.0)

[BODY]
name=rr_wheel mass=(19.80) inertia=(1.1083,0.8029,0.8029)
pos=(-0.685,0.0,1.395) ori=(0.0,0.0,0.0)

// Fuel in tank is not rigidly attached - it is attached with springs and
// dampers to simulate movement.  Properties are defined in the HDV file.
[BODY]
name=fuel_tank mass=(1.00) inertia=(1.0,1.0,1.0)
pos=(0.0,0.0,0.0) ori=(0.0,0.0,0.0)

// Driver's head is not rigidly attached, and it does NOT affect the vehicle
// physics.  Position is from the eyepoint defined in the VEH file, while
// other properties are defined in the head physics file.
[BODY]
name=driver_head mass=(5.85) inertia=(0.032,0.024,0.028)
pos=(0.0,0.0,0.0) ori=(0.0,0.0,0.0)

//////////////////////////////////////////////////////////////////////////
//
// Constraints
//
//////////////////////////////////////////////////////////////////////////

// Front wheel and spindle connections
[JOINT&HINGE]
posbody=fl_wheel negbody=fl_spindle pos=fl_wheel axis=(-0.78,0.0,0.0)

[JOINT&HINGE]
posbody=fr_wheel negbody=fr_spindle pos=fr_wheel axis=( 0.78,0.0,0.0)


// Front left suspension (2 A-arms + 1 steering arm = 5 links)
// -----------------------------------------------------------

[BAR] // forward upper arm
name=fl_fore_upper posbody=body negbody=fl_spindle pos=(0.155,0.105,-1.66) neg=(0.602,0.105,-1.65)

[BAR] // rearward upper arm
posbody=body negbody=fl_spindle pos=(0.192,0.105,-1.14) neg=(0.602,0.105,-1.65)

[BAR] // forward lower arm
posbody=body negbody=fl_spindle pos=(0.000,-0.100,-1.66) neg=(0.616,-0.100,-1.65)

[BAR] // rearward lower arm
name=fl_fore_lower posbody=body negbody=fl_spindle pos=(0.192,-0.100,-1.140) neg=(0.616,-0.100,-1.65)

[BAR] // steering arm (must be named for identification)
name=fl_steering posbody=body negbody=fl_spindle pos=(0.152,0.105,-1.705) neg=(0.616,0.105,-1.750)


// Front right suspension (2 A-arms + 1 steering arm = 5 links)
// ------------------------------------------------------------

[BAR] // forward upper arm (used in steering lock calculation)
name=fr_fore_upper posbody=body negbody=fr_spindle pos=(-0.155,0.105,-1.66) neg=(-0.602,0.105,-1.65)

[BAR] // rearward upper arm
posbody=body negbody=fr_spindle pos=(-0.192,0.105,-1.14) neg=(-0.602,0.105,-1.65)

[BAR] // forward lower arm
name=fr_fore_lower posbody=body negbody=fr_spindle pos=(-0.000,-0.100,-1.66) neg=(-0.616,-0.100,-1.65)

[BAR] // rearward lower arm
posbody=body negbody=fr_spindle pos=(-0.192,-0.100,-1.140) neg=(-0.616,-0.100,-1.65)

[BAR] // steering arm (must be named for identification)
name=fr_steering posbody=body negbody=fr_spindle pos=(-0.152,0.105,-1.705) neg=(-0.616,0.105,-1.750)


// Rear left suspension (2 A-arms + 1 straight link = 5 links)
// -----------------------------------------------------------

[BAR] // forward upper arm
posbody=body negbody=rl_spindle pos=(0.180,0.100,1.015) neg=(0.650,0.150,1.395)

[BAR] // rearward upper arm
posbody=body negbody=rl_spindle pos=(0.050,0.080,1.395) neg=(0.650,0.150,1.395)

[BAR] // forward lower arm
posbody=body negbody=rl_spindle pos=(0.180,-0.050,0.915) neg=(0.660,-0.070,1.395)

[BAR] // rearward lower arm
posbody=body negbody=rl_spindle pos=(0.050,-0.050,1.395) neg=(0.660,-0.070,1.395)

[BAR] // straight link
posbody=body negbody=rl_spindle pos=(0.100,0.050,1.535) neg=(0.670,0.050,1.575)


// Rear right suspension (2 A-arms + 1 straight link = 5 links)
// ------------------------------------------------------------

[BAR] // forward upper arm
posbody=body negbody=rr_spindle pos=(-0.180,0.100,1.015) neg=(-0.650,0.150,1.395)

[BAR] // rearward upper arm
posbody=body negbody=rr_spindle pos=(-0.050,0.080,1.395) neg=(-0.650,0.150,1.395)

[BAR] // forward lower arm
posbody=body negbody=rr_spindle pos=(-0.180,-0.050,.915) neg=(-0.660,-0.070,1.395)

[BAR] // rearward lower arm
posbody=body negbody=rr_spindle pos=(-0.050,-0.050,1.395) neg=(-0.660,-0.070,1.395)

[BAR] // straight link
posbody=body negbody=rr_spindle pos=(-0.100,0.050,1.535) neg=(-0.670,0.050,1.575)

// Rear spindle and wheel connections
[JOINT&HINGE]
posbody=rl_wheel negbody=rl_spindle pos=rl_wheel axis=(-0.77,0.0,0.0)

[JOINT&HINGE]
posbody=rr_wheel negbody=rr_spindle pos=rr_wheel axis=( 0.77,0.0,0.0)
