Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a hill region to testable TerrainQueries. #9494

Merged
merged 3 commits into from Apr 5, 2021
Merged

Add a hill region to testable TerrainQueries. #9494

merged 3 commits into from Apr 5, 2021

Conversation

remster
Copy link
Contributor

@remster remster commented Mar 1, 2021

TerrainQueries typically don't work in the test cycle, but a while back i have contributed special areas around Point Nemo where testing terrain-following TransectStyleComplexItems works.

Yet, we were missing a hill to verify transects are breaking on its top as expected and for LoS analysis. This only adds another useful region next to ones that are already there.

@remster remster marked this pull request as ready for review March 3, 2021 09:55
@@ -901,6 +910,19 @@ QList<double> UnitTestTerrainQuery::_requestCoordinateHeights(const QList<QGeoCo
long dx = regionSizeDeg/one_second_deg;
double fraction = 1.0 * x / dx;
result.append(std::round(UnitTestTerrainQuery::LinearSlopeRegion::minAMSLElevation + (fraction * UnitTestTerrainQuery::LinearSlopeRegion::totalElevationChange)));
} else if (hillRegion.contains(coordinate)) {
double arc_second_meters = (6371000. / 3600.) * (M_PI / 180);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is 6371000 ? Please create an intermediary variable to describe this magic number.

@DonLakeFlyer DonLakeFlyer merged commit ea8e347 into mavlink:master Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants