32 static const double GLOBE_RADIUS;
35 double _speedLon, _speedLat, _speedRadian;
36 double _meetPointLon, _meetPointLat;
47 virtual void load(
const YAML::Node& node);
49 virtual YAML::Node
save()
const;
bool reachedDestination() const
Has the moving target reached its destination?
Definition: MovingTarget.cpp:187
virtual void calculateSpeed()
Calculates a new speed vector to the destination.
Definition: MovingTarget.cpp:157
void setSpeed(int speed)
Sets the moving target's speed.
Definition: MovingTarget.cpp:143
virtual void load(const YAML::Node &node)
Loads the moving target from YAML.
Definition: MovingTarget.cpp:56
double getMeetLatitude() const
Returns the latitude of the meeting point.
Definition: MovingTarget.cpp:280
double getSpeedRadian() const
Gets the moving target's radial speed.
Definition: MovingTarget.cpp:132
virtual void setDestination(Target *dest)
Sets the moving target's destination.
Definition: MovingTarget.cpp:96
int getSpeed() const
Gets the moving target's speed.
Definition: MovingTarget.cpp:123
double getMeetLongitude() const
Returns the longitude of the meeting point.
Definition: MovingTarget.cpp:289
void calculateMeetPoint()
Calculate meeting point with the target.
Definition: MovingTarget.cpp:220
virtual ~MovingTarget()
Cleans up the moving target.
Definition: MovingTarget.cpp:37
Target * getDestination() const
Gets the moving target's destination.
Definition: MovingTarget.cpp:87
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:199
Base class for targets on the globe with a set of radian coordinates.
Definition: Target.h:33
Definition: BaseInfoState.cpp:40
virtual YAML::Node save() const
Saves the moving target to YAML.
Definition: MovingTarget.cpp:69