USML
Regression Tests
Collaboration diagram for Regression Tests:

Detailed Description

Regression tests for the types package.

Functions

 BOOST_AUTO_TEST_CASE (compute_index_test)
 Test the ability of data_grid_compute_offset() to retrieve data from a 3-D data matrix in column major order. More...
 
 BOOST_AUTO_TEST_CASE (linear_1d_test)
 Interpolate 1-D linear field using a scalar. More...
 
 BOOST_AUTO_TEST_CASE (cubic_1d_test)
 Interpolate 1-D cubic field using a scalar. More...
 
 BOOST_AUTO_TEST_CASE (deriv_1d_test)
 Interpolate 1-D cubic field using a scalar. More...
 
 BOOST_AUTO_TEST_CASE (datagrid_interp_speed_test)
 Interpolate 2-D cubic field using a cubic generating function and compare the speed required to interpolate 1e6 points using the fast_2d and data_grid methods. More...
 
 BOOST_AUTO_TEST_CASE (datagrid_fast_acc_test)
 Interpolate 2-D cubic field using a cubic generating function and compare the interpolated results and their derivatives for both the fast_2d and data_grid methods to the analytic values. More...
 
 BOOST_AUTO_TEST_CASE (earth_radius_test)
 Compare the earth's radius at specific latitudes to known values. More...
 
 BOOST_AUTO_TEST_CASE (dot_test)
 Compute the dot product between set of vectors at different latitudes and a vector pointing due north. More...
 
 BOOST_AUTO_TEST_CASE (dot1_test)
 Compute the dot product between a vector at different latitudes and a vector pointing due north. More...
 
 BOOST_AUTO_TEST_CASE (distance_test)
 Compute the straight line distance between a wposition vector at different latitudes and the point 40N 45E. More...
 
 BOOST_AUTO_TEST_CASE (distance1_test)
 Compute the straight line distance between a series of wposition1 vectors at different latitudes and the point 40N 45E. More...
 
 BOOST_AUTO_TEST_CASE (gc_range_test)
 Compute the great circle range and bearing between JFK and LAX airports. More...
 
 BOOST_AUTO_TEST_CASE (sequence_linear_test1)
 Basic tests for a linearly spaced sequence of numbers. More...
 
 BOOST_AUTO_TEST_CASE (sequence_linear_test2)
 Alternate tests for a linearly spaced sequence of numbers. More...
 
 BOOST_AUTO_TEST_CASE (sequence_log_test)
 Basic tests for a logarithmically spaced sequence of numbers. More...
 
 BOOST_AUTO_TEST_CASE (sequence_data_test1)
 Basic tests for a sequence defined by an unevenly spaced vector of points. More...
 
 BOOST_AUTO_TEST_CASE (sequence_data_test2)
 Alternate tests for a sequence defined by an unevenly spaced vector of points. More...
 
 BOOST_AUTO_TEST_CASE (sequence_rayfan_test)
 Basic tests for a gaussian spaced sequence of angles. More...
 

Function Documentation

BOOST_AUTO_TEST_CASE ( compute_index_test  )

Test the ability of data_grid_compute_offset() to retrieve data from a 3-D data matrix in column major order.

Generate errors if values differ by more that 1E-6 percent.

BOOST_AUTO_TEST_CASE ( earth_radius_test  )

Compare the earth's radius at specific latitudes to known values.

Generate errors if values differ by more that 1E-6 percent.

References:
WGS 84 IMPLEMENTATION MANUAL, Version 2.4, 1998. See http://www.dqts.net/wgs84.htm for more information.
BOOST_AUTO_TEST_CASE ( sequence_linear_test1  )

Basic tests for a linearly spaced sequence of numbers.

  • test (min,inc,max) form of constructor
  • test sequence use as a uBLAS vector
  • test simple accessors: use operator() form of element access
  • test find_index() methods: less than min, between elements, on element, greater than max, mix of float and int arguments
  • test conversion into a uBLAS vector
  • test iterator looping
  • separate dereferencing and pre-increment operations

Generate errors if values differ by more that 1E-6 percent.

BOOST_AUTO_TEST_CASE ( dot_test  )

Compute the dot product between set of vectors at different latitudes and a vector pointing due north.

If correct, the dots products should correspond to the angles defined by the latitudes of the original points.

Generate errors if values differ by more that 1E-6 percent.

BOOST_AUTO_TEST_CASE ( linear_1d_test  )

Interpolate 1-D linear field using a scalar.

Exercise all of the 1-D interpolation types. Generate errors if values differ by more that 1E-6 percent.

BOOST_AUTO_TEST_CASE ( dot1_test  )

Compute the dot product between a vector at different latitudes and a vector pointing due north.

If correct, the dots products should correspond to the angles defined by the latitudes of the original points.

Generate errors if values differ by more that 1E-6 percent.

BOOST_AUTO_TEST_CASE ( sequence_linear_test2  )

Alternate tests for a linearly spaced sequence of numbers.

  • test (min,inc,number) form of constructor
  • test sequence use as a uBLAS vector
  • test simple accessors: use operator[] form of element access
  • test find_index() methods: less than min, between elements, on element, greater than max, mix of float and int arguments
  • test iterator looping: integrate dereferencing and post-increment operations

Generate errors if values differ by more that 1E-6 percent.

BOOST_AUTO_TEST_CASE ( distance_test  )

Compute the straight line distance between a wposition vector at different latitudes and the point 40N 45E.

The results are compared to the analytic solution

         distance^2 = 2 R^2 ( 1-cos(40-latitude) )

Generate errors if values differ by more that 1E-6 meters. The one expection to this accuracy is the case where distance is almost zero. In that case, the calculation accuracy is limited to 0.02 meters.

BOOST_AUTO_TEST_CASE ( cubic_1d_test  )

Interpolate 1-D cubic field using a scalar.

Exercise all of the 1-D interpolation types. Generate errors if values differ by more that 1E-6 percent.

BOOST_AUTO_TEST_CASE ( sequence_log_test  )

Basic tests for a logarithmically spaced sequence of numbers.

  • test (min,inc,number) form of constructor (third octave bands)
  • test sequence use as a uBLAS vector
  • test simple accessors: use operator[] form of element access
  • test find_index() methods: less than min, between elements, on element, greater than max, mix of float and int arguments, note problem when searching exactly on element
  • test iterator looping: integrate dereferencing and post-increment operations

Generate errors if values differ by more that 1E-6 percent, except for the increment test which is only required to be within 1E-4 percent.

BOOST_AUTO_TEST_CASE ( distance1_test  )

Compute the straight line distance between a series of wposition1 vectors at different latitudes and the point 40N 45E.

The results are compared to the analytic solution

         distance^2 = 2 R^2 ( 1-cos(40-latitude) )

Generate errors if values differ by more that 1E-6 meters. The one expection to this accuracy is the case where distance is almost zero. In that case, the calculation accuracy is limited to 0.02 meters.

BOOST_AUTO_TEST_CASE ( deriv_1d_test  )

Interpolate 1-D cubic field using a scalar.

Test the accuracy of the derivatives Generate errors if values differ by more that 1E-6 percent.

BOOST_AUTO_TEST_CASE ( sequence_data_test1  )

Basic tests for a sequence defined by an unevenly spaced vector of points.

  • test data input form of constructor
  • test sequence use as a uBLAS vector
  • test simple accessors: use operator[] form of element access
  • test find_index() methods: less than min, between elements, on element, greater than max, mix of float and int arguments, note problem when searching exactly on element
  • test iterator looping: integrate dereferencing and post-increment operations

Generate errors if values differ by more that 1E-6 percent, except for the increment test which is only required to be within 1e-4 percent.

BOOST_AUTO_TEST_CASE ( gc_range_test  )

Compute the great circle range and bearing between JFK and LAX airports.

Based on the "Worked Examples" in Aviation Formulary. Requires an earth radius based on the definition where 1 nmi = 1 min latitude = 1852.0 meters. Generate errors if values differ from Williams' answers, in radians, by more that 1e-4%

The process is then reversed to predict the location of JFK using this range and bearing from LAX. Those answers are required to be within 1e-10% of the true location for JFK.

References:
E. Williams, "Aviation Formulary V1.43", http://williams.best.vwh.net/avform.htm , July 2010.
BOOST_AUTO_TEST_CASE ( datagrid_interp_speed_test  )

Interpolate 2-D cubic field using a cubic generating function and compare the speed required to interpolate 1e6 points using the fast_2d and data_grid methods.

BOOST_AUTO_TEST_CASE ( sequence_data_test2  )

Alternate tests for a sequence defined by an unevenly spaced vector of points.

  • test decreasing sequence form of constructor
  • test sequence use as a uBLAS vector
  • test simple accessors: use operator[] form of element access
  • test find_index() methods: less than min, between elements, on element, greater than max, mix of float and int arguments, note problem when searching exactly on element
  • test iterator looping: integrate dereferencing and post-increment operations

Generate errors if values differ by more that 1E-6 percent, except for the increment test which is only required to be within 1e-4 percent.

BOOST_AUTO_TEST_CASE ( sequence_rayfan_test  )

Basic tests for a gaussian spaced sequence of angles.

  • test (min,max,number) form of constructor (7 beams)
  • test sequence use as a uBLAS vector
  • test iterator looping: integrate dereferencing and post-increment operations

Generate errors if values differ by more that 1E-6 percent, except for the increment test which is only required to be within 1e-4 percent.

BOOST_AUTO_TEST_CASE ( datagrid_fast_acc_test  )

Interpolate 2-D cubic field using a cubic generating function and compare the interpolated results and their derivatives for both the fast_2d and data_grid methods to the analytic values.