Sunday, April 21, 2019

San Juan Islands, WA

Data logging in San Juan Islands, Washington:

Apr 19-21, San Juan Island

Apr 22, San Juan Island to Orcas Island

Apr 23, Hiking in Orcas Island

Apr 24, Hiking in Orcas Island, Mountain Lake

Apr-25, Back ashore


Data logging was done as explained here, here and here.

Tuesday, March 12, 2019

Easy Low Pass Filter

Instead of implementing a buffer and smooth it, there is a much easier and efficient way to do it. Here is a simple JavaScript implementation. First you define your accumulator function:
 function lowPass(alpha, value, acc) {
   return (value * alpha) + (acc * (1 - alpha));
 }
Then you need to define your APLHA coefficient:
 const ALPHA = 0.015;
Then you can invoke the accumulator with the aplha coefficient on the data to smooth:
 let filteredGustArray = [];
 let acc = 0;
 data.data.forEach(dp => {
   acc = lowPass(ALPHA, dp.gust, acc);
   filteredGustArray.push(acc);
 });
This produces an array containing the smoothed data. Here is a representation of what it looks like, along with the data to smooth (raw data in red, smoothed data in blue):
The demo data are available here. Just run the script with nodejs like
 $ node max.gust.js both > data.csv
This will produce a csv file you can then import into any spreadsheet program, to see the figure above.

Monday, March 11, 2019

Smart TCP Watch, prototype.

TCP, no BlueTooth (and as a result, no Smart Phone) is required. The "watch" can connect directly to the network.
See a first prototype here.
And a short video here.