-----Loop#:527887 IMU#:502 >> 1Sec:100282456 >> 1Sec m:1002822 >> IMUcc:97262 m:972
#125735 @18:55.20_133958 [fix:3 #:13 GPScc:273788 m:2737 >> cctAv:179999638 >> GSecs:25162.056641
#125736 @18:55.20_200134036 [fix:3 #:13 GPScc:252730 m:2527 >> cctAv:179999638 >> GSecs:25162.255859
#125737 @18:55.20_400134114 [fix:3 #:13 GPScc:218477 m:2184 >> cctAv:179999638 >> GSecs:25162.455078
#125738 @18:55.20_600134191 [fix:3 #:13 GPScc:218364 m:2183 >> cctAv:179999638 >> GSecs:25162.656250
#125739 @18:55.20_800134269 [fix:3 #:13 GPScc:218395 m:2184 >> cctAv:179999638 >> GSecs:25162.855469
-----Loop#:526997 IMU#:501 >> 1Sec:100081656 >> 1Sec m:1000815 >> IMUcc:96699 m:967
#125740 @18:55.21_134347 [fix:3 #:13 GPScc:303313 m:3033 >> cctAv:179999636 >> GSecs:25163.056641
#125741 @18:55.21_200134425 [fix:3 #:12 GPScc:218348 m:2183 >> cctAv:179999636 >> GSecs:25163.253906
#125742 @18:55.21_400134503 [fix:3 #:13 GPScc:218469 m:2184 >> cctAv:179999636 >> GSecs:25163.455078
#125743 @18:55.21_600134580 [fix:3 #:13 GPScc:218329 m:2183 >> cctAv:179999636 >> GSecs:25163.650391
#125744 @18:55.21_800134658 [fix:3 #:13 GPScc:288940 m:2889 >> cctAv:179999636 >> GSecs:25163.855469
[U]25035[/U].857422, 51.558754,157.131332,-130.056442, 61.444206, 48.214287,-122.450378, 44.043186, 0.995511, 0.617421, 0.309625, -0.309625, 1.000000, -1.000000, 1.004640, 0.593265, 0.234252, -0.234252, 1.000000, -1.000000, -0.772090, -0.003785, 0.671898, -0.671898, 3.000000, -3.000000, -0.055216, -0.004384, 0.133116, -0.133116, 0.050000, -0.050000, 0.040216, -0.000932, 0.080003, -0.080003, 0.050000, -0.050000, -0.001872, -0.009031, 0.019574, -0.019574, 0.050000, -0.050000, 0.000060, -0.000054, 0.001834, -0.001834, 0.020000, -0.020000, -0.001474, -0.000108, 0.003398, -0.003398, 0.020000, -0.020000, -0.001199, -0.000030, 0.002241, -0.002241, 0.020000, -0.020000, 0.165113, 0.165128, 0.287418, 0.049693, 0.049701, 0.049691, 0.039093, 0.034253, 0.043693, 0.087843, 0.089925, 0.093995, 0.008024, 0.007987, 0.008064,
[U]25036[/U].058594, 51.595146,157.052261,-129.967941, 61.532707, 48.214287,-122.450378, 44.056091, 0.996784, 0.649004, 0.294811, -0.294811, 1.000000, -1.000000, 0.973685, 0.623530, 0.218341, -0.218341, 1.000000, -1.000000, -0.741915, -0.079926, 0.610357, -0.610357, 3.000000, -3.000000, -0.034069, -0.011226, 0.128768, -0.128768, 0.050000, -0.050000, 0.027645, -0.000566, 0.080106, -0.080106, 0.050000, -0.050000, -0.001893, -0.007750, 0.018635, -0.018635, 0.050000, -0.050000, -0.001061, -0.000015, 0.001798, -0.001798, 0.020000, -0.020000, 0.001518, 0.000177, 0.003129, -0.003129, 0.020000, -0.020000, 0.002128, 0.000155, 0.002166, -0.002166, 0.020000, -0.020000, 0.165166, 0.165181, 0.287449, 0.049699, 0.049707, 0.049697, 0.039145, 0.034326, 0.043603, 0.087843, 0.089925, 0.093995, 0.008024, 0.007988, 0.008063,
[U]25036[/U].253906, 51.404800,157.183502,-129.656250, 61.844410, 48.214287,-122.450378, 44.066120, 0.958063, 0.676127, 0.281784, -0.281784, 1.000000, -1.000000, 0.961798, 0.649059, 0.208417, -0.208417, 1.000000, -1.000000, -0.623292, -0.144631, 0.551986, -0.551986, 3.000000, -3.000000, -0.082509, -0.017187, 0.127509, -0.127509, 0.050000, -0.050000, 0.061319, -0.000731, 0.079974, -0.079974, 0.050000, -0.050000, 0.013318, -0.006627, 0.018787, -0.018787, 0.050000, -0.050000, 0.002967, 0.000019, 0.001844, -0.001844, 0.020000, -0.020000, 0.000481, 0.000172, 0.003128, -0.003128, 0.020000, -0.020000, -0.002260, 0.000121, 0.002195, -0.002195, 0.020000, -0.020000, 0.165038, 0.165053, 0.287373, 0.049690, 0.049698, 0.049688, 0.039008, 0.034337, 0.043694, 0.087843, 0.089924, 0.093995, 0.008023, 0.007988, 0.008064,
Tim,
You had asked about propFlag. I was using it to tell me when the EKF Update stage had been entered. I should have called it updateFlag, so I'll fix that. Sorry about the confusion.
The 77 parms I was pulling for TViewer were calculated/updated only in the EKF Update stage only (i.e., not in the Propagation stage).
Don
void serialPrint() {
int packetLength = 77;
for ( int jj = 1; jj < packetLength; jj++ ) {
if ( std::isnan( MST_PrintVals[jj] ) ) {
Serial.print("ASSERT: NaN Fail index = ");
Serial.println(jj);
assert_( !std::isnan( MST_PrintVals[jj] ) );
}
}
Used your code (on Master side). For Slave side, think I just fixed my version back to the Double version.
40644.898438, 51.723366
40645.097656, 51.617958
40645.300781, 51.613396
40645.500000, 51.692844
40645.699219, 51.777229
40645.898438, 51.586086
40646.097656, 51.642738
40646.296875, 51.594997
40646.492188, 51.602314
40646.695312, 51.618885
40646.898438, 51.732101
40647.097656, 51.705627
propFlag = Filter.getekfPropFlag();
if (propFlag) {
ENTER:: 's' serialPrint ON, 'h' serialPrint OFF, '?' this
ASSERT: NaN Fail index = 62
___ ASSERT FAILED ___ FILE, LINE#, Expression
T:\tCode\_GPSimuDK\5Apr18\uNavINS_CB_Ver4\C_serialPrint.ino
143
!std::isnan( MST_PrintVals[jj] )
___ ASSERT FAILED ___ STOPPING !!!!
Using the Cycle Counter in :: T_timeBase.ino
// in SetupPartsec() must be called AFTER gps.begin()
// Cycle Counter must be started in SetupPartsec()
// With RTC enabled in SetupPartsec() this _isr gets the tick of each RTC second : rtc_seconds_isr(void)
uint32_t ccNow = ARM_DWT_CYCCNT; // this reads the current cycle counter to ccNow
coutD.print( ccPartSec( ccTimeNow_IMU, ccNow ) ); // this returns the 10's of nanoseconds since the IMU interrupt set ccTimeNow_IMU
DrtcTime = GetSeconds(); // get the double value of seconds and 10's of nanoseconds based on Teensy RTC since active at powerup
// Added these globals to MAIN.ino
volatile uint32_t ccTimeNow_IMU = 0;
volatile uint32_t ccTimeNow_GPS = 0;
volatile uint32_t cctAvg = F_CPU;
Circular_Buffer<uint32_t, 4> cctASec;
// in MAIN.ino - records time of incoming data ready interrupt
void runFilter() {
ccTimeNow_IMU = ARM_DWT_CYCCNT; // records time of IMU data ready for reference - or compare to prior to know time between
newIMUData = 1;
}
// in T_timebase.ino - catches start of GPS incoming serial data : setup and attach in in SetupPartsec()
void GPS_serialrx_isr() {
ccTimeNow_GPS = ARM_DWT_CYCCNT; // records time of GPS Tx begin for reference - or compare to prior to know time between
detachInterrupt(digitalPinToInterrupt(GPS_SRX)); // must re-attach interrupt on receive complete
}
Sketch uses 135728 bytes (12%) of program storage space. Maximum is 1048576 bytes.
Global variables use 47440 bytes (18%) of dynamic memory, leaving 214704
void runFilter() {
ccTimeNow_IMU = ARM_DWT_CYCCNT;
void GPS_serialrx_isr() {
ccTimeNow_GPS = ARM_DWT_CYCCNT;
static uint32_t cctLast = 0;
// ...
coutD.print( ccPartSec( cctLast, ccNow ) );
cctLast = ccNow;
static uint32_t cctLast_IMU = 0;
// ...
coutD.print( ccPartSec( cctLast_IMU, ccTimeNow_IMU ) );
cctLast_IMU = ccTimeNow_IMU;
float FccPartSec( uint32_t CntPri1, uint32_t CntPri2 ) { // 6A18
return ((CntPri2 - CntPri1) / (float)cctAvg);
}
static uint32_t cctLast_IMU = 0;
// ...
char textTemp[30];
dtostrf( FccPartSec( cctLast_IMU, ccTimeNow_IMU ), 10, 8, textTemp);
coutD.print( textTemp );
cctLast_IMU = ccTimeNow_IMU;