13#include <simgear/compiler.h>
29 std::string_view
getTypeString(
void)
const override {
return "escort"; }
35 void update(
double dt)
override;
38 void setStnRange(
double r);
39 void setStnBrg(
double y);
40 void setStationSpeed();
41 void setStnLimit(
double l);
42 void setStnAngleLimit(
double l);
43 void setStnSpeed(
double s);
44 void setStnHtFt(
double h);
45 void setStnPatrol(
bool p);
46 void setStnDegTrue(
bool t);
49 void setMaxSpeed(
double m);
50 void setUpdateInterval(
double i);
52 void RunEscort(
double dt);
54 bool getGroundElev(SGGeod inpos);
56 SGVec3d getCartHitchPosAt(
const SGVec3d& off)
const;
60 double calcTrueBearingDeg(
double bearing,
double heading);
66 double _tgtrange = 0.0;
68 double _ht_agl_ft = 0.0;
70 double _parent_speed = 0.0;
71 double _parent_hdg = 0.0;
72 double _interval = 0.0;
74 double _stn_relbrg = 0.0;
75 double _stn_truebrg = 0.0;
76 double _stn_brg = 0.0;
77 double _stn_range = 0.0;
78 double _stn_height = 0.0;
79 double _stn_speed = 0.0;
80 double _stn_angle_limit = 0.0;
81 double _stn_limit = 0.0;
83 bool _MPControl =
false;
85 bool _stn_deg_true =
false;
std::string_view getTypeString(void) const override
bool init(ModelSearchOrder searchOrder) override
void readFromScenario(SGPropertyNode *scFileNode) override
virtual ~FGAIEscort()=default
void update(double dt) override
FGAIShip(object_type ot=object_type::otShip)
static void calcRangeBearing(double lat1, double lon1, double lat2, double lon2, double &rangeNm, double &bearing)
calculate range and bearing of lat2/lon2 relative to lat1/lon1