// Porsche 911 B Series Development
// McPherson strut simulation front, semi-trailing arms rear
// 911_1c.pm - 
// rF version 
// Bristow 28 Dec 07
//////////////////////////////////////////////////////////////////////////
//
// 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=(16.0) inertia=(0.0375,0.0360,0.0345)
pos=(0.565,0.000,-1.293) ori=(0.0,0.0,0.0)

[BODY]
name=fr_spindle mass=(16.0) inertia=(0.0375,0.0360,0.0345)
pos=(-0.565,0.000,-1.293) ori=(0.0,0.0,0.0)

// Front wheels
[BODY]
name=fl_wheel mass=(22.0) inertia=(1.3000,0.7240,0.7240)
pos=(0.689,0.000,-1.293) ori=(0.0,0.0,0.0)

[BODY]
name=fr_wheel mass=(22.0) inertia=(1.3000,0.7240,0.7240)
pos=(-0.689,0.000,-1.293) ori=(0.0,0.0,0.0)

// Rear spindles
[BODY]
name=rl_spindle mass=(16.0) inertia=(0.0375,0.0360,0.0345)
pos=(0.592,0.000,0.975) ori=(0.0,0.0,0.0)

[BODY]
name=rr_spindle mass=(16.0) inertia=(0.0375,0.0360,0.0345)
pos=(-0.592,0.000,0.975) ori=(0.0,0.0,0.0)

// Rear wheels (includes half of rear-axle)
[BODY]
name=rl_wheel mass=(26.0) inertia=(1.4600,0.8750,0.8750)
pos=(0.680,0.000,0.975) ori=(0.0,0.0,0.0)

[BODY]
name=rr_wheel mass=(26.0) inertia=(1.4600,0.8750,0.8750)
pos=(-0.680,0.000,0.975) 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.0) inertia=(1.0000,1.0000,1.0000)
pos=(0.000,0.000,0.000) 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.0) inertia=(0.020,0.020,0.020)
pos=(0.000,0.000,0.000) 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.8,0.0,0.0)


[JOINT&HINGE]
posbody=fr_wheel negbody=fr_spindle pos=fr_wheel axis=(0.8,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=(-9.3248,-1.707,-1.264) neg=(0.4571,0.370,-1.254)

[BAR] // rearward upper arm
name=fl_rear_upper posbody=body negbody=fl_spindle pos=(-9.3248,-1.707,-1.244) neg=(0.4571,0.370,-1.254)

[BAR] // forward lower arm
name=fl_fore_lower posbody=body negbody=fl_spindle pos=(0.2621,-0.124,-1.306) neg=(0.5621,-0.124,-1.306)

[BAR] // rearward lower arm
name=fl_rear_lower posbody=body negbody=fl_spindle pos=(0.2621,-0.124,-1.606) neg=(0.5621,-0.124,-1.306)

[BAR] // steering arm (must be named for identification)
name=fl_steering posbody=body negbody=fl_spindle pos=(0.2621,-0.124,-1.193) neg=(0.5621,-0.124,-1.193)

// 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=(9.3248,-1.707,-1.264) neg=(-0.4571,0.370,-1.254)

[BAR] // rearward upper arm
name=fr_rear_upper posbody=body negbody=fr_spindle pos=(9.3248,-1.707,-1.244) neg=(-0.4571,0.370,-1.254)

[BAR] // forward lower arm
name=fr_fore_lower posbody=body negbody=fr_spindle pos=(-0.2621,-0.124,-1.306) neg=(-0.5621,-0.124,-1.306)

[BAR] // rearward lower arm
name=fr_rear_lower posbody=body negbody=fr_spindle pos=(-0.2621,-0.124,-1.606) neg=(-0.5621,-0.124,-1.306)

[BAR] // steering arm (must be named for identification)
name=fr_steering posbody=body negbody=fr_spindle pos=(-0.2621,-0.124,-1.193) neg=(-0.5621,-0.124,-1.193)

// Rear left suspension (2 A-arms + 1 straight link = 5 links)
[BAR] // forward upper arm
name=rl_fore_upper posbody=body negbody=rl_spindle pos=(0.5570,-0.012,0.539) neg=(0.5570,0.030,0.975)

[BAR] // rearward upper arm
name=rl_rear_upper posbody=body negbody=rl_spindle pos=(0.2050,-0.012,0.635) neg=(0.5570,0.030,0.975)

[BAR] // forward lower arm
name=rl_fore_lower posbody=body negbody=rl_spindle pos=(0.5570,-0.012,0.539) neg=(0.5570,-0.030,0.975)

[BAR] // rearward lower arm
name=rl_rear_lower posbody=body negbody=rl_spindle pos=(0.2050,-0.012,0.635) neg=(0.5570,-0.030,0.975)

[BAR] // straight link
posbody=body negbody=rl_spindle pos=(0.1871,-0.012,0.635) neg=(0.5570,-0.030,1.125)

// Rear right suspension (2 A-arms + 1 straight link = 5 links)
[BAR] // forward upper arm
name=rr_fore_upper posbody=body negbody=rr_spindle pos=(-0.5570,-0.012,0.539) neg=(-0.5570,0.030,0.975)

[BAR] // rearward upper arm
name=rr_rear_upper posbody=body negbody=rr_spindle pos=(-0.2050,-0.012,0.635) neg=(-0.5570,0.030,0.975)

[BAR] // forward lower arm
name=rr_fore_lower posbody=body negbody=rr_spindle pos=(-0.5570,-0.012,0.539) neg=(-0.5570,-0.030,0.975)

[BAR] // rearward lower arm
name=rr_rear_lower posbody=body negbody=rr_spindle pos=(-0.2050,-0.012,0.635) neg=(-0.5570,-0.030,0.975)

[BAR] // straight link
posbody=body negbody=rr_spindle pos=(-0.1871,-0.012,0.635) neg=(-0.5570,-0.030,1.125)

// Rear spindle and wheel connections
[JOINT&HINGE]
posbody=rl_wheel negbody=rl_spindle pos=rl_wheel axis=(-0.8,0.0,0.0)

[JOINT&HINGE]
posbody=rr_wheel negbody=rr_spindle pos=rr_wheel axis=(0.8,0.0,0.0)

