Skip to content

Commit

Permalink
correct offset and lta calc
Browse files Browse the repository at this point in the history
  • Loading branch information
gareth-nicholls committed Mar 19, 2021
1 parent 79094dc commit 3255cea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions firmware/WatsonIoT/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ void loop() {
}
}
for (int j = 0; j < 3; j++) {
offset[j] = sampleSUM[j] / (QUE_len-2);
offset[j] = sampleSUM[j] / (QUE_len);
}

/////////////////// find lta /////////////////
Expand All @@ -910,7 +910,7 @@ void loop() {
}
}
for (int j = 0; j < 3; j++) {
ltav[j] = sampleSUM[j] / (LTA_len-2);
ltav[j] = sampleSUM[j] / (LTA_len);
}

//////////////////// find sta ///////////////////////
Expand Down Expand Up @@ -981,7 +981,7 @@ void loop() {
if( bPossibleEarthQuake ) {
bPossibleEarthQuake=false;
// Start sending 5 minutes of live accelerometer data
numSecsOfAccelReadings = 300 ;
numSecsOfAccelReadings = 2 ; // GARETH 300 ;
// Send the previous 10 seconds of history to the cloud
Send10Seconds2Cloud();
}
Expand Down

0 comments on commit 3255cea

Please # to comment.