|
|
@ -12,7 +12,7 @@ QGCMapWidget::QGCMapWidget(QWidget *parent) : |
|
|
|
addUAS(uas); |
|
|
|
addUAS(uas); |
|
|
|
} |
|
|
|
} |
|
|
|
UAV->setVisible(true); |
|
|
|
UAV->setVisible(true); |
|
|
|
UAV->setPos(40, 8); |
|
|
|
UAV->setPos(0, 0); |
|
|
|
UAV->show(); |
|
|
|
UAV->show(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -20,23 +20,23 @@ QGCMapWidget::QGCMapWidget(QWidget *parent) : |
|
|
|
|
|
|
|
|
|
|
|
internals::PointLatLng pos_lat_lon = internals::PointLatLng(0, 0); |
|
|
|
internals::PointLatLng pos_lat_lon = internals::PointLatLng(0, 0); |
|
|
|
|
|
|
|
|
|
|
|
// // **************
|
|
|
|
// // **************
|
|
|
|
// // default home position
|
|
|
|
// // default home position
|
|
|
|
|
|
|
|
|
|
|
|
// home_position.coord = pos_lat_lon;
|
|
|
|
// home_position.coord = pos_lat_lon;
|
|
|
|
// home_position.altitude = altitude;
|
|
|
|
// home_position.altitude = altitude;
|
|
|
|
// home_position.locked = false;
|
|
|
|
// home_position.locked = false;
|
|
|
|
|
|
|
|
|
|
|
|
// // **************
|
|
|
|
// // **************
|
|
|
|
// // default magic waypoint params
|
|
|
|
// // default magic waypoint params
|
|
|
|
|
|
|
|
|
|
|
|
// magic_waypoint.map_wp_item = NULL;
|
|
|
|
// magic_waypoint.map_wp_item = NULL;
|
|
|
|
// magic_waypoint.coord = home_position.coord;
|
|
|
|
// magic_waypoint.coord = home_position.coord;
|
|
|
|
// magic_waypoint.altitude = altitude;
|
|
|
|
// magic_waypoint.altitude = altitude;
|
|
|
|
// magic_waypoint.description = "Magic waypoint";
|
|
|
|
// magic_waypoint.description = "Magic waypoint";
|
|
|
|
// magic_waypoint.locked = false;
|
|
|
|
// magic_waypoint.locked = false;
|
|
|
|
// magic_waypoint.time_seconds = 0;
|
|
|
|
// magic_waypoint.time_seconds = 0;
|
|
|
|
// magic_waypoint.hold_time_seconds = 0;
|
|
|
|
// magic_waypoint.hold_time_seconds = 0;
|
|
|
|
|
|
|
|
|
|
|
|
const int safe_area_radius_list[] = {5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000}; // meters
|
|
|
|
const int safe_area_radius_list[] = {5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000}; // meters
|
|
|
|
|
|
|
|
|
|
|
@ -69,9 +69,20 @@ QGCMapWidget::QGCMapWidget(QWidget *parent) : |
|
|
|
UAV->SetUAVPos(pos_lat_lon, 0.0); // set the UAV position
|
|
|
|
UAV->SetUAVPos(pos_lat_lon, 0.0); // set the UAV position
|
|
|
|
GPS->SetUAVPos(pos_lat_lon, 0.0); // set the UAV position
|
|
|
|
GPS->SetUAVPos(pos_lat_lon, 0.0); // set the UAV position
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//SetUAVPos(pos_lat_lon, 0.0); // set the UAV position
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setFrameStyle(QFrame::NoFrame); // no border frame
|
|
|
|
|
|
|
|
setBackgroundBrush(QBrush(Qt::black)); // tile background
|
|
|
|
|
|
|
|
|
|
|
|
setFocus(); |
|
|
|
setFocus(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QGCMapWidget::~QGCMapWidget() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
SetShowHome(false); // doing this appears to stop the map lib crashing on exit
|
|
|
|
|
|
|
|
SetShowUAV(false); // " "
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* |
|
|
|
* |
|
|
|
* @param uas the UAS/MAV to monitor/display with the HUD |
|
|
|
* @param uas the UAS/MAV to monitor/display with the HUD |
|
|
|