dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
mappointitem.cpp
Go to the documentation of this file.
1 
12 /*
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 3 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 * for more details.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, see <http://www.gnu.org/licenses/>
25 */
26 #include "mappointitem.h"
27 
28 namespace mapcontrol
29 {
30  void MapPointItem::SetAltitude(const float &value)
31  {
32  if(altitude==value)
33  return;
34  altitude=value;
35  this->update();
36  }
37 
38  void MapPointItem::setRelativeCoord(distBearingAltitude value)
39  {
40  relativeCoord=value;
41  this->update();
42  }
43 
44  void MapPointItem::SetCoord(const internals::PointLatLng &value)
45  {
46  if(coord == value)
47  return;
48  coord = value;
49  distBearingAltitude back=relativeCoord;
50  if(qAbs(back.bearing-relativeCoord.bearing)>0.01 || qAbs(back.distance-relativeCoord.distance)>0.1)
51  {
52  relativeCoord=back;
53  }
54  this->update();
55  }
56  void MapPointItem::SetDescription(const QString &value)
57  {
58  if(description==value)
59  return;
60  description=value;
61  this->update();
62  }
63 
64 
71  {
73  }
74 
75 
82  double MapPointItem::DistanceToPoint_3D(const internals::PointLatLng &coord2, const int &altitude2)
83  {
85  }
86 
87 
88 
89 }
internals::PointLatLng coord
Definition: mappointitem.h:109
double DistanceToPoint_3D(const internals::PointLatLng &coord, const int &altitude)
MapPointItem::DistanceToPoint_3D Calculates distance from this point to second point.
distBearingAltitude relativeCoord
Definition: mappointitem.h:111
A graphicsItem representing a MapPointItem.
double DistanceToPoint_2D(const internals::PointLatLng &coord)
MapPointItem::DistanceToPoint_2D Calculates distance from this point to second point.
static double DistanceBetweenLatLngAlt(PointLatLng const &p1, double const &alt1, PointLatLng const &p2, double const &alt2)
PureProjection::DistanceBetweenLatLngAlt Returns 3D distance between two geodetic points...
static double DistanceBetweenLatLng(PointLatLng const &p1, PointLatLng const &p2)
PureProjection::DistanceBetweenLatLng Returns 2D distance between two geodetic points.