Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
ad4d7957
Commit
ad4d7957
authored
Jan 25, 2018
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Done with build errors
parent
421df93a
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
83 additions
and
53 deletions
+83
-53
AirMapFlightManager.cc
src/Airmap/AirMapFlightManager.cc
+9
-0
AirMapFlightManager.h
src/Airmap/AirMapFlightManager.h
+5
-0
AirMapManager.cc
src/Airmap/AirMapManager.cc
+1
-8
AirMapManager.h
src/Airmap/AirMapManager.h
+1
-2
AirMapRestrictionManager.cc
src/Airmap/AirMapRestrictionManager.cc
+5
-2
AirMapRestrictionManager.h
src/Airmap/AirMapRestrictionManager.h
+2
-1
AirMapRulesetsManager.cc
src/Airmap/AirMapRulesetsManager.cc
+4
-1
AirMapRulesetsManager.h
src/Airmap/AirMapRulesetsManager.h
+1
-2
AirMapSharedState.cc
src/Airmap/AirMapSharedState.cc
+4
-0
AirMapSharedState.h
src/Airmap/AirMapSharedState.h
+2
-0
AirMapTelemetry.cc
src/Airmap/AirMapTelemetry.cc
+5
-1
AirMapTelemetry.h
src/Airmap/AirMapTelemetry.h
+3
-2
AirMapTrafficMonitor.cc
src/Airmap/AirMapTrafficMonitor.cc
+2
-0
AirMapTrafficMonitor.h
src/Airmap/AirMapTrafficMonitor.h
+1
-2
AirMapVehicleManager.cc
src/Airmap/AirMapVehicleManager.cc
+0
-4
AirMapVehicleManager.h
src/Airmap/AirMapVehicleManager.h
+4
-5
AirMapWeatherInformation.cc
src/Airmap/AirMapWeatherInformation.cc
+5
-4
AirMapWeatherInformation.h
src/Airmap/AirMapWeatherInformation.h
+17
-12
AirspaceController.h
src/AirspaceManagement/AirspaceController.h
+5
-4
AirspaceManager.cc
src/AirspaceManagement/AirspaceManager.cc
+3
-1
AirspaceManager.h
src/AirspaceManagement/AirspaceManager.h
+3
-2
AirspaceRestrictionProvider.h
src/AirspaceManagement/AirspaceRestrictionProvider.h
+1
-0
No files found.
src/Airmap/AirMapFlightManager.cc
View file @
ad4d7957
...
...
@@ -11,6 +11,15 @@
#include "AirMapManager.h"
#include "MissionItem.h"
#include "QGCMAVLink.h"
#include "airmap/pilots.h"
#include "airmap/flights.h"
#include "airmap/date_time.h"
#include "airmap/flight_plans.h"
#include "airmap/geometry.h"
using
namespace
airmap
;
AirMapFlightManager
::
AirMapFlightManager
(
AirMapSharedState
&
shared
)
:
_shared
(
shared
)
...
...
src/Airmap/AirMapFlightManager.h
View file @
ad4d7957
...
...
@@ -10,10 +10,15 @@
#pragma once
#include "LifetimeChecker.h"
#include "AirMapSharedState.h"
#include "AirspaceAuthorization.h"
#include <QObject>
#include <QTimer>
#include <QList>
#include <QGeoCoordinate>
class
MissionItem
;
//-----------------------------------------------------------------------------
/// class to upload a flight
...
...
src/Airmap/AirMapManager.cc
View file @
ad4d7957
...
...
@@ -12,9 +12,9 @@
#include "AirMapRestrictionManager.h"
#include "AirMapRulesetsManager.h"
#include "AirMapSettings.h"
#include "AirMapSharedState.h"
#include "AirMapTelemetry.h"
#include "AirMapTrafficMonitor.h"
#include "AirMapVehicleManager.h"
#include "QmlObjectListModel.h"
#include "JsonHelper.h"
...
...
@@ -24,13 +24,6 @@
#include "QGCApplication.h"
#include <airmap/authenticator.h>
#include <airmap/airspaces.h>
#include <airmap/evaluation.h>
#include <airmap/flight_plans.h>
#include <airmap/flights.h>
#include <airmap/pilots.h>
#include <airmap/telemetry.h>
#include <airmap/rulesets.h>
using
namespace
airmap
;
...
...
src/Airmap/AirMapManager.h
View file @
ad4d7957
...
...
@@ -9,8 +9,8 @@
#pragma once
#include "AirMapSharedState.h"
#include "AirspaceManager.h"
#include "QGCLoggingCategory.h"
#include <airmap/qt/logger.h>
...
...
@@ -19,7 +19,6 @@
#include <memory>
class
QGCToolbox
;
class
AirMapSharedState
;
class
AirspaceVehicleManager
;
class
AirspaceRestrictionProvider
;
class
AirspaceRulesetsProvider
;
...
...
src/Airmap/AirMapRestrictionManager.cc
View file @
ad4d7957
...
...
@@ -8,8 +8,12 @@
****************************************************************************/
#include "AirMapRestrictionManager.h"
#include "AirMapSharedState.h"
#include "AirMapManager.h"
#include "AirspaceRestriction.h"
#include "airmap/airspaces.h"
using
namespace
airmap
;
AirMapRestrictionManager
::
AirMapRestrictionManager
(
AirMapSharedState
&
shared
)
:
_shared
(
shared
)
...
...
@@ -100,4 +104,3 @@ AirMapRestrictionManager::_addPolygonToList(const airmap::Geometry::Polygon& pol
qCDebug
(
AirMapManagerLog
)
<<
"Polygon with holes. Size: "
<<
polygon
.
inner_rings
.
size
();
}
}
src/Airmap/AirMapRestrictionManager.h
View file @
ad4d7957
...
...
@@ -11,11 +11,12 @@
#include "LifetimeChecker.h"
#include "AirspaceRestrictionProvider.h"
#include "AirMapSharedState.h"
#include <QList>
#include <QGeoCoordinate>
class
AirMapSharedState
;
#include "airmap/geometry.h"
/**
* @file AirMapRestrictionManager.h
...
...
src/Airmap/AirMapRulesetsManager.cc
View file @
ad4d7957
...
...
@@ -8,9 +8,12 @@
****************************************************************************/
#include "AirMapRulesetsManager.h"
#include "AirMapSharedState.h"
#include "AirMapManager.h"
#include "airmap/rulesets.h"
using
namespace
airmap
;
//-----------------------------------------------------------------------------
AirMapRulesetsManager
::
AirMapRulesetsManager
(
AirMapSharedState
&
shared
)
:
_shared
(
shared
)
...
...
src/Airmap/AirMapRulesetsManager.h
View file @
ad4d7957
...
...
@@ -11,11 +11,10 @@
#include "LifetimeChecker.h"
#include "AirspaceRulesetsProvider.h"
#include "AirMapSharedState.h"
#include <QGeoCoordinate>
class
AirMapSharedState
;
/**
* @file AirMapRulesetsManager.h
* Class to download rulesets from AirMap
...
...
src/Airmap/AirMapSharedState.cc
View file @
ad4d7957
...
...
@@ -10,6 +10,10 @@
#include "AirMapSharedState.h"
#include "AirMapManager.h"
#include "airmap/authenticator.h"
using
namespace
airmap
;
void
AirMapSharedState
::
setSettings
(
const
Settings
&
settings
)
{
...
...
src/Airmap/AirMapSharedState.h
View file @
ad4d7957
...
...
@@ -10,6 +10,8 @@
#pragma once
#include <QObject>
#include <QQueue>
#include <airmap/qt/client.h>
/**
...
...
src/Airmap/AirMapTelemetry.cc
View file @
ad4d7957
...
...
@@ -8,11 +8,15 @@
****************************************************************************/
#include "AirMapTelemetry.h"
#include "AirMapSharedState.h"
#include "AirMapManager.h"
#include "QGCMAVLink.h"
#include "airmap/telemetry.h"
#include "airmap/flights.h"
using
namespace
airmap
;
AirMapTelemetry
::
AirMapTelemetry
(
AirMapSharedState
&
shared
)
:
_shared
(
shared
)
{
...
...
src/Airmap/AirMapTelemetry.h
View file @
ad4d7957
...
...
@@ -10,10 +10,11 @@
#pragma once
#include "LifetimeChecker.h"
#include "AirMapSharedState.h"
#include <Q
Object
>
#include <Q
GCMAVLink.h
>
class
AirMapSharedState
;
#include <QObject>
/// class to send telemetry data to AirMap
class
AirMapTelemetry
:
public
QObject
,
public
LifetimeChecker
...
...
src/Airmap/AirMapTrafficMonitor.cc
View file @
ad4d7957
...
...
@@ -10,6 +10,8 @@
#include "AirMapTrafficMonitor.h"
#include "AirMapManager.h"
using
namespace
airmap
;
AirMapTrafficMonitor
::~
AirMapTrafficMonitor
()
{
stop
();
...
...
src/Airmap/AirMapTrafficMonitor.h
View file @
ad4d7957
...
...
@@ -10,6 +10,7 @@
#pragma once
#include "LifetimeChecker.h"
#include "AirMapSharedState.h"
#include <QObject>
#include <QGeoCoordinate>
...
...
@@ -18,8 +19,6 @@
#include <memory>
class
AirMapSharedState
;
/**
* @class AirMapTrafficMonitor
*
...
...
src/Airmap/AirMapVehicleManager.cc
View file @
ad4d7957
...
...
@@ -8,10 +8,6 @@
****************************************************************************/
#include "AirMapVehicleManager.h"
#include "AirMapSharedState.h"
#include "AirMapFlightManager.h"
#include "AirMapTelemetry.h"
#include "AirMapTrafficMonitor.h"
#include "AirMapManager.h"
#include "Vehicle.h"
...
...
src/Airmap/AirMapVehicleManager.h
View file @
ad4d7957
...
...
@@ -11,16 +11,15 @@
#include "AirspaceManager.h"
#include "AirspaceVehicleManager.h"
#include "AirMapSharedState.h"
#include "AirMapFlightManager.h"
#include "AirMapTelemetry.h"
#include "AirMapTrafficMonitor.h"
#include "QGCToolbox.h"
/// AirMap per vehicle management class.
class
AirMapSharedState
;
class
AirMapFlightManager
;
class
AirMapTelemetry
;
class
AirMapTrafficMonitor
;
class
AirMapVehicleManager
:
public
AirspaceVehicleManager
{
Q_OBJECT
...
...
src/Airmap/AirMapWeatherInformation.cc
View file @
ad4d7957
...
...
@@ -8,14 +8,15 @@
****************************************************************************/
#include "AirMapWeatherInformation.h"
#include "AirMapSharedState.h"
#include "AirMapManager.h"
#define WEATHER_UPDATE_DISTANCE 50000 //-- 50km threshold for weather updates
#define WEATHER_UPDATE_TIME 30 * 60 * 60 * 1000 //-- 30 minutes threshold for weather updates
using
namespace
airmap
;
AirMapWeatherInformation
::
AirMapWeatherInformation
(
AirMapSharedState
&
shared
,
QObject
*
parent
)
:
QObject
(
parent
)
:
AirspaceWeatherInfoProvider
(
parent
)
,
_valid
(
false
)
,
_windHeading
(
0
)
,
_windSpeed
(
0
)
...
...
@@ -24,11 +25,12 @@ AirMapWeatherInformation::AirMapWeatherInformation(AirMapSharedState& shared, QO
,
_humidity
(
0.0
f
)
,
_visibility
(
0
)
,
_precipitation
(
0
)
,
_shared
(
shared
)
{
}
void
AirMapWeatherInformation
::
setROI
(
QGeoCoordinate
center
)
AirMapWeatherInformation
::
setROI
(
const
QGeoCoordinate
&
center
)
{
//-- If first time or we've moved more than WEATHER_UPDATE_DISTANCE, ask for weather updates.
if
(
!
_lastRoiCenter
.
isValid
()
||
_lastRoiCenter
.
distanceTo
(
center
)
>
WEATHER_UPDATE_DISTANCE
)
{
...
...
@@ -60,7 +62,6 @@ AirMapWeatherInformation::_requestWeatherUpdate(const QGeoCoordinate& coordinate
_shared
.
client
()
->
status
().
get_status_by_point
(
params
,
[
this
,
coordinate
](
const
Status
::
GetStatus
::
Result
&
result
)
{
if
(
result
)
{
const
Status
::
Weather
&
weather
=
result
.
value
().
weather
;
AirMapWeatherInformation
weatherUpdateInfo
;
_valid
=
true
;
_condition
=
QString
::
fromStdString
(
weather
.
condition
);
_icon
=
QStringLiteral
(
"qrc:/airmapweather/"
)
+
QString
::
fromStdString
(
weather
.
icon
)
+
QStringLiteral
(
".svg"
);
...
...
src/Airmap/AirMapWeatherInformation.h
View file @
ad4d7957
...
...
@@ -12,6 +12,7 @@
#include "LifetimeChecker.h"
#include "AirspaceWeatherInfoProvider.h"
#include "AirMapSharedState.h"
#include <QGeoCoordinate>
#include <QTime>
...
...
@@ -40,21 +41,25 @@ public:
void
setROI
(
const
QGeoCoordinate
&
center
)
override
;
signals:
void
error
(
const
QString
&
what
,
const
QString
&
airmapdMessage
,
const
QString
&
airmapdDetails
);
private:
void
_requestWeatherUpdate
(
const
QGeoCoordinate
&
coordinate
);
private:
bool
_valid
;
QString
_condition
;
QString
_icon
;
quint32
_windHeading
;
quint32
_windSpeed
;
quint32
_windGusting
;
qint32
_temperature
;
float
_humidity
;
quint32
_visibility
;
quint32
_precipitation
;
bool
_valid
;
QString
_condition
;
QString
_icon
;
quint32
_windHeading
;
quint32
_windSpeed
;
quint32
_windGusting
;
qint32
_temperature
;
float
_humidity
;
quint32
_visibility
;
quint32
_precipitation
;
//-- Don't check the weather every time the user moves the map
QGeoCoordinate
_lastRoiCenter
;
QTime
_weatherTime
;
AirMapSharedState
&
_shared
;
QGeoCoordinate
_lastRoiCenter
;
QTime
_weatherTime
;
};
src/AirspaceManagement/AirspaceController.h
View file @
ad4d7957
...
...
@@ -10,6 +10,7 @@
#pragma once
#include <QObject>
#include <QGeoCoordinate>
class
AirspaceManager
;
class
QmlObjectListModel
;
...
...
@@ -29,10 +30,10 @@ public:
Q_INVOKABLE
void
setROI
(
QGeoCoordinate
center
,
double
radius
);
QmlObjectListModel
*
polygons
()
{
return
_manager
->
polygonRestrictions
();
}
QmlObjectListModel
*
circles
()
{
return
_manager
->
circularRestrictions
();
}
QString
providerName
()
{
return
_manager
->
name
();
}
AirspaceWeatherInfoProvider
*
weatherInfo
()
{
return
_manager
->
weatherInfo
();
}
QmlObjectListModel
*
polygons
()
;
QmlObjectListModel
*
circles
()
;
QString
providerName
()
;
AirspaceWeatherInfoProvider
*
weatherInfo
()
;
private:
AirspaceManager
*
_manager
;
...
...
src/AirspaceManagement/AirspaceManager.cc
View file @
ad4d7957
...
...
@@ -10,12 +10,14 @@
#include "AirspaceManager.h"
#include "AirspaceWeatherInfoProvider.h"
#include "AirspaceRestriction.h"
#include "AirspaceRestrictionProvider.h"
#include "AirspaceRulesetsProvider.h"
#include "AirspaceVehicleManager.h"
#include "AirspaceController.h"
#include "Vehicle.h"
#include "QGCApplication.h"
#include "QmlObjectListModel.h"
QGC_LOGGING_CATEGORY
(
AirspaceManagementLog
,
"AirspaceManagementLog"
)
...
...
src/AirspaceManagement/AirspaceManager.h
View file @
ad4d7957
...
...
@@ -25,6 +25,7 @@
#include "QGCToolbox.h"
#include "QGCLoggingCategory.h"
#include "QmlObjectListModel.h"
#include <QGeoCoordinate>
#include <QObject>
...
...
@@ -34,10 +35,10 @@
class
Vehicle
;
class
QGCApplication
;
class
QmlObjectListModel
;
class
AirspaceWeatherInfoProvider
;
class
AirspaceRestrictionProvider
;
class
AirspaceRulesetsProvider
;
class
AirspaceVehicleManager
;
Q_DECLARE_LOGGING_CATEGORY
(
AirspaceManagementLog
)
...
...
@@ -55,7 +56,7 @@ public:
/**
* Factory method to create an AirspaceVehicleManager object
*/
virtual
AirspaceVehicleManager
*
instantiateVehicle
(
const
Vehicle
&
vehicle
)
=
0
;
virtual
AirspaceVehicleManager
*
instantiateVehicle
(
const
Vehicle
&
vehicle
)
=
0
;
/**
* Factory method to create an AirspaceRestrictionProvider object
...
...
src/AirspaceManagement/AirspaceRestrictionProvider.h
View file @
ad4d7957
...
...
@@ -16,6 +16,7 @@
#include <QObject>
#include <QList>
#include <QGeoCoordinate>
class
AirspacePolygonRestriction
;
class
AirspaceCircularRestriction
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment