mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-29 14:52:12 +01:00
OP37/GCS Added UAV overlay documentation
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1081 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
4774ed2164
commit
46fcdea93c
@ -57,28 +57,125 @@ namespace mapcontrol
|
||||
enum { Type = UserType + 2 };
|
||||
UAVItem(MapGraphicItem* map,OPMapWidget* parent);
|
||||
~UAVItem();
|
||||
/**
|
||||
* @brief Sets the UAV position
|
||||
*
|
||||
* @param position LatLng point
|
||||
* @param altitude altitude in meters
|
||||
*/
|
||||
void SetUAVPos(internals::PointLatLng const& position,int const& altitude);
|
||||
/**
|
||||
* @brief Sets the UAV heading
|
||||
*
|
||||
* @param value heading angle (north=0deg)
|
||||
*/
|
||||
void SetUAVHeading(qreal const& value);
|
||||
/**
|
||||
* @brief Returns the UAV position
|
||||
*
|
||||
* @return internals::PointLatLng
|
||||
*/
|
||||
internals::PointLatLng UAVPos()const{return coord;}
|
||||
/**
|
||||
* @brief Sets the Map follow type
|
||||
*
|
||||
* @param value can be "none"(map doesnt follow UAV), "CenterMap"(map moves to keep UAV centered) or "CenterAndRotateMap"(map moves and rotates to keep UAV centered and straight)
|
||||
*/
|
||||
void SetMapFollowType(UAVMapFollowType::Types const& value){mapfollowtype=value;}
|
||||
/**
|
||||
* @brief Sets the trail type
|
||||
*
|
||||
* @param value can be "NoTrail"(no trail is plotted), "ByTimeElapsed"(a trail point is plotted each TrailTime()) or ByDistance(a trail point is plotted if the distance between the UAV and the last trail point is bigger than TrailDistance())
|
||||
*/
|
||||
void SetTrailType(UAVTrailType::Types const& value);
|
||||
/**
|
||||
* @brief Returns the map follow method used
|
||||
*
|
||||
* @return UAVMapFollowType::Types
|
||||
*/
|
||||
UAVMapFollowType::Types GetMapFollowType()const{return mapfollowtype;}
|
||||
/**
|
||||
* @brief Returns the UAV trail type. It can be plotted by time elapsed or distance
|
||||
*
|
||||
* @return UAVTrailType::Types
|
||||
*/
|
||||
UAVTrailType::Types GetTrailType()const{return trailtype;}
|
||||
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
||||
QWidget *widget);
|
||||
void RefreshPos();
|
||||
QRectF boundingRect() const;
|
||||
/**
|
||||
* @brief Sets the trail time to be used if TrailType is ByTimeElapsed
|
||||
*
|
||||
* @param seconds the UAV trail time elapsed value. If the trail type is time elapsed
|
||||
* a trail point will be plotted each "value returned" seconds.
|
||||
*/
|
||||
void SetTrailTime(int const& seconds){trailtime=seconds;}
|
||||
/**
|
||||
* @brief Returns the UAV trail time elapsed value. If the trail type is time elapsed
|
||||
* a trail point will be plotted each "value returned" seconds.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
int TrailTime()const{return trailtime;}
|
||||
/**
|
||||
* @brief Sets the trail distance to be used if TrailType is ByDistance
|
||||
*
|
||||
* @param distance the UAV trail plot distance.
|
||||
* If the trail type is ByDistance a trail dot is plotted if
|
||||
* the distance between the current UAV position and the last trail point
|
||||
* is bigger than the returned value
|
||||
*/
|
||||
void SetTrailDistance(int const& distance){traildistance=distance;}
|
||||
/**
|
||||
* @brief Returns the UAV trail plot distance.
|
||||
* If the trail type is distance diference a trail dot is plotted if
|
||||
* the distance between the current UAV position and the last trail point
|
||||
* is bigger than the returned value
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
int TrailDistance()const{return traildistance;}
|
||||
/**
|
||||
* @brief Returns true if UAV trail is shown
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
bool ShowTrail()const{return showtrail;}
|
||||
/**
|
||||
* @brief Used to define if the UAV displays a trail
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
void SetShowTrail(bool const& value);
|
||||
/**
|
||||
* @brief Deletes all the trail points
|
||||
*/
|
||||
void DeleteTrail()const;
|
||||
/**
|
||||
* @brief Returns true if the UAV automaticaly sets WP reached value (changing its color)
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
bool AutoSetReached()const{return autosetreached;}
|
||||
/**
|
||||
* @brief Defines if the UAV can set the WP's "reached" value automaticaly.
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
void SetAutoSetReached(bool const& value){autosetreached=value;}
|
||||
/**
|
||||
* @brief Returns the 3D distance in meters necessary for the UAV to set WP's to "reached"
|
||||
*
|
||||
* @return double
|
||||
*/
|
||||
double AutoSetDistance()const{return autosetdistance;}
|
||||
/**
|
||||
* @brief Sets the the 3D distance in meters necessary for the UAV to set WP's to "reached"
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
void SetAutoSetDistance(double const& value){autosetdistance=value;}
|
||||
|
||||
int type() const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user