QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
SurfaceAnalysis.h
Go to the documentation of this file.
1#pragma once
2
3#include <QtCore/QList>
4#include <QtCore/QPointF>
5#include <QtCore/QString>
6#include <QtPositioning/QGeoCoordinate>
7
8#include "SurfaceModel.h"
9#include "TileMath.h"
10
20namespace SurfaceAnalysis {
21
29
36
37QString seamCauseDescription(SeamCause cause);
38QString holeCauseDescription(HoleCause cause);
39
49
56
58{
60 int count = 0;
61};
62
64{
66 double step = 0.0;
67 QGeoCoordinate at;
68};
69
76{
77 QList<QPointF> groundSamples;
78 QPointF cameraGround;
79 double cameraHeight = 0.0;
80 double heightScale = 0.0;
81};
82
83struct Report
84{
85 QList<Seam> seams;
86 QList<Hole> holes;
87 QList<BadHeights> badHeights;
88 QList<InPatchStep> inPatchSteps;
89 int totalSamples = 0;
90 int rendered = 0;
91 int pending = 0;
92 int degraded = 0;
93 bool cameraChecked = false;
94 bool surfaceUnderCamera = false;
95 bool cameraBelowSurface = false;
96 double cameraHeight = 0.0;
97 double surfaceAtCamera = 0.0;
99 0.0;
100 double minStep = 0.0;
101
102 QString text() const;
103};
104
107Report analyze(const QList<SurfaceModel::Patch>& patches, int gridSize, const ViewState& view, double minStep = 1.0);
108
109} // namespace SurfaceAnalysis
@ NoPatch
no resident patch covers the visible point at all
@ SuppressedCovered
only a covered (render-suppressed) patch spans the point
@ ElevatedTerrainCulled
sightline passes below nearby terrain height over unrendered ground
@ LodTJunction
fine edge vertices vs the coarse neighbor's interpolated edge
@ PendingFlat
a patch renders flat because its heights are still loading
@ SameZoomMismatch
same zoom, same scale: unexpected sampling inconsistency
@ DegradedFlat
a patch renders flat because terrain fetches failed (retries exhausted)
QString seamCauseDescription(SeamCause cause)
Report analyze(const QList< SurfaceModel::Patch > &patches, int gridSize, const ViewState &view, double minStep)
QString holeCauseDescription(HoleCause cause)
int count
non-finite vertices in the patch
TileMath::TileKey patch
the suppressed patch (SuppressedCovered only)
QGeoCoordinate at
uncovered sample point
double step
see SurfaceModel::Patch::edgeStep (m)
double surfaceAtCamera
rendered surface height at the camera ground position (scene units)
int degraded
rendered flat: terrain fetches failed
int pending
rendered flat: heights still loading
int rendered
patches participating (ready, or rendering flat uncovered)
QString text() const
human-readable report
QList< Seam > seams
sorted by maxStep, largest first
QList< Hole > holes
one entry per uncovered sample point
bool cameraBelowSurface
eye is below rendered terrain at/near the camera: hole at screen bottom
double maxSurfaceNearCamera
highest rendered surface at ground samples within cameraHeight of the camera
QList< InPatchStep > inPatchSteps
cliff-monitor steps steep enough to log, largest first
bool surfaceUnderCamera
a rendered patch with heights spans the camera ground point
double cameraHeight
scene units above the ground plane
int totalSamples
coverage sample points tested (0 = hole check skipped)
QList< BadHeights > badHeights
TileMath::TileKey patch
TileMath::TileKey neighbor
double maxStep
largest vertex height difference along the shared edge (m)
QChar edge
'N','S','E','W': the patch's edge facing the neighbor
QGeoCoordinate worstAt
geo position of the largest step
double heightScale
vertical scale applied to patch heights; 0 skips the camera check
QPointF cameraGround
camera ground position (world meters)
double cameraHeight
camera height above the ground plane (scene units); 0 skips the camera check
QList< QPointF > groundSamples
world points visible on screen; must have rendered coverage