Sunday, June 25, 2017

Surf Tracker Garmin Vivoactive HR [update]


update 9/19/18

basically finished modifying python scripts to batch download .fit files from the garmin IQ web site,  extract the raw data, and convert to kml files to view on google earth.

just recently back to comparing extracted .fit data with gopro video files in order to tweak algorithm.  a bit tedious as have over 700 waves.  hope to update results in the next few weeks.

my focus is on speed and distance profiles vice minimums.


+ + + + + + +

some observations comparing the wave file generated by the app and what I get when processing the raw data (extracted from the tcx file).  I only recently installed surf tracker 2 so will update once I get some rides in.

In applying the wave logic used by the app (e.g. minimum speed [9 kph], minimum ride time [6 seconds], at least speed [13 kph]) to the raw data there was

high correlation in # of waves (80 out of 82) and max speed of wave (72/82 exact match, 77/82 within .1 kph (rounding?)).
medium correlation for ride time. Same for 55 of 82 and 63 of 82 within 2 seconds
medium correlation for wave distance when ride time matched.  -23% to +13% when time matched (52 waves)

Since, with exception of # of waves caught and max speed of those waves, there are significant discrepancies in the ride time and distance when post processing raw data i conclude they must be due to applying the algorithm in real time vice after the fact.

However, I did capture a significant number of waves on a gopro so was able to review the video in an attempt to validate the wave ride time.  For the largest discrepancies (difference of more than 4 seconds) the raw data had zero's in the speed, lat and long for the difference in time.  For example, raw data had valid data for ride time of 18 seconds, then zero's for an additional 15 seconds (most of which the watch was under water).  The app recorded the ride time as 33 seconds so it may be the app logic continues to give credit for ride time until a valid (i.e. non zero) speed is below the minimum.

At the moment I do not have a hypothesis about the discrepancies in wave distance.  The majority are shorter on the app than post processing (10 longer , 45 shorter when waver ride time was same)

I have updated my python code to capture the time zone and street location of each wave.  time zone was necessary to correct to local time as tcx time data is gmt.

Sunday, February 12, 2017

Surf Tracker Garmin Vivoactive HR

installed the Surf Tracker app and with a little coding was able to generate surf tracks on google earth and go from this

















to this




what I used (windows 10, surf tracker app, garmin connect iq web site, python 2.7, and google earth pro.  except for win 10, everything else is free)




basic steps
1)  install the wave tracker app on your device
2) sync your device with connect IQ
3) download the files from connect IQ to your desktop/laptop
4) process the files to generate individual ride data
5) generate kml files and upload to google earth


1) from connect IQ download and install the surf tracker app on your device (vivoactive HR for me)
https://apps.garmin.com/en-US/apps/ded87d46-5477-4ca7-a247-847b896393e0


2) once you have recorded a surf session, sync your device and the activity will show up in your garmin connect dashboard looking something like the first picture

3)   There are python scripts out there that will log into the garmin web site and batch download your activity files.  I found these two references to be very helpful and modified to suit my needs.
- Kyle Krafka (https://github.com/kjkjava/)
- Johannes Heinrich (https://github.com/JohannesHeinrich/)

4) Wrote a python script to process the data in each downloaded file.  Applies the same logic to the raw data (one data point per second) to determine which points represent when you are riding a wave.  currently using faster than 9 kph for at least 6 seconds. 

which format to download?

choices are .fit (original), tcx or gpx.  originally i downloaded the garmin data files in tcx format which is essentially an xml file as python coding to extract the raw data was easier for me. gpx is similar format.  there are nuances between tcx and gpx data elements although both have basic time stamp, lat and long.

recently switch to downloading .fit files as it is the orginal file and found python library FitParse that could extract the data elements I needed.

https://github.com/dtcooper/python-fitparse

5) Wrote python script to convert the time stamp, lat / long data for each ride into kml format.  then copy kml files to google earth.



old post (to be deleted)



left click the settings icon (gear icon upper right next to the lock icon) and choose “export to tcx”
Extract the. tcx file into your working directory
My last file name was 1550456722.tcx and 1,799 KB in size
The file is in xml format so you can read with text editor
I wrote a script in python to parse the file using beautifulsoup module and generate kml file using simplekml module
Import kml file into google earth pro

I wrote a python script that uses same logic as surf tracker to identify start and stop points and only keep data in between. happy to share if anyone is interested.  leave me a comment.

alternatively you can use golden cheetah to import fit file, extract data points, save to csv file, apply logic to generate discrete waves (i.e. at least 6 seconds, minimum speed = 9kph) then upload to google earth. 

From golden cheetah, click “Import data” and choose your .fit file
Progress stops half way (after validation).  Click save
Should get import complete.  Click finish
Remove unwanted columns. [Right click, remove column]
[I use only 4 - time, speed, latitude, longitude]
Left click on “entire Activity” to highlight all the rows
Right click to copy and paste into excel spreadsheet.
Save as csv file (I use rawdata.csv)

I did not use Activity, Export to create the CSV file as that only kept lat/long to 4 decimal places.   Using select activity I was able to capture 8 digits which plotted much better

Extract data points to plot.  

Save output to csv file.  Header row "Latitude, Longitude"
From google earth pro, import csv file

Monday, January 16, 2017

Garmin Vivoactive HR

Have had the device for 3 weeks (as of 16 Jan 2016) .  Use it for tracking steps, sleep, cycling, swimming, and golf so far.

About me - play golf once a week (sometimes more), swim laps couple times a week, go for casual bike rides on occasion.

In general does what i need it to do.  However if I was serious about keeping track of all my data for analysis then not so good so far as mt data files got corrupted.

Good.
-  Does what I need it to do.


Could be better
-  Takes some getting used to on swiping or pushing a button to get to the screen that you want.
- Does not automatically change time zones (t does after sync).
- Golf tracking

Awful
- Syncing data.    Data on watch, connect mobile app, and connect mobile via web from PC got out of sync.  No way to recover.

Specifics

Data out of sync

Loaded mobile connect app on my iphone, created an account on garmin connect, and paired my device.  was able to see my activities on my app on iphone.  then after a week  accessed & synced my device using garmin express on my PC (usb connection).  Somehow the data got out of sync so what I saw via the garmin connect account via web from PC did not match what was on the garmin connect app on my phone.  no overlapping data.  For example steps for some days on the phone and other days via web access from PC.

What I noticed for golf was when you sync with garmin express the golf data file (xml format) stays on the device.  however when you sync via the connect mobile app on the iphone, the data file gets removed.  As there is limited space on the device (10MB), it makes sense to remove files after sync.  However if it does with one app (iphone) but not with the other (garmin express) then that appears to be the cause oif my issue.

Golf

While you can download all the courses you want from the mobile app, the device only stores 4 courses at a time.  When you get to the golf course, if the course you are playing is not one of the 4 loaded on your device, you need to you need sync.

Does not keep track of which tees you played from and only records score (not putts, FIR, /GIR, etc)

Once you sync with app the xml data file for the round is deleted from the device.  Therefore you need to copy the file before you sync if you want to be able to analyze or edit the data on your own.

Thursday, December 22, 2016

Miata NA (1991) Valve Gasket Replacement


Fairly straight forward procedure on my 91 Miata.

references

http://www.miata.net/garage/valvecover/index.html

https://www.youtube.com/watch?v=CBisuD6HeFo

Couple of my observations

 I did not have to mess with any electrical connections. By removing the two 12mm bolts, one on either side of the spark plug wire bracket, I was able to slide the cover out.

Be careful tightening the 3 inside bolts along the center line. I snapped the center bolt. After removing the valve cover I was able to easily back out the bottom 1/3 of the bolt. Initially I thought I might have to use a bolt extractor. Bolt was available at home depot (flange bolt M6 x 1.0mm x 40mm.

Bought a Sears craftsman "clicker style" in-lb torque wrench (on sale for $50) to eliminate guess work for tightening bolts to 43 - 78 INCH-lbs the second time around. Unfortunately it did not "click" no matter what torque setting. Reading the reviews (after I bought it of course) appears I was not the only one.
Bought gasket from O'Reilly's auto store. Fit fine. Gasket sealant does not come with despite what the salesman told me so another trip back to the store. Only later to realize I already had some.





Sunday, November 27, 2016

Telnet into VSTARCAM T6835WIP PnP IP Network Camera


Given Mirai malware was interested in my vulnerability and found the password on a russian web site (thanks google translate).  If I can figure it out then the "bad guys" already have it.  Therefore I feel comfortable sharing so folks can actually do something about it (i.e. change the password)

login: root
password: 2011vsta

on a windows 10 machine, used Putty

Host name: 192.168.0.192
Connection type: Telnet
Port: 23



typing in busbox at the # lists available functions
use chpasswd to change password

# chpasswd (enter chpasswd at #)
root:newpassword (on blank line enter root:'newpassword'

should get response
Password for 'root' changed

hit enter and ignore the message
chpasswd: missing new password

Tuesday, October 25, 2016

Scorpion Bay Surf Trip - Oct 2016

Preparations
- Read Baja Surf Guide or at least visit http://www.thesurfersguides.com. Lots of good advice.
- I bought a DSURF travel bag. 10' and holds 2 boards.  Bag got trashed by the airline on the return flight so something to consider if thinking about renting a bag.  Do not recommend the bag as need a sturdier canvas outer shell.
- No ATM's in San Juanico.  Several in Loreto

Getting there from Loreto Airport (as of Oct 2016)
-  3:15 minutes via highway 1 south, then west, then north.
-  Google maps/Garmin no good once you are north of  Ciudad Insurgentes.  Looks like it has been several years since last google earth/maps update.
- Watch out for two unmarked speed bumps as you drive through a small town 10 miles north of Ciudad Insurgentes.
- Take Las Barrancas exit (25.9939 N,-112.1162 W) about 55 miles/88km from Ciudad Insurgentes .  Follow signs to San Juanico.  About 45 minutes to town of San Juanico


Driving/Roads
- Roads were in good shape, mostly.  Paved all the way except for spots when when they were not.
- Roads are narrow and drop off with very little shoulder.  If you need to bail right to make room for an on coming truck, careful you don't get a tire over the edge.
-  Take it easy heading south from Loreto as lots of hills and winding roads.  Only policia I saw was 10 minutes south of  the airport.
- You can make good time once you turn west and then north as roads were straight and in good shape, mostly
-  Roads were washed out in several places so road conditions can go from perfect asphalt to 2 foot drop off without warning.

Surf
- mostly surfed 2nd point.  occasional waist high.  a bit crowded as more folks (~10 - 12) waiting at the point than waves in a set.  mostly friendly with better surfers somehow not managing to wait in the line up

Scorpion Bay Hotel
- Good news A/C and Wifi
- Bad news they shut the power off at 11 pm most nights so obviously no A/C or Wifi
- rooms were nice and staff friendly
- Wifi was a shared connection so limited bandwidth.  no streaming.

Remote Desktop Connection Black Screen Raspberry Pi [solved]

Readers Digest version:  Change resolution in the /boot/config,txt file

Long version

Replaced motherboard on my desktop to include installing new graphics drivers.

Tried to RDC into the Pi and got the black screen.  Connection was OK as I could SSH in.

sudo nano /boot/config.txt

had to change both the overscan (top,bottom, left, and right) as well as hdmi_group and _mode.

http://www.opentechguides.com/how-to/article/raspberry-pi/28/raspi-display-setting.html