Commit 80e1204f authored by lm's avatar lm

GPS MAV visualization and moving map tested and working

parent 1301c56b
......@@ -19,7 +19,7 @@ void PxQuadMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
UAS::receiveMessage(link, message);
mavlink_message_t* msg = &message;
qDebug() << "PX RECEIVED" << msg->sysid << msg->compid << msg->msgid;
//qDebug() << "PX RECEIVED" << msg->sysid << msg->compid << msg->msgid;
// Handle your special messages
......
......@@ -117,7 +117,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
addLink(link);
}
qDebug() << "UAS RECEIVED" << message.sysid << message.compid << message.msgid;
//qDebug() << "UAS RECEIVED" << message.sysid << message.compid << message.msgid;
if (message.sysid == uasId)
{
......
......@@ -74,7 +74,7 @@ MapWidget::MapWidget(QWidget *parent) :
QPushButton* zoomout = new QPushButton(QIcon(":/images/actions/list-remove.svg"), "", this);
followgps = new QPushButton(QIcon(":/images/actions/system-lock-screen.svg"), "", this);
followgps->setCheckable(true);
//gpsposition = new QLabel();
// gpsposition = new QLabel();
zoomin->setMaximumWidth(50);
zoomout->setMaximumWidth(50);
followgps->setMaximumWidth(50);
......@@ -114,6 +114,7 @@ MapWidget::~MapWidget()
void MapWidget::addUAS(UASInterface* uas)
{
mav = uas;
connect(uas, SIGNAL(globalPositionChanged(UASInterface*,double,double,double,quint64)), this, SLOT(updateGlobalPosition(UASInterface*,double,double,double,quint64)));
}
void MapWidget::updateGlobalPosition(UASInterface* uas, double lat, double lon, double alt, quint64 usec)
......@@ -123,7 +124,7 @@ void MapWidget::updateGlobalPosition(UASInterface* uas, double lat, double lon,
QList<Point*> points;
// Points with a circle
// A QPen can be used to customize the
QPen* pointpen = new QPen(QColor(0,255,0));
QPen* pointpen = new QPen(uas->getColor());
pointpen->setWidth(3);
points.append(new CirclePoint(lat, lon, alt, uas->getUASName(), Point::Middle, pointpen));
// points.append(new CirclePoint(8.275145, 50.016992, 15, "Wiesbaden-Mainz-Kastel, Johannes-Goßner-Straße", Point::Middle, pointpen));
......@@ -156,7 +157,7 @@ void MapWidget::updateGlobalPosition(UASInterface* uas, double lat, double lon,
void MapWidget::updatePosition(float time, double lat, double lon)
{
gpsposition->setText(QString::number(time) + " / " + QString::number(lat) + " / " + QString::number(lon));
//gpsposition->setText(QString::number(time) + " / " + QString::number(lat) + " / " + QString::number(lon));
if (followgps->isChecked())
{
mc->setView(QPointF(lat, lon));
......
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