mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-27 16:54:15 +01:00
OP-1170 Removed all compiler warnings from opmapcontrol library.
This commit is contained in:
parent
36307100f0
commit
ae72735a50
@ -211,6 +211,7 @@ inline QString msgSendArgumentFailed()
|
||||
|
||||
void mainMessageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg)
|
||||
{
|
||||
Q_UNUSED(context);
|
||||
QFile file(QDir::tempPath() + "/gcs.log");
|
||||
|
||||
if (file.open(QIODevice::Append | QIODevice::Text)) {
|
||||
|
@ -34,7 +34,7 @@ using namespace projections;
|
||||
|
||||
namespace internals {
|
||||
Core::Core() : MouseWheelZooming(false), currentPosition(0, 0), currentPositionPixel(0, 0), LastLocationInBounds(-1, -1), sizeOfMapArea(0, 0)
|
||||
, minOfTiles(0, 0), maxOfTiles(0, 0), zoom(0), isDragging(false), TooltipTextPadding(10, 10), loaderLimit(5), maxzoom(21), started(false), runningThreads(0)
|
||||
, minOfTiles(0, 0), maxOfTiles(0, 0), zoom(0), isDragging(false), TooltipTextPadding(10, 10), loaderLimit(5), maxzoom(21), runningThreads(0), started(false)
|
||||
{
|
||||
mousewheelzoomtype = MouseWheelZoomType::MousePositionAndCenter;
|
||||
SetProjection(new MercatorProjection());
|
||||
|
@ -88,14 +88,14 @@ QVector <double> LKS94Projection::DTM10(const QVector <double> & lonlat)
|
||||
double es; // Eccentricity squared : (a^2 - b^2)/a^2
|
||||
double semiMajor = 6378137.0; // major axis
|
||||
double semiMinor = 6356752.3142451793; // minor axis
|
||||
double ab; // Semi_major / semi_minor
|
||||
double ba; // Semi_minor / semi_major
|
||||
double ses; // Second eccentricity squared : (a^2 - b^2)/b^2
|
||||
//double ab; // Semi_major / semi_minor
|
||||
//double ba; // Semi_minor / semi_major
|
||||
//double ses; // Second eccentricity squared : (a^2 - b^2)/b^2
|
||||
|
||||
es = 1.0 - (semiMinor * semiMinor) / (semiMajor * semiMajor); // e^2
|
||||
ses = (pow(semiMajor, 2) - pow(semiMinor, 2)) / pow(semiMinor, 2);
|
||||
ba = semiMinor / semiMajor;
|
||||
ab = semiMajor / semiMinor;
|
||||
//ses = (pow(semiMajor, 2) - pow(semiMinor, 2)) / pow(semiMinor, 2);
|
||||
//ba = semiMinor / semiMajor;
|
||||
//ab = semiMajor / semiMinor;
|
||||
|
||||
// ...
|
||||
|
||||
@ -121,14 +121,14 @@ QVector <double> LKS94Projection::MTD10(QVector <double> & pnt)
|
||||
double es; // Eccentricity squared : (a^2 - b^2)/a^2
|
||||
double semiMajor = 6378137.0; // major axis
|
||||
double semiMinor = 6356752.3141403561; // minor axis
|
||||
double ab; // Semi_major / semi_minor
|
||||
double ba; // Semi_minor / semi_major
|
||||
//double ab; // Semi_major / semi_minor
|
||||
//double ba; // Semi_minor / semi_major
|
||||
double ses; // Second eccentricity squared : (a^2 - b^2)/b^2
|
||||
|
||||
es = 1.0 - (semiMinor * semiMinor) / (semiMajor * semiMajor); // e^2
|
||||
ses = (pow(semiMajor, 2) - pow(semiMinor, 2)) / pow(semiMinor, 2);
|
||||
ba = semiMinor / semiMajor;
|
||||
ab = semiMajor / semiMinor;
|
||||
//ba = semiMinor / semiMajor;
|
||||
//ab = semiMajor / semiMinor;
|
||||
|
||||
// ...
|
||||
|
||||
@ -201,11 +201,13 @@ QVector <double> LKS94Projection::DTM00(QVector <double> & lonlat)
|
||||
double metersPerUnit = 1.0;
|
||||
|
||||
double e0, e1, e2, e3; // eccentricity constants
|
||||
double e, es, esp; // eccentricity constants
|
||||
//double e;
|
||||
double es;
|
||||
double esp; // eccentricity constants
|
||||
double ml0; // small value m
|
||||
|
||||
es = 1.0 - pow(semiMinor / semiMajor, 2);
|
||||
e = sqrt(es);
|
||||
//e = sqrt(es);
|
||||
e0 = e0fn(es);
|
||||
e1 = e1fn(es);
|
||||
e2 = e2fn(es);
|
||||
@ -262,14 +264,14 @@ QVector <double> LKS94Projection::DTM01(QVector <double> & lonlat)
|
||||
double es; // Eccentricity squared : (a^2 - b^2)/a^2
|
||||
double semiMajor = 6378137.0; // major axis
|
||||
double semiMinor = 6356752.3141403561; // minor axis
|
||||
double ab; // Semi_major / semi_minor
|
||||
double ba; // Semi_minor / semi_major
|
||||
double ses; // Second eccentricity squared : (a^2 - b^2)/b^2
|
||||
//double ab; // Semi_major / semi_minor
|
||||
//double ba; // Semi_minor / semi_major
|
||||
//double ses; // Second eccentricity squared : (a^2 - b^2)/b^2
|
||||
|
||||
es = 1.0 - (semiMinor * semiMinor) / (semiMajor * semiMajor);
|
||||
ses = (pow(semiMajor, 2) - pow(semiMinor, 2)) / pow(semiMinor, 2);
|
||||
ba = semiMinor / semiMajor;
|
||||
ab = semiMajor / semiMinor;
|
||||
//ses = (pow(semiMajor, 2) - pow(semiMinor, 2)) / pow(semiMinor, 2);
|
||||
//ba = semiMinor / semiMajor;
|
||||
//ab = semiMajor / semiMinor;
|
||||
|
||||
// ...
|
||||
|
||||
@ -294,14 +296,14 @@ QVector <double> LKS94Projection::MTD01(QVector <double> & pnt)
|
||||
double es; // Eccentricity squared : (a^2 - b^2)/a^2
|
||||
double semiMajor = 6378137.0; // major axis
|
||||
double semiMinor = 6356752.3142451793; // minor axis
|
||||
double ab; // Semi_major / semi_minor
|
||||
double ba; // Semi_minor / semi_major
|
||||
//double ab; // Semi_major / semi_minor
|
||||
//double ba; // Semi_minor / semi_major
|
||||
double ses; // Second eccentricity squared : (a^2 - b^2)/b^2
|
||||
|
||||
es = 1.0 - (semiMinor * semiMinor) / (semiMajor * semiMajor);
|
||||
ses = (pow(semiMajor, 2) - pow(semiMinor, 2)) / pow(semiMinor, 2);
|
||||
ba = semiMinor / semiMajor;
|
||||
ab = semiMajor / semiMinor;
|
||||
//ba = semiMinor / semiMajor;
|
||||
//ab = semiMajor / semiMinor;
|
||||
|
||||
// ...
|
||||
|
||||
@ -378,12 +380,14 @@ QVector <double> LKS94Projection::MTD11(QVector <double> & p)
|
||||
double metersPerUnit = 1.0;
|
||||
|
||||
double e0, e1, e2, e3; // eccentricity constants
|
||||
double e, es, esp; // eccentricity constants
|
||||
//double e;
|
||||
double es;
|
||||
double esp; // eccentricity constants
|
||||
double ml0; // small value m
|
||||
|
||||
es = (semiMinor * semiMinor) / (semiMajor * semiMajor);
|
||||
es = 1.0 - es;
|
||||
e = sqrt(es);
|
||||
//e = sqrt(es);
|
||||
e0 = e0fn(es);
|
||||
e1 = e1fn(es);
|
||||
e2 = e2fn(es);
|
||||
|
@ -56,7 +56,7 @@ Point MercatorProjectionYandex::FromLatLngToPixel(double lat, double lng, const
|
||||
}
|
||||
internals::PointLatLng MercatorProjectionYandex::FromPixelToLatLng(const int &x, const int &y, const int &zoom)
|
||||
{
|
||||
Size s = GetTileMatrixSizePixel(zoom);
|
||||
//Size s = GetTileMatrixSizePixel(zoom);
|
||||
|
||||
// double mapSizeX = s.Width();
|
||||
// double mapSizeY = s.Height();
|
||||
|
@ -31,7 +31,8 @@
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
|
||||
namespace mapcontrol {
|
||||
MapGraphicItem::MapGraphicItem(internals::Core *core, Configuration *configuration) : core(core), config(configuration), MapRenderTransform(1), maxZoom(17), minZoom(2), zoomReal(0), isSelected(false), rotation(0), zoomDigi(0)
|
||||
MapGraphicItem::MapGraphicItem(internals::Core *core, Configuration *configuration) : core(core), config(configuration), MapRenderTransform(1),
|
||||
maxZoom(17), minZoom(2), zoomReal(0), zoomDigi(0), isSelected(false), rotation(0)
|
||||
{
|
||||
dragons.load(QString::fromUtf8(":/markers/images/dragons1.jpg"));
|
||||
showTileGridLines = false;
|
||||
|
@ -31,8 +31,8 @@
|
||||
namespace mapcontrol {
|
||||
double UAVItem::groundspeed_mps_filt = 0;
|
||||
|
||||
UAVItem::UAVItem(MapGraphicItem *map, OPMapWidget *parent, QString uavPic) : map(map), mapwidget(parent), showtrail(true), showtrailline(true), trailtime(5), traildistance(50), autosetreached(true)
|
||||
, autosetdistance(100), altitude(0), showUAVInfo(false)
|
||||
UAVItem::UAVItem(MapGraphicItem *map, OPMapWidget *parent, QString uavPic) : map(map), mapwidget(parent), altitude(0), showtrail(true), showtrailline(true),
|
||||
trailtime(5), traildistance(50), autosetreached(true), autosetdistance(100), showUAVInfo(false)
|
||||
{
|
||||
pic.load(uavPic);
|
||||
this->setFlag(QGraphicsItem::ItemIsMovable, false);
|
||||
|
@ -29,8 +29,8 @@
|
||||
#include "homeitem.h"
|
||||
|
||||
namespace mapcontrol {
|
||||
WayPointCircle::WayPointCircle(WayPointItem *center, WayPointItem *radius, bool clockwise, MapGraphicItem *map, QColor color) : my_center(center),
|
||||
my_radius(radius), my_map(map), QGraphicsEllipseItem(map), myColor(color), myClockWise(clockwise)
|
||||
WayPointCircle::WayPointCircle(WayPointItem *center, WayPointItem *radius, bool clockwise, MapGraphicItem *map, QColor color) : QGraphicsEllipseItem(map),
|
||||
my_center(center), my_radius(radius), my_map(map), myColor(color), myClockWise(clockwise)
|
||||
{
|
||||
connect(center, SIGNAL(localPositionChanged(QPointF, WayPointItem *)), this, SLOT(refreshLocations()));
|
||||
connect(radius, SIGNAL(localPositionChanged(QPointF, WayPointItem *)), this, SLOT(refreshLocations()));
|
||||
@ -40,8 +40,8 @@ WayPointCircle::WayPointCircle(WayPointItem *center, WayPointItem *radius, bool
|
||||
connect(map, SIGNAL(childSetOpacity(qreal)), this, SLOT(setOpacitySlot(qreal)));
|
||||
}
|
||||
|
||||
WayPointCircle::WayPointCircle(HomeItem *radius, WayPointItem *center, bool clockwise, MapGraphicItem *map, QColor color) : my_center(center),
|
||||
my_radius(radius), my_map(map), QGraphicsEllipseItem(map), myColor(color), myClockWise(clockwise)
|
||||
WayPointCircle::WayPointCircle(HomeItem *radius, WayPointItem *center, bool clockwise, MapGraphicItem *map, QColor color) : QGraphicsEllipseItem(map),
|
||||
my_center(center), my_radius(radius), my_map(map), myColor(color), myClockWise(clockwise)
|
||||
{
|
||||
connect(radius, SIGNAL(homePositionChanged(internals::PointLatLng, float)), this, SLOT(refreshLocations()));
|
||||
connect(center, SIGNAL(localPositionChanged(QPointF)), this, SLOT(refreshLocations()));
|
||||
|
@ -337,7 +337,7 @@ void WayPointItem::SetReached(const bool &value)
|
||||
picture.load(QString::fromUtf8(":/markers/images/bigMarkerGreen.png"));
|
||||
} else {
|
||||
if (!isMagic) {
|
||||
if (this->flags() & QGraphicsItem::ItemIsMovable == QGraphicsItem::ItemIsMovable) {
|
||||
if ((this->flags() & QGraphicsItem::ItemIsMovable) == QGraphicsItem::ItemIsMovable) {
|
||||
picture.load(QString::fromUtf8(":/markers/images/marker.png"));
|
||||
} else {
|
||||
picture.load(QString::fromUtf8(":/markers/images/waypoint_marker2.png"));
|
||||
|
@ -29,8 +29,8 @@
|
||||
#include "homeitem.h"
|
||||
|
||||
namespace mapcontrol {
|
||||
WayPointLine::WayPointLine(WayPointItem *from, WayPointItem *to, MapGraphicItem *map, QColor color) : source(from),
|
||||
destination(to), my_map(map), QGraphicsLineItem(map), myColor(color)
|
||||
WayPointLine::WayPointLine(WayPointItem *from, WayPointItem *to, MapGraphicItem *map, QColor color) : QGraphicsLineItem(map),
|
||||
source(from), destination(to), my_map(map), myColor(color)
|
||||
{
|
||||
this->setLine(to->pos().x(), to->pos().y(), from->pos().x(), from->pos().y());
|
||||
connect(from, SIGNAL(localPositionChanged(QPointF, WayPointItem *)), this, SLOT(refreshLocations()));
|
||||
@ -47,8 +47,8 @@ WayPointLine::WayPointLine(WayPointItem *from, WayPointItem *to, MapGraphicItem
|
||||
connect(map, SIGNAL(childSetOpacity(qreal)), this, SLOT(setOpacitySlot(qreal)));
|
||||
}
|
||||
|
||||
WayPointLine::WayPointLine(HomeItem *from, WayPointItem *to, MapGraphicItem *map, QColor color) : source(from),
|
||||
destination(to), my_map(map), QGraphicsLineItem(map), myColor(color)
|
||||
WayPointLine::WayPointLine(HomeItem *from, WayPointItem *to, MapGraphicItem *map, QColor color) : QGraphicsLineItem(map),
|
||||
source(from), destination(to), my_map(map), myColor(color)
|
||||
{
|
||||
this->setLine(to->pos().x(), to->pos().y(), from->pos().x(), from->pos().y());
|
||||
connect(from, SIGNAL(homePositionChanged(internals::PointLatLng, float)), this, SLOT(refreshLocations()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user