The 3D interpolation scheme provides the interface Grid::set_interpolation_coefs and Grid::get_interpolation_values for geographical grid.
set_interpolation_coefs: Given the longitude, latitude and altitude of points, compute the interpolation coefficients and store them inside the Grid class. Return true if the function succeeds. Return false if the length of longitude, latitude and altitude are not the same.
get_interpolation_values: Given the value at known data points, create a map of geographic locations to data and do the interpolation. If the size of data is not the same as the size of geoGrid, return an empty vector. Otherwise return a vector of precision_t. For each point, if the processor can handle it, the value is the result of interpolation, otherwise the value is "cNinf".
Type of change
New feature (non-breaking change that adds functionality)
How Has This Been Tested?
Run cmake -DTEST_INTERPOLATION:BOOL=TRUE .. to build the Makefile.
The required changes to the json file are in src/main/main_test_interpolation.cpp.
Test configuration
Operating system: Ubuntu-20.04
Compiler, version number: gcc 9.4.0
Checklist:
[N/A] Make sure you are merging into the develop (not master) branch
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules
[N/A] Add a note to CHANGELOG.md, summarizing the changes
Description
Addresses #99
The 3D interpolation scheme provides the interface Grid::set_interpolation_coefs and Grid::get_interpolation_values for geographical grid.
set_interpolation_coefs: Given the longitude, latitude and altitude of points, compute the interpolation coefficients and store them inside the Grid class. Return true if the function succeeds. Return false if the length of longitude, latitude and altitude are not the same.
get_interpolation_values: Given the value at known data points, create a map of geographic locations to data and do the interpolation. If the size of data is not the same as the size of geoGrid, return an empty vector. Otherwise return a vector of precision_t. For each point, if the processor can handle it, the value is the result of interpolation, otherwise the value is "cNinf".
Type of change
How Has This Been Tested?
Run
cmake -DTEST_INTERPOLATION:BOOL=TRUE ..
to build the Makefile. The required changes to the json file are in src/main/main_test_interpolation.cpp.Test configuration
Checklist:
develop
(notmaster
) branchCHANGELOG.md
, summarizing the changes