BaseCamp GPX route cleaner

If you create a route in base camp and export it in the GPX format, many additional waypoints are stored in an file extension in addition to the one created by you. These should help the navigation system to use the same route you created on the pc, but in my experience those tend to create trouble (errors like unable to recompute a route while driving).

To avoid these problems I removed these waypoints by importing the route into QLandkarte GT and export it thereafter. Unfortunately some information is lost:

  • Name of the waypoint
  • If the waypoint should be displayed or is only there to assist the routing
  • Used Icon

Since the information loos and the invocation of a second program was annoying I created a sed command to remove only these additional waypoints:

sed -n '1h 
        # if the sought-after regex is not found, append the pattern space to hold space
        /        <gpxx:RoutePointExtension>.*<\/gpxx:RoutePointExtension>/ !H
        # copy hold space into pattern space
        # if the regex is found, then...
        /        <gpxx:RoutePointExtension>.*<\/gpxx:RoutePointExtension>/ {
                # the regular expression
                s/        <gpxx:RoutePointExtension>.*<\/gpxx:RoutePointExtension>//g
                # print 
                # read the next line into the pattern space
                # copy the pattern space into the hold space
        # copy pattern buffer into hold buffer
# if the last line then print
' input.GPX > output.GPX 

For convenience I put it in an Automator-programm that supports Drag&Drop. I can be downloaded here.

Tanita BC-601 converter to rubiTrack

To use the automated import of ;rubiTrack for the data created by a Tanita BC-601 I modified the script from trinity a bit. It creates two files, one CSV file with all values and one for the rubitrack import.



echo "date; age; size; work; weight; bmi; visc_fat; fatmass; fatmass_percent; musclemass; bonemass; calories; metabolic_age; bodywater; arm_l; arm_r; leg_l; leg_r; trunk"
echo "date; age; size; work; weight; bmi; visc_fat; fatmass; fatmass_percent; musclemass; bonemass; calories; metabolic_age; bodywater; arm_l; arm_r; leg_l; leg_r; trunk" &gt; $output_all
echo "date;weight;fatmass;fatmass_percent;musclemass;bonemass;amr;metabolic_age;bodywater;visceralfat_percent" &gt; $output_rubi

while read line; do
 line2=$(echo $line | sed -e 's/,/;/g')
 #line2=$(echo $line | sed -e 's/,/;/g' -e 's/\./,/g')

 date=$(echo $line2 | cut -d ";" -f14 | tr -d "\"")
 date_year=$(echo $date | cut -d / -f 3)
 date_month=$(echo $date | cut -d / -f 2)
 date_day=$(echo $date | cut -d / -f 1)
 time=$(echo $line2 | cut -d ";" -f16 | tr -d "\"")
 age=$(echo $line2 | cut -d ";" -f22)
 size=$(echo $line2 | cut -d ";" -f24)
 work=$(echo $line2 | cut -d ";" -f26)
 weight=$(echo $line2 | cut -d ";" -f28)
 bmi=$(echo $line2 | cut -d ";" -f30)
 visc_relative=$(echo $line2 | cut -d ";" -f58)
 fat_sum=$(echo $line2 | cut -d ";" -f32)
 fat_total=$(echo "scale=4; $weight/100*$fat_sum" | bc)
 muscle=$(echo $line2 | cut -d ";" -f44)
 bones=$(echo $line2 | cut -d ";" -f56)
 calories=$(echo $line2 | cut -d ";" -f60)
 meta_age=$(echo $line2 | cut -d ";" -f62)
 water=$(echo $line2 | cut -d ";" -f64)
 arm_l=$(echo $line2 | cut -d ";" -f34)
 arm_r=$(echo $line2 | cut -d ";" -f36)
 leg_l=$(echo $line2 | cut -d ";" -f40)
 leg_r=$(echo $line2 | cut -d ";" -f38)
 trunk=$(echo $line2 | cut -d ";" -f42)

 echo "$date_year-$date_month-$date_day $time; $age; $size; $work; $weight; $bmi; $visc_relative; $fat_total; $fat_sum; $muscle; $bones; $calories; $meta_age; $water; $arm_l; $arm_r; $leg_l; $leg_r; $trunk" 
 echo "$date_year-$date_month-$date_day $time; $age; $size; $work; $weight; $bmi; $visc_relative; $fat_total; $fat_sum; $muscle; $bones; $calories; $meta_age; $water; $arm_l; $arm_r; $leg_l; $leg_r; $trunk" &gt;&gt; $output_all
 echo "$date_year-$date_month-$date_day $time;$weight;$fat_total;$fat_sum;$muscle;$bones;$calories;$meta_age;$water;$visc_relative" &gt;&gt; $output_rubi

done &lt; $file

CycleMap: Update 28.04.2014

Since the last update a few changes were made:

  • Starting today all newly generated maps should contain the country in the name displayed in baseCamp. This should help working with different countries.
  • A fault in the generation of the overview maps has been corrected.
  • The relations with the “network” type are now also used to generate the cycle networks.

Any help for better documentation or patches for the scripts are welcome. Also hints which countries are missing.

An efficient approach to tolerate attackers in fault-tolerant systems

I presented on the conference Sicherheit 2014 a Paper a paper motivating an approach to utilize the redundancy in fault tolerant systems also to tolerate attackers.

Abstract: Malicious attackers can cause severe damage (financially or to the environment) if they gain control of safety-relevant systems. This paper shows why the traditional disjoint treatment of security and fault tolerance has weaknesses if the attacker gains access to the fault tolerant system and how an integrated approach that utilize existing fault tolerance techniques could be an effective security mechanism. An efficient integrated safety and security approach is presented for fault tolerant systems, which achieves protection against attacks via the network by forming a logically isolated (sub-) network which is resilient against a bug in the codebase. Isolation is obtained by diverse design of a general reusable (software and/or hardware) compo- nent that prevents any unauthorized message transfer towards the secured application program. Messages from other compromised nodes are tolerated utilizing existing majority voting mechanism.

The Paper is published in the proceedings and also without the other paper on this website.

Test setup

To test different applications (ceph, ansible, openstack, ganeti, KVM and other) of interest I was in need of a test setup.
I had some requirements:

  • Not too expensive
  • Does not need much space
  • Support of hardware virtualization for Xen HVM guests an Linux KVM setups.
  • Gigabit Ethernet

After some research I found the Zotac ID18 boxes. Small, gigabit ethernet, PXE support, Intel-VT support. I ordered four of them and fittet them with a switch and an external hard drive in a small shelf. Each ID18 has been equipped with 4GB of RAM and a 250GB internal hard disk.

In addition to the ID18 boxes (named blue, green, white and red according to the color of the ethernet cables) I use some virtual servers inside virtualbox to create a support infrastructure and allow for some larger setups.

  • grey-router: Router connected to the internet and the internal network ( Provides NAT, dns server and ntp server.
  • grey-fai: Server for automated installation using fai. Provides nfs, tftp and dhcp.
  • grey-ansible: Separate vServer as an ansible control host. I currently plan to use ansible to create each test setup, starting witch a base system with Debian wheezy provided by fai.
  • grey-v[1-4]: additional vServers to accompany blue, green, white and red in test setups)

The setup visualized:

Interesting discovery till now: The TP-Link TL-SG105 switch does not work with the ID18 boxes when using PXE. The dhcp requests are transmitted, but arp-requests or tftp packets got lost. After booting a linux system, the switch works without any problems. Since the need to bypass the switch for PXE/fai installation is annoying, a replacement has been ordered.

Radkarte/Cycle Map: Update 31.12.2013

Since the last update a few changes were made:

  • The process of updating the program binaries have been decoupled from the map building. They can now updated separately.
  • The directory structure for map creation has been reorganized. It should be much clearer now.
  • The different map -layers have been renamed to english names.
  • The new compatibility files needed for the newest mkgmap version have been included.
  • The address search has been enabled in the “SsingleMap.

Any help for better documentation or patches for the scripts are welcome. Also hints which countries are missing.