12#include <simgear/sg_inlines.h>
25 std::string_view
getTypeString(
void)
const override {
return "wingman"; }
31 void update(
double dt)
override;
34 void formateToAC(
double dt);
35 void Break(
double dt);
39 double getDistanceToOffset()
const;
40 double getElevToOffset()
const;
42 double calcAngle(
double rangeM, SGGeod pos1, SGGeod pos2);
43 double calcDistanceM(SGGeod pos1, SGGeod pos2)
const;
55 SGPropertyNode_ptr user_WoW_node;
57 inline void setFormate(
bool f);
58 inline void setTgtHdg(
double hdg);
59 inline void setTgtSpd(
double spd);
60 inline void setBrkHdg(
double angle);
61 inline void setBrkAng(
double angle);
62 inline void setCoeffHdg(
double h);
63 inline void setCoeffPch(
double p);
64 inline void setCoeffBnk(
double r);
65 inline void setCoeffSpd(
double s);
67 inline bool getFormate()
const {
return _formate_to_ac; }
69 inline double getTgtHdg()
const {
return tgt_heading; }
70 inline double getTgtSpd()
const {
return tgt_speed; }
71 inline double getBrkAng()
const {
return _break_angle; }
73 inline SGVec3d getCartInPos(SGGeod in_pos)
const;
76void FGAIWingman::setFormate(
bool f)
81void FGAIWingman::setTgtHdg(
double h)
86void FGAIWingman::setTgtSpd(
double s)
91void FGAIWingman::setBrkHdg(
double a)
97void FGAIWingman::setBrkAng(
double a)
100 SG_NORMALIZE_RANGE(_break_angle, -180.0, 180.0);
103void FGAIWingman::setCoeffHdg(
double h)
108void FGAIWingman::setCoeffPch(
double p)
113void FGAIWingman::setCoeffBnk(
double b)
118void FGAIWingman::setCoeffSpd(
double s)
139SGVec3d FGAIWingman::getCartInPos(SGGeod in_pos)
const
141 SGVec3d cartPos = SGVec3d::fromGeod(in_pos);
FGAIBallistic(object_type ot=object_type::otBallistic)
void update(double dt) override
virtual ~FGAIWingman()=default
std::string_view getTypeString(void) const override
bool init(ModelSearchOrder searchOrder) override
void readFromScenario(SGPropertyNode *scFileNode) override