Commit a75be3cf authored by Friedrich Fraundorfer's avatar Friedrich Fraundorfer

Fixed lat/lon scaling error.

parent ab7a7c85
......@@ -705,7 +705,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
{
mavlink_gps_global_origin_t pos;
mavlink_msg_gps_global_origin_decode(&message, &pos);
emit homePositionChanged(uasId, pos.latitude, pos.longitude, pos.altitude);
emit homePositionChanged(uasId, pos.latitude / 10000000.0, pos.longitude / 10000000.0, pos.altitude / 1000.0);
}
break;
case MAVLINK_MSG_ID_RC_CHANNELS_RAW:
......
......@@ -240,6 +240,9 @@ Pixhawk3DWidget::localPositionChanged(UASInterface* uas, int component,
group->addChild(geode);
// text indicates component id
colorRGB.lighter();
color = osg::Vec4(colorRGB.redF(), colorRGB.greenF(), colorRGB.blueF(), 1.0f);
osg::ref_ptr<osgText::Text> text = new osgText::Text;
text->setFont(m3DWidget->font());
text->setText(QString::number(component).toStdString().c_str());
......
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