10 // A launchbar has the following parameters:
12 // position: a point in the aircraft's local coordinate system where the
13 // fully-extended wheel will be found.
17 enum LBState { Arrested, Launch, Unmounted };
21 // Externally set values
22 void setLaunchbarMount(float* position);
23 void setHoldbackMount(float* position);
24 void setLength(float length);
25 void setDownAngle(float ang);
26 void setUpAngle(float ang);
27 void setExtension(float extension);
28 void setLaunchCmd(bool cmd);
29 void setGlobalGround(double *global_ground);
31 void getLaunchbarMount(float* out);
32 void getHoldbackMount(float* out);
33 float getLength(void);
34 float getDownAngle(void);
35 float getUpAngle(void);
36 float getExtension(void);
38 void getTipPosition(float* out);
39 void getTipGlobalPosition(State* s, double* out);
41 float getPercentPosOnCat(float* lpos, float off, float lends[2][3]);
42 void getPosOnCat(float perc, float* lpos, float* lvel,
43 float lends[2][3], float lendvels[2][3]);
45 // Takes a velocity of the aircraft relative to ground, a rotation
46 // vector, and a ground plane (all specified in local coordinates)
47 // and make a force and point of application (i.e. ground contact)
48 // available via getForce().
49 void calcForce(Ground *g_cb, RigidBody* body, State* s, float* lv, float* lrot);
51 // Computed values: total force, weight-on-wheels (force normal to
52 // ground) and compression fraction.
53 void getForce(float* force, float* off);
54 float getCompressFraction(void);
57 float _launchbar_mount[3];
58 float _holdback_mount[3];
60 float _holdback_length;
68 double _global_ground[4];
73 #endif // _LAUNCHBAR_HPP