Skip to content
dankrusi edited this page Apr 22, 2012 · 6 revisions

Analysis Maps

The Analysis Maps are the core idea of this application. Any analysis map implements a scoring strategy and can use any of the available Data Maps. Each implementation must score each point on the map from 0% to 100%, where 100 is the best and most optimal landing spot.

When analysis maps are displayed, the score is shown through the strength of the red color. In other words, a score of 100% is full red, and a score of 0% is black.

The following analysis strategies have been implemented, and can be used as ideas for further strategies:

Example Implementation

class SlopeAnalysisMap : public AnalysisMap
{
private:
    ElevationDataMap *_elevationMap;

public:
    explicit ElevationAnalysisMap(ElevationDataMap *elevationMap, QSettings *settings, QObject *parent = 0) {
        // Init
        _name = "Elevation Analysis";
        _elevationMap = elevationMap;
    }

    virtual double calculateScoreForPoint(int x, int y) {
        // Really trivial implementation: the higher the better...
        int elevation = _elevationMap->getElevationAtPoint(x,y);
        int minElevation = -9150;
        int maxElevation = 10760;
        return (double)(elevation - minElevation) / (double)(maxElevation - minElevation);
    }
};

Don't forget to register your new analysis strategy with the GUI in MainWindow.cpp:

void MainWindow::openMapFile(QString filePath) {
...
    SlopeAnalysisMap *slopeMap = new SlopeAnalysisMap(_elevationDataMap,_settings,this);
    registerAnalysisMap(slopeMap);
...
}

Available Strategies

Elevation Analysis

A map which scores the Elevation based on its height (a simple test srategy for example only).

Screenshot

Slope Analysis

This map evaluates / scores the terrain based on the steepness of its slope. At the moment we're using a polynomial function to score the slope: score(slope) ~ -slope^6

Screenshot

Slope Analysis O2

Screenshot

Spatial Analysis

This map calculates the flatness of the surrounding region near each point. Good scores are given for small differences in elevation in the nearby region.

Screenshot Screenshot

Combined Analysis

The combined analysis either averages or multiplies multiple maps together to give a final result.

Idea Strategies

TODO