8 // A landing gear has the following parameters:
10 // position: a point in the aircraft's local coordinate system where the
11 // fully-extended wheel will be found.
12 // compression: a vector from position where a fully-compressed wheel
13 // will be, also in aircraft-local coordinates.
14 // spring coefficient: force coefficient along the compression axis, in
16 // damping coefficient: force per compression speed, in Ns/m
17 // static coefficient of friction: force along the ground plane exerted
18 // by a motionless wheel. A unitless scalar.
19 // dynamic coefficient of friction: force along the ground plane exerted
20 // by a sliding/skidding wheel.
21 // braking fraction: fraction of the dynamic friction that will be
22 // actually exerted by a rolling wheel
23 // rotation: the angle from "forward" by which the wheel is rotated
24 // around its compression axis. In radians.
30 // Externally set values
31 void setPosition(float* position);
32 void setCompression(float* compression);
33 void setSpring(float spring);
34 void setDamping(float damping);
35 void setStaticFriction(float sfric);
36 void setDynamicFriction(float dfric);
37 void setBrake(float brake);
38 void setRotation(float rotation);
39 void setExtension(float extension);
41 void getPosition(float* out);
42 void getCompression(float* out);
45 float getStaticFriction();
46 float getDynamicFriction();
51 // Takes a velocity of the aircraft relative to ground, a rotation
52 // vector, and a ground plane (all specified in local coordinates)
53 // and make a force and point of application (i.e. ground contact)
54 // available via getForce().
55 void calcForce(RigidBody* body, float* v, float* rot, float* ground);
57 // Computed values: total force, weight-on-wheels (force normal to
58 // ground) and compression fraction.
59 void getForce(float* force, float* contact);
61 float getCompressFraction();
64 float calcFriction(float wgt, float v);