diff --git a/artwork/3D Model/Easystar/Thumbs.db b/artwork/3D Model/Easystar/Thumbs.db deleted file mode 100644 index a38903dc2..000000000 Binary files a/artwork/3D Model/Easystar/Thumbs.db and /dev/null differ diff --git a/ground/src/plugins/gpsdisplay/gpsdisplaywidget.cpp b/ground/src/plugins/gpsdisplay/gpsdisplaywidget.cpp index 5f9f71bce..23ad8b0cc 100644 --- a/ground/src/plugins/gpsdisplay/gpsdisplaywidget.cpp +++ b/ground/src/plugins/gpsdisplay/gpsdisplaywidget.cpp @@ -87,6 +87,8 @@ GpsDisplayWidget::GpsDisplayWidget(QWidget *parent) : QWidget(parent) parser=new NMEAParser(); connect(parser,SIGNAL(sv(int)),this,SLOT(setSVs(int))); connect(parser,SIGNAL(position(double,double,double)),this,SLOT(setPosition(double,double,double))); + connect(parser,SIGNAL(speedheading(double,double)),this,SLOT(setSpeedHeading(double,double))); + connect(parser,SIGNAL(datetime(double,double)),this,SLOT(setDateTime(double,double))); } @@ -95,6 +97,34 @@ GpsDisplayWidget::~GpsDisplayWidget() delete widget; } +void GpsDisplayWidget::setSpeedHeading(double speed, double heading) +{ + QString temp = "Speed: "; + temp.append(QString::number(speed,'g',10)); + temp.append(" Heaging: "); + temp.append(QString::number(heading,'g',10)); + widget->speed_label->setText(QString::number(speed,'g',10)); + widget->speed_label->adjustSize(); + widget->bear_label->setText(QString::number(heading,'g',10)); + widget->bear_label->adjustSize(); + + widget->textBrowser->append(temp); +} + +void GpsDisplayWidget::setDateTime(double date, double time) +{ + QString temp = "Date: "; + temp.append(QString::number(date,'g',10)); + temp.append(" Time: "); + temp.append(QString::number(time,'g',10)); + widget->gdate_label->setText(QString::number(date,'g',10)); + widget->gdate_label->adjustSize(); + widget->gtime_label->setText(QString::number(time,'g',10)); + widget->gdate_label->adjustSize(); + + widget->textBrowser->append(temp); +} + void GpsDisplayWidget::setSVs(int sv) { QString temp = "Fix: Sats: "; @@ -111,8 +141,13 @@ void GpsDisplayWidget::setPosition(double lat, double lon, double alt) temp.append(QString::number(lon,'g',10)); temp.append(" "); temp.append(QString::number(alt,'g',10)); - widget->label->setText(temp); - widget->label->adjustSize(); + widget->lat_label->setText(QString::number(lat,'g',10)); + widget->lat_label->adjustSize(); + widget->long_label->setText(QString::number(lon,'g',10)); + widget->long_label->adjustSize(); + //widget->alt_label->setText(QString::number(alt,'g',10)); + //widget->alt_label->adjustSize(); + widget->textBrowser->append(temp); } diff --git a/ground/src/plugins/gpsdisplay/gpsdisplaywidget.h b/ground/src/plugins/gpsdisplay/gpsdisplaywidget.h index 7b472ac59..9878853af 100644 --- a/ground/src/plugins/gpsdisplay/gpsdisplaywidget.h +++ b/ground/src/plugins/gpsdisplay/gpsdisplaywidget.h @@ -56,6 +56,8 @@ private slots: void connectButtonClicked(); void setSVs(int); void setPosition(double, double, double); + void setDateTime(double, double); + void setSpeedHeading(double, double); private: Ui_GpsDisplayWidget* widget; diff --git a/ground/src/plugins/gpsdisplay/nmeaparser.cpp b/ground/src/plugins/gpsdisplay/nmeaparser.cpp index 065451074..f409124b6 100644 --- a/ground/src/plugins/gpsdisplay/nmeaparser.cpp +++ b/ground/src/plugins/gpsdisplay/nmeaparser.cpp @@ -263,6 +263,7 @@ void NMEAParser::nmeaProcessGPGGA(char* packet) QString* nmeaString = new QString( packet ); QStringList tokenslist = nmeaString->split(","); + GpsData.GPStime = tokenslist.at(1).toDouble(); GpsData.Latitude = tokenslist.at(2).toDouble(); int deg = (int)GpsData.Latitude/100; double min = ((GpsData.Latitude)-(deg*100))/60.0; @@ -285,6 +286,8 @@ void NMEAParser::nmeaProcessGPGGA(char* packet) GpsData.GeoidSeparation = tokenslist.at(11).toDouble(); emit position(GpsData.Latitude,GpsData.Longitude,GpsData.Altitude); emit sv(GpsData.SV); + emit datetime(GpsData.GPSdate,GpsData.GPStime); + } /** @@ -306,9 +309,13 @@ void NMEAParser::nmeaProcessGPRMC(char* packet) QString* nmeaString = new QString( packet ); QStringList tokenslist = nmeaString->split(","); + GpsData.GPStime = tokenslist.at(1).toDouble(); GpsData.Groundspeed = tokenslist.at(7).toDouble(); GpsData.Groundspeed = GpsData.Groundspeed*0.51444; GpsData.Heading = tokenslist.at(8).toDouble(); + GpsData.GPSdate = tokenslist.at(9).toDouble(); + emit datetime(GpsData.GPSdate,GpsData.GPStime); + emit speedheading(GpsData.Groundspeed,GpsData.Heading); } diff --git a/ground/src/plugins/gpsdisplay/nmeaparser.h b/ground/src/plugins/gpsdisplay/nmeaparser.h index 890830308..87235d675 100644 --- a/ground/src/plugins/gpsdisplay/nmeaparser.h +++ b/ground/src/plugins/gpsdisplay/nmeaparser.h @@ -49,6 +49,9 @@ typedef struct struct_GpsData double HDOP; double VDOP; double GeoidSeparation; + double GPStime; + double GPSdate; + }GpsData_t; class NMEAParser: public QObject @@ -75,6 +78,8 @@ public: signals: void sv(int); void position(double,double,double); + void datetime(double,double); + void speedheading(double,double); private slots: };