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;
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
bool reachedDestination() const
Has the moving target reached its destination?
Definition: MovingTarget.cpp:193
virtual void load(const YAML::Node &node)
Loads the moving target from YAML.
Definition: MovingTarget.cpp:46
bool isMeetCalculated() const
Returns if the meeting point was calculated.
Definition: MovingTarget.cpp:314
Target * getDestination() const
Gets the moving target's destination.
Definition: MovingTarget.cpp:77
int getSpeed() const
Gets the moving target's speed.
Definition: MovingTarget.cpp:119
virtual void setDestination(Target *dest)
Sets the moving target's destination.
Definition: MovingTarget.cpp:86
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 YAML::Node save() const
Saves the moving target to YAML.
Definition: MovingTarget.cpp:59
virtual ~MovingTarget()
Cleans up the moving target.
Definition: MovingTarget.cpp:37
void resetMeetPoint()
Reset meeting point calculation.
Definition: MovingTarget.cpp:309
double getSpeedRadian() const
Gets the moving target's radial speed.
Definition: MovingTarget.cpp:128
MovingTarget()
Creates a moving target.
Definition: MovingTarget.cpp:30
double getMeetLongitude() const
Returns the longitude of the meeting point.
Definition: MovingTarget.cpp:300
double getMeetLatitude() const
Returns the latitude of the meeting point.
Definition: MovingTarget.cpp:291
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