32 static const double GLOBE_RADIUS;
35 double _speedLon, _speedLat, _speedRadian;
36 double _meetPointLon, _meetPointLat;
50 virtual void load(
const YAML::Node& node);
52 virtual YAML::Node
save()
const;
bool reachedDestination() const
Has the moving target reached its destination?
Definition: MovingTarget.cpp:193
bool isMeetCalculated() const
Returns if the meeting point was calculated.
Definition: MovingTarget.cpp:314
virtual void calculateSpeed()
Calculates a new speed vector to the destination.
Definition: MovingTarget.cpp:163
void setSpeed(int speed)
Sets the moving target's speed.
Definition: MovingTarget.cpp:151
virtual void load(const YAML::Node &node)
Loads the moving target from YAML.
Definition: MovingTarget.cpp:46
double getMeetLatitude() const
Returns the latitude of the meeting point.
Definition: MovingTarget.cpp:291
double getSpeedRadian() const
Gets the moving target's radial speed.
Definition: MovingTarget.cpp:128
virtual void setDestination(Target *dest)
Sets the moving target's destination.
Definition: MovingTarget.cpp:86
int getSpeed() const
Gets the moving target's speed.
Definition: MovingTarget.cpp:119
double getMeetLongitude() const
Returns the longitude of the meeting point.
Definition: MovingTarget.cpp:300
void calculateMeetPoint()
Calculate meeting point with the target.
Definition: MovingTarget.cpp:226
static double calculateRadianSpeed(int speed)
Converts a speed to radians.
Definition: MovingTarget.cpp:140
virtual ~MovingTarget()
Cleans up the moving target.
Definition: MovingTarget.cpp:37
Target * getDestination() const
Gets the moving target's destination.
Definition: MovingTarget.cpp:77
void resetMeetPoint()
Reset meeting point calculation.
Definition: MovingTarget.cpp:309
MovingTarget()
Creates a moving target.
Definition: MovingTarget.cpp:30
Base class for moving targets on the globe with a certain speed and destination.
Definition: MovingTarget.h:29
void move()
Move towards the destination.
Definition: MovingTarget.cpp:205
Base class for targets on the globe with a set of radian coordinates.
Definition: Target.h:35
Definition: BaseInfoState.cpp:40
virtual YAML::Node save() const
Saves the moving target to YAML.
Definition: MovingTarget.cpp:59