6 #include <Main/fg_props.hxx>
7 #include <simgear/props/tiedpropertylist.hxx>
17 Hitch(const char *name);
20 // Externally set values
21 void setPosition(float* position);
22 void setOpen(bool isOpen);
23 //void setName(const char *text);
25 void setTowLength(float length);
26 void setTowElasticConstant(float sc);
27 void setTowBreakForce(float bf);
28 void setTowWeightPerM(float rw);
29 void setWinchMaxSpeed(float mws);
30 void setWinchRelSpeed(float rws);
31 void setWinchPosition(double *winchPosition); //in global coordinates!
32 void setWinchPositionAuto(bool doit);
33 void findBestAIObject(bool doit,bool running_as_autoconnect=false);
34 void setWinchInitialTowLength(float length);
35 void setWinchPower(float power);
36 void setWinchMaxForce(float force);
37 void setWinchMaxTowLength(float length);
38 void setWinchMinTowLength(float length);
39 void setMpAutoConnectPeriod(float dt);
40 void setForceIsCalculatedByOther(bool b);
42 void setGlobalGround(double *global_ground, float *global_vel);
44 void getPosition(float* out);
45 float getTowLength(void);
47 void calcForce(Ground *g_cb, RigidBody* body, State* s);
49 // Computed values: total force
50 void getForce(float* force, float* off);
52 void integrate (float dt);
54 std::string getConnectedPropertyNode() const;
55 void setConnectedPropertyNode(const char *nodename);
62 float _towElasticConstant;
67 float _winchInitialTowLength;
68 float _winchMaxTowLength;
69 float _winchMinTowLength;
72 float _winchActualForce;
75 float _towEndForce[3];
76 float _reportTowEndForce[3];
77 float _forceMagnitude;
78 double _global_ground[4];
83 float _timeLagCorrectedDist;
84 SGPropertyNode_ptr _towEndNode;
85 const char *_towEndPropertyName;
86 bool _towEndIsConnectedToProperty;
87 bool _nodeIsMultiplayer;
88 bool _nodeIsAiAircraft;
89 bool _forceIsCalculatedByMaster;
91 //const char *_ai_MP_callsign;
93 float _mpAutoConnectPeriod;
94 float _timeToNextAutoConnectTry;
95 float _timeToNextReConnectTry;
96 float _height_above_ground;
97 float _winch_height_above_ground;
99 float _lowest_tow_height;
100 float _speed_in_tow_direction;
102 float _mp_last_reported_dist;
103 float _mp_last_reported_v;
109 bool _mp_open_last_state;
111 bool _displayed_len_lower_dist_message;
114 SGPropertyNode_ptr _node;
115 simgear::TiedPropertyList _tiedProperties;
118 }; // namespace yasim