GithubHelp home page GithubHelp logo

Comments (6)

johnwalicki avatar johnwalicki commented on June 17, 2024

Vaclav, RUWO and John met on 12/09/2020 to discuss the STA/LTA algorithm implementation on how to detect quakes.
Here are some minutes of that discussion:
Attendees: @vaclav Kuna @RUWO @john Walicki

  • Vaclav reviewed his Python STA/LTA algorithm implementations (there is a loop technique and a Matrix math technique)
  • The board needs to store 10 seconds of data [x,y,z] in some array.
  • Run the algorithm on new readings (32 samples from the last second) and the prior 10 seconds. So its really 11 seconds of data.
  • Better to run the algorithm on each of the 32 new values against the prior array of values.
  • John suggested that we don't think of the prior 10 seconds of data in terms of seconds, just a queue of 320 values. There are a variety of example First In First Out queue implementations on StackOverflow.
  • If the result is greater than a threshold ( 3 is a good compromise but might be different for different sensors), send the prior 10 seconds to the cloud and start sending real time accelerometer data for the next 5 minutes
  • We discussed being able to adjust the Threshold via a MQTT topic on a per sensor basis. If one sensor is located in a "noisy" environment and is throwing lots of false positives, we could tell it to up its threshold via a message sent down from the cloud. Tabled as an advanced feature.
  • Since John received a new board from Andy today, he could possibly send his old board to Belgium. The old board has a working ESP32 and ADXL355 but other components are flakey. Wout only needs the ESP32 and ADXL355.
  • Split the project into several steps.
    • Implement a FIFO queue that stores/manages the prior 320 readings (10 seconds)
    • Implement a function which sends this bigger block of data via MQTT to the cloud. (Current implement is sending 1 second at a time and would need to be modified with larger buffers)
    • Iterate on the STA/LTA algorithm
    • When the 10 second block of data arrives in the cloud, store it somewhere, start the alarm process?

from openeew-sensor.

johnwalicki avatar johnwalicki commented on June 17, 2024

Firmware version 1.3.0 branch is open. I am working on the STA/LTA algorithm in v1.3.0
https://github.com/openeew/openeew-sensor/tree/version130

from openeew-sensor.

johnwalicki avatar johnwalicki commented on June 17, 2024

Sections of code required to implement this feature are landing in the version130 branch
6edafb8
abc14a9

from openeew-sensor.

johnwalicki avatar johnwalicki commented on June 17, 2024

When sending 10 seconds of accelerometer data to the cloud, it should really include timestamps. Currently the two patches in this feature just store the prior 10 seconds of accelerometer X,Y,Z data in a FIFO queue of 320 readings ( 32 readings/second x 10 seconds ). Time is relative to "now", there's no absolute timestamp. When we transmit and subsequently store the data in the cloud database for later analysis, there's no reference point. I need to add timestamps to the FIFO queue.

Note that the 32 readings are sampled once per second so the timestamp accuracy is going to be slightly off. Since the order of samples is preserved, the analysis could spread the samples "across" that trailing second.

Note its a trailing second. the program will record the timestamp when it reads the ADXL355 buffer (which contained the prior second's worth of data) That timestamp will be the prior 32 samples.

from openeew-sensor.

andygrillo avatar andygrillo commented on June 17, 2024

from openeew-sensor.

johnwalicki avatar johnwalicki commented on June 17, 2024

Firmware v1.3.0 has been published
This Issue has been closed via #61

from openeew-sensor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.