Skip to content

Commit

Permalink
Defined PI out to 16 decimal places to match double precision accurac…
Browse files Browse the repository at this point in the history
…y, which cleared up some angle calculation differences between C++ and MATLAB with test harness matrices. Also fixed an issue in prep_R where psuedo-measurement values weren't being re-initialized when GS_OPTIMIZE wasn't set.
  • Loading branch information
garydblack committed Dec 3, 2020
1 parent 297dd93 commit 20ac981
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions state-estimator/include/SELoopWorker.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1525,6 +1525,7 @@ class SELoopWorker {
#endif

// -- compute K = P_predict*J'*S^-1
// TODO December 21, 2020 CHECK Supd, Kupd between C++ and MATLAB

#ifdef DEBUG_PRIMARY
double startTime;
Expand Down Expand Up @@ -2271,6 +2272,14 @@ class SELoopWorker {
#endif
}
}
#ifndef GS_OPTIMIZE
// for psuedo-measurements when not using the GS optimized
// C-sparse functions, Rraw is created from scratch to need
// to re-initialize those values every prep_R call
else
cs_entry_negl(Rraw,zary.zidxs[zid],zary.zidxs[zid],
zary.zsigs[zid]*zary.zsigs[zid]);
#endif
}

#ifndef GS_OPTIMIZE
Expand Down
3 changes: 2 additions & 1 deletion state-estimator/src/state-estimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
// test harness related conditional compilation values
//#define TEST_HARNESS_DIR "test_4"
//#define TEST_HARNESS_DIR "test_4vinj"
//#define TEST_HARNESS_DIR "test_4net"
//#define TEST_HARNESS_DIR "test_13assets"
#ifdef TEST_HARNESS_DIR
// whether to get node_vnoms from file or hardwire to 1
Expand All @@ -26,7 +27,7 @@
//#define TEST_HARNESS_WRITE_FILES
//#define TEST_HARNESS_DEBUG

#define PI 3.1415926535
#define PI 3.141592653589793

#include <iostream>

Expand Down

0 comments on commit 20ac981

Please sign in to comment.