вторник, 23 апреля 2013 г.

GlobalSat GH-625M Sports Tracker, Endomondo and Linux

Pareto distribution says that probably only 20 % of variants for your choice can suit your needs up to 80 %, the rest 80% is only able do this for 20%. I investigated characteristics a number of sport tracking devices and found that only few models from Polar (triathlon series) and Garmin (910 XT) can track both your geo position while you are on working in addition to heart rate, and do some measurements underwater. But this devices are certainly from the top of pricing while I'm quite new to sport enabled lifestyle and not even sure that I nee all this and not ready to pay the highest price. In addition to my doubts there are Bluetooth Heart Rate Monitors that allows you do all things with your smartphone and Endomondo application that can be cheaper than top all-in-one device even if you buy swimming-only sport watch in addition. Then I went to DealExtreme to search for probable cheaper solutions but have found the same big number of useless HRM devices and only one that does GPS, HRM and allows to sync all this data with PC. This device is GH-625M.
It's quite cool and looks much better in real life that on marketing fotos.

The first issue was the driver on CD while my optical device is disabled for a long period as of unability to work with once changed SATA motherboard. I downloaded a number of software from websites lanched Windows XP in VirtualBox and started trying all this to be able to download data from device and convert it to .gpx format to load to endomondo that helps be motivated with sport activities for a number of monthes. Neither usage of desktop only software nor other services doesn't look competitive for me (again Pareto rule, uh ?)  due to different reasons. I tried Sport Tracks, Training Gym Pro and number of offline and online converters but nothing from them gave me the file I needed to import track properly. So I tried one unoffical script that according to description was able to load data from device in a number of formats, you can download it here:
Btw, it looks crossplatform, so you can try it even if you are not linux geek. This script also does not provide files that contain hrm data compatible to endo's import, but this software allows to define data export templates and I implemented tcx format data export template with hrm data provided.
If you new to this you should download the recent version, unpack and remove the following line from templates.py:
from compiler.consts import SC_LOCAL, SC_GLOBAL, SC_FREE, SC_CELL
as described here: 
http://lizziespants.blogspot.ru/2010/11/gh-625-gps-on-linux.html
if all ok after plugin device to usb and confirming "Conect to PC?" dialog you will be able to manipulate device data records with commands like this one:
gh600_console.py c -o ./export -f gpx
If you getting errors you probably have to set permissions on /dev/ttyUSB0 device file and uncomment sugnificant line in config.ini of script folder.
This will generate you gpx track xml files to export folder, but to do valid exports you should add the following lines to exportTemplates/formats.ini file:

  
  
  <% for track in tracks %>
    
      
       
       
       
      
     <% for trackpoint in track.trackpoints %>
        
   <% endfor %>
      
      
      <% if hasattr(track, 'laps') %>
      
      <% for lap in track.laps %>
      
       $lap.distance
       $lap.calories
      
      <% endfor %>
      
      <% endif %>
    
    
  <% endfor %>
  

we should also add the preparser that will calculate average heart beat value and define maxmimum put file named tcx.py in pre subfolder of exportTemplates with the followin code:
def pre(track):
 track.hrMax = 0
 track.hrSum = 0
 track.hrAvg = 0
 for trackpoint in track.trackpoints:
  track.hrSum += trackpoint.heartrate
  if (trackpoint.heartrate > track.hrMax):
   track.hrMax = trackpoint.heartrate
 if (len(track.trackpoints) > 0 and track.hrSum > 0):
  track.hrAvg = track.hrSum / len(track.trackpoints)

Pay attention to identation as this is python. After all you will be able use command with option -f tcx to generate files formatted as required. As we have *nix power we will add udev rule for device, create file /etc/udev/rules.d/99-gpsd.rules with the following lines:
# GH-625M
SYSFS{idVendor}=="067b", SYSFS{idProduct}=="2303", SYMLINK="ttyUSB%n", GROUP="users", MODE="0666" RUN+="gsimportdata"
This will set necessary permissions when device is just connected and run /usr/bin/gsimportdata script that is also must be created by you with the following lines:
#!/bin/bash
env > /tmp/env.out
DISPLAY=:0.0
/usr/bin/notify-send -t 1 "Tracking device found" "Downloading the data started"
python /media/STORE2/globalsat/gh600_console.py c -o /media/STORE2/globalsat/export -f tcx
/usr/bin/notify-send -t 1 "Tracking device found" "Downloading the data finished"
This will show you OSD notification and launch export process automagically and no noisy buttons and dialogs:)
Nice online converter: http://www.gpsies.com/convert.do

воскресенье, 13 января 2013 г.

Android voice reading books in Russian with TTS engine

The idea of computer that is reading books for me lived in my mind for a long time. There are many audio books read by famous actors or professionals, but it is always the book you want to read has no audio version and to listen available is just like watching TV.
That's why from time to time I was looking for tts text reading recipe. First tts I seen was working for DOS operating system and be able to read texts and pronounce numbers in english. The only problem was with accents, and it's still here. But nowdays it's quite ok.
Yesterday, I installed SVOX and bought Russian voice called Katja for my android phone and know can read books using CoolReader application that supports epub, fb2 and other ebook formats. And as you can see It's very close to comfortable level of playback.

воскресенье, 8 июля 2012 г.

CMake is awesome for building C++ projects and worth few hours to learn and start using it: http://www.techminded.net/blog/modular-c-projects-with-cmake.html

среда, 4 июля 2012 г.

IT as service

Many of software developers and people other IT-related specialists really like their jobs. Like not because of good salary or nice office, not only because of this. They primarily getting fun from software engineering process. Programming, analytic, graphic design all these thing give man ability to feel joy of creation, to take part in competition between just the same but not, of course, as good as You creators. So more creation tasks they have in project more joy they have. Almost nobody like monotonous, small and non-creative tasks like fixing defects (bugs), support and develop 3rd party software.
This situation counterparts for non-IT people. Let's imaging you bring your car to service to have regular examination or just to change oil in engine. But service man made serious face and said that they should reassemble engine entirely from scratch in order to make this car able to move again. Or may be reassemble and change everything under the hood. And sure he can not believe that this car was able to drive before. You're lucky that you brought this crap to him and engineers that assembled and served it before are unskilled morons and actually real idiots. And one more thing ... This will take 3 months and cost you several hundred thousands ...
If you drive(ed) a modern car you probably has no chance to check if all things that was proposed are really needed. And you probably will not agree as you were going to just replace the oil. And you will probably try to find another service that will propose you twice cheaper solution or maybe 10 times cheaper. IT industry is kind a magic allows to perform similar looking things for really different time and price. And you probably already had same situation a month ago or you will agree this time but no more further payments. Because you just want to drive your car and not really interested to understand and have under-the-hood problems.
 This situation often is not objectively visible and understandable by IT guys as they are getting fun from job. And IT-guy is in most cases honest with you when saying that "we should rewrite everything from scratch" even if he repeats this often. One more thing here is that IT is industry of youth people. Young specialists are cheaper, more motivated, they lobby new and beautiful technologies and patterns .. and they are getting skilled on tasks like "reassemble from scratch" or "invent new kind of wheel" but not with changing oil. Getting fun and skill with your investment;)
This entry is primarily for IT-people to see the other 'client' side of process.So if you are on the developer side:
Don't try to sell 'refactoring', 'bugfixing' tasks, especially when system is developed by you, nothing from requirements was changed and will not really changed after you get it finished. You can get approval but only with high risk to loose client and reputation damage.
If you are product/business owner:
Ask what real value you will gain for your investment if you offered to invest in 'refactoring' or 'modernization' of your project.

вторник, 8 мая 2012 г.

VmWare Player on Ubuntu 12.04 with 3.2 kernel



I really don't like software that once upon a time say something, does something and than cruses and probably delete all you work results. I and you probably too hate such kind of software especially at this moments. All I want from software is to "Just work". No cool new features, updaters, asking windows and freezing for unknown reason windows please. Software must me dump and dowhatimsaying. That's why I like *nix operating systems. They still have plain and simply working software.

But software developers and product managers are working hard to bring colorfull and dialogfull world from win/mac to our spartan consoles. Recently lanched VmWare Player I got an updating window that falls after some processing and blocked usage of software:



Figuring out the problem, I tried different ways reading logs, googling and installing and uninstalling. I tried even to launch VirtualBox instead and got greeting update message:

But will not be able to run vmware image. Arrrggghhhh !!!!! What a really bastards all these people...
Both VmWare and VirtualBox and many other software always asking you to update themselves or performing updates without an permission. I know this can be disabled from application settings but this is really annoying to spend hours tweaking software on your every device or get suddenly failing behavior. Software is an tool but not Artifice Intelligence unit an required only to do what user has been requested. Do without thinking for him or asking. I want "I know what I'm doing, baby, mode" to be switched by one press/command for every software.
On this problem: googling more I found thread with VmWare Player patch for 3.2 kernel was proposed.
http://jkhofmann.dyndns.org/wordpress/?p=2008&lang=en
It required an older version of VmWare and not worked even after I downgraded my. So I had to open patch shell script (patch-modules_3.2.0.sh) and comment out version checking lines:
#[ -z "$product" ] && error "Sorry, this script is only for VMWare WorkStation $vmreqver or VMWare Player $plreqver
That helped and after some compiling by patch I got my VmWare Player working back.


вторник, 17 апреля 2012 г.

Gotta Mindmaping software ?

Gotta Mindmaping software ?

Today I visited the website of mindmapping software I prefer to use name SciPlore to download distribution and install it. But noticed message they suggest to swtich to other product named Docear: http://www.docear.org/ Well, it looks at least much better.


And behave like more smarter and comfortable tool. If you are user of FreeMind, XMind, Kdissert/Semantik or some other not very friendly or expensive software I totally recommend you to try this one. Btw, they offer some features for nerds;)

понедельник, 9 апреля 2012 г.

I've written an article on the way you can setup automatic sync of your WebDAV space that can be provided GoDaddy Online File Folder, Yandex.Disk and many other file hostings or your corporate information system. Hope it will be helpful:
http://techminded.net/blog/syncronize-webdav-with-local-folder.html