Skip to content
Browse files

Unit test for PRC triangulation

  • Loading branch information...
1 parent ea67f1f commit 2d836abf89ca279cdd2e6cd445875136031e8f91 @oleg-alexandrov oleg-alexandrov committed Nov 19, 2012
Showing with 1,853 additions and 0 deletions.
  1. +21 −0 src/asp/Sessions/tests/TestStereoSessionRPC.cxx
  2. +1,832 −0 src/asp/Sessions/tests/dg_example4.xml
View
21 src/asp/Sessions/tests/TestStereoSessionRPC.cxx
@@ -17,6 +17,7 @@
#include <asp/Sessions/RPC/StereoSessionRPC.h>
#include <asp/Sessions/RPC/RPCModel.h>
+#include <asp/Sessions/RPC/RPCStereoModel.h>
#include <asp/Sessions/DG/XML.h>
#include <test/Helpers.h>
@@ -67,3 +68,23 @@ TEST( StereoSessionRPC, InstantiateTest ) {
XMLPlatformUtils::Terminate();
}
+
+TEST( StereoSessionRPC, CheckStereo ) {
+
+ XMLPlatformUtils::Initialize();
+
+ RPCXML xml1;
+ xml1.read_from_file( "dg_example1.xml" );
+ RPCModel model1( *xml1.rpc_ptr() );
+
+ RPCXML xml2;
+ xml2.read_from_file( "dg_example4.xml" );
+ RPCModel model2( *xml2.rpc_ptr() );
+ std::cout << std::endl;
+
+ RPCStereoModel RPC_stereo(&model1, &model2);
+ double error;
+ Vector3 p = RPC_stereo(Vector2(), Vector2(), error);
+
+ EXPECT_NEAR( error, 54682.96251543280232, 1e-3 );
+}
View
1,832 src/asp/Sessions/tests/dg_example4.xml
1,832 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.

0 comments on commit 2d836ab

Please sign in to comment.
Something went wrong with that request. Please try again.