Commit f929b6cb authored by lm's avatar lm

Fixed compile warnings, moved MAVLink ids

parent e771303d
......@@ -46,6 +46,8 @@ namespace qmapcontrol
void FixedImageOverlay::draw(QPainter* painter, const MapAdapter* mapadapter, const QRect &viewport, const QPoint offset)
{
Q_UNUSED(viewport)
Q_UNUSED(offset)
if (!visible)
return;
......
......@@ -64,10 +64,12 @@ namespace qmapcontrol
//double lon = ((point.x()/tilesize*numberOfTiles)*360)-180;
//double lat = (((point.y()/tilesize*numberOfTiles)*180)-90)*-1;
qreal lon = (point.x()*(360./(numberOfTiles*mytilesize)))-180.;
//double lat = -(point.y()*(180./(numberOfTiles*tilesize)))+90;
//qreal lat = getMercatorLatitude(point.y()*-1*(2*M_PI/(numberOfTiles*tilesize)) + M_PI);
qreal lat = lat *180./M_PI;
qreal lon = (point.x()*(360.0/(numberOfTiles*mytilesize)))-180.0;
// qreal lat = -(point.y()*(180.0/(numberOfTiles*mytilesize)))+90.0;
// FIXME Looks buggy
qreal lat = getMercatorLatitude(point.y()*-1*(2*M_PI/(numberOfTiles*mytilesize)) + M_PI);
//qreal lat = lat *180./M_PI;
return QPointF(lon, lat);
}
......
......@@ -3,10 +3,10 @@
# from http://github.com/pixhawk/qmapcontrol/
# over bundled version in lib directory
# Version from GIT repository is preferred
# include ( "../qmapcontrol/QMapControl/QMapControl.pri" ) #{
include ( "../qmapcontrol/QMapControl/QMapControl.pri" ) #{
# Include bundled version if necessary
include(lib/QMapControl/QMapControl.pri)
message("Including bundled QMapControl version as FALLBACK. This is fine on Linux and MacOS, but not the best choice in Windows")
#include(lib/QMapControl/QMapControl.pri)
#message("Including bundled QMapControl version as FALLBACK. This is fine on Linux and MacOS, but not the best choice in Windows")
QT += network opengl svg xml phonon
......
This diff is collapsed.
......@@ -51,13 +51,19 @@ public:
public slots:
void setActiveUAS(UASInterface* uas);
void updateSatellite(int uasid, int satid, float azimuth, float direction, float snr, bool used);
void updateAttitudeSetpoints(UASInterface*, double rollDesired, double pitchDesired, double yawDesired, double thrustDesired, quint64 usec);
void updatePositionSetpoints(int uasid, double xDesired, double yDesired, double zDesired, quint64 usec);
void updateLocalPosition(UASInterface*, double x, double y, double z, quint64 usec);
void updateGlobalPosition(UASInterface*, double lat, double lon, double alt, quint64 usec);
void paintEvent(QPaintEvent * event);
protected slots:
void paintDisplay();
void drawGPS();
void drawObjects();
void drawBaseLines(float xRef, float yRef, float radius, float yaw, const QColor& color, QPainter* painter, bool solid);
void drawPositionSetpoint(float xRef, float yRef, float radius, const QColor& color, QPainter* painter);
void drawAttitudeSetpoint(float xRef, float yRef, float radius, const QColor& color, QPainter* painter);
void drawAltitudeSetpoint(float xRef, float yRef, float radius, const QColor& color, QPainter* painter);
protected:
......@@ -103,6 +109,35 @@ protected:
QMap<int, GPSSatellite*> gpsSatellites;
unsigned int satellitesUsed;
// Current controller values
float attXSet;
float attYSet;
float attYawSet;
float altitudeSet;
float posXSet;
float posYSet;
float posZSet;
// Controller saturation values
float attXSaturation;
float attYSaturation;
float attYawSaturation;
float posXSaturation;
float posYSaturation;
float altitudeSaturation;
// Position
float lat;
float lon;
float alt;
quint64 globalAvailable; ///< Last global position update time
float x;
float y;
float z;
quint64 localAvailable; ///< Last local position update time
private:
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment