Category Archives: geek

Flight corridors of commercial aviation

I used to telecommute weekly from Madrid to London and back. Flying into London from Monday to Thursday became part of my lifestyle for a long time.

The itinerary Madrid (Terminal 1) to London Gatwick (South Terminal) and viceversa was part of my routine to the point that I knew the codes of my flights by heart.

Landing on Barajas from airplane
Arriving at Barajas airport

During the first flights Gatwick-Barajas I realised that the airplanes consistently flew over the same landmarks: isle of Wight in England, across Bretagne in France and over Santander in Spain.

GPS tracking on an airplane
Using a smartphone as a GPS tracker on an airplane

I wondered if that meant that there are “air corridors” or airways in the sky that flights with the same code followed consistently.
In order to validate this hypothesis I started to track the path of the flights with a GPS tracker.

GPS tracking during the flights

The GPS tracking device of choice was my smartphone. I switched off my smartphone at take-off and at landing times because it was mandatory by the airline.

I switched on my smartphone when the signals in the cabin allowed the passengers to do so. The GPS signal is compatible with the airplane mode  because GPS tracking does not transmit radio waves. The smartphone only receives GPS data and does send anything back to the satellites.

I recorded the coordinates of most of the duration of 6 flights in the interval of 24 days from mid February to mid March. The direction of the flights were 4 flights from Gatwick to Barajas and 2 flights from Barajas to Gatwick.

I learned a few things that I am listing here:

Satellite fix

The fixing of satellites takes much longer than on the ground

Unpredictable GPS tracking

The GPS tracking is not complete or not happening at all in some flights. Does it depended on the fuselage of the airplane or are GPS jammering devices increasingly common in commercial flights?

In some instances I might not get coordinates for hundreds of kilometers, for instance from Castille inland to the middle of the Bay of Biscay.

Similar paths on same airways

The airways were similar but not identical between flights on the same route even if separated by only 7 or 14 days.

flight paths Gatwick-Barajas and Barajas-Gatwick
Comparison of airways from Gatwick to Barajas and viceversa

The airways were close by a few kilometers and degrees.

Airways over Bretagne on the same flight itineraries
Airways over Bretagne on the same flight itineraries

Landmarks of the flights Gatwick-Barajas

Gernsey and Santander and, exceptionally Gernsey-Gijón-León.

Landmarks of the flights Gatwick-Barajas
Landmarks of the flights Gatwick-Barajas

Landmarks of the flights Barajas-Gatwick

Bilbao and Jersey.

Landmarks of the flights Barajas-Gatwick
Routes of the flights Barajas-Gatwick

Unreliable elevation values

The values of the elevation are zero for 50% or more of the total points of a track. Where not zero, the values were 900-1100 meters with a maximum of 1500 meters. The values that I saw displayed on the screens for passengers were 10500 meters however.

I used GpsPrune v. 18.5 by Activity Workshop to display the coordinates and maps from a .gpx export of the GPS file. GpsPrune is a program for loading, displaying and editing data from GPS receivers.

Migrate Dropbox to Owncloud

Take control of your personal cloud services by managing your own one. The benefits are:

  • a single interface for your files, notes, feeds, etc.
  • better control of your information
  • consolidate your payments into a single hosting provider instead of paying fees to multiple services

The main drawback of the consolidation is of course the fact that migrating services takes a few hours of importing data, learning new interfaces, setting up cron jobs on the server, etc.

Setting up my own cloud service was partially inspired by Joseph Zhou’s post “Deploy ownCloud with Bitnami in Google Cloud Platform“.

Cost of your own personal cloud

A total of $69 per year excluding taxes.This is the sum of $5 per month of DigitalOcean’s hosting. You can also buy a Comodo’s  PositiveSSL certificate at Namecheap by $8.38 per year. Alternatively you can get a free SSL  certificate from  from StartSSL. Follow the tutorial “How To Set Up Apache with a Free Signed SSL Certificate on a VPS” to set it up.

In terms of file hosting only, DigitalOcean’s 640GB SSD Disk at $640 / mo is a very expensive service compared with Dropbox’s monthly fees of $9.99 for 1 TB of space.

I believe however that DigitalOcean prices will go down faster of a per GB basis than Dropbox will ever do for the cheaper plans.

Hosting in the cloud

 

I set up a Droplet on DigitalOcean for two reasons: they claim a 99.99% Uptime SLA and they have a few datacenters in Europe. The cheapest plan is about enough for personal use: 512MB Memory, 1 Core Processor, 20 GB SSD Disk and 1 TB Transfer by $ 5 / mo.

The tutorial is https://www.digitalocean.com/community/tutorials/how-to-use-the-owncloud-one-click-install-application

 

You can choose an Ubuntu image and and connect to it via terminal  with your ssh keys.

The one issue with Owncloud is that they do not provide a simple client syncing installation for Ubuntu. Apparently the open source community are not interested in maintining one. Instead there is an OpenSUSE installation package that does the job.

Owncloud’s with a minimalist default theme is clean and simple.  The features of the apps are all core and even the developed and maintained by 3rd parties work as expected. You may miss some of the advanced bells-and-whistles of your original applications.

Setup your DNS at your domain registrar by setting an A record pointing to the IP address of your droplet. I did so for an ad-hoc subdomain: whatever.domain.com.

Securing your connection with SSL certificates

 

Configure your server to require using HTTPS. This is probably the geekiest bit of the migration process. Purchase a Comodo certificate from Namecheap and upload the .crt and .key files to DigitalOcean.

You will want to force https on browsing clients. I tried, and failed, setting up the redirections from http to https, so I configured the .htaccess file instead at /var/www/owncloud/.htaccess

 

screenshot uage cloud digitalocean
Screenshot of DigitalOcean’s usage graphs of an Owncloud droplet

 

 

Client-server software for file storage

 

Install Owncloud by clicking on “One-click apps”. As an admin you can install and enable the apps that you want. As a user you have to import data like feeds on .opml from your reader, your .iCal for your calendar, etc.

 

Client Owncloud for your local computer

As per https://doc.owncloud.org/desktop/1.6/installing-linux.html#installing-linux

https://download.owncloud.org/download/repositories/stable/owncloud/

$ sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/xUbuntu_14.04/ /' >> /etc/apt/sources.list.d/owncloud-client.list"

$ wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/xUbuntu_14.04/Release.key

$ sudo apt-key add - < Release.key

$ sudo apt-get update

$ sudo apt-get install owncloud-client

The local synced folder is  set at the config/config.php file

‘datadirectory’ => ‘/var/www/owncloud/data’,

You can change the data directory.

1.) sudo cp -R /var/www/html/owncloud/data /home/owncloud

2.) sudo chown -R www-data.www-data /home/owncloud/

3.) Change
(datadirectory => /var/www/html/owncloud/data)
to
(datadirectory => /home/owncloud)
location by editing:
sudo nano
/var/www/html/owncloud/data/config/config.php

Update your home Dynamic DNS

$ sudo /usr/local/bin/noip2 -C
Auto configuration for Linux client of no-ip.com.
Multiple network devices have been detected.
Please select the Internet interface from this list.
By typing the number associated with it.
0 eth1
1 wlan1
1
Please enter the login/email string for no-ip.com email@address.com
Please enter the password for user email@address.com **********

Only one host [subdomain.domain.tld] is registered to this account.
It will be used.
Please enter an update interval:[30] 30
Do you wish to run something at successful update?[N] (y/N) y
Please enter the script/program name startnoip

New configuration file ‘/usr/local/etc/no-ip2.conf’ created.

The apps on the cloud

File syncing

The star application of Owncloud. Unfortunately, there are not specific installation packages of Owncloud client for Ubuntu 14.04 and newer. Owncloud suggests using OpenSUSE’s packages, which happen to do the job just fine.

Note taking and archiving

I did not find the Notes app capable of replicating even the most basic features of Evernote. If you are curious how it would work for you, export your content on Evernote as .html files and import them into OwnNote. You need to set up your syncing intervals with crontab directly on the server.

Warning 1: You cannot import the tags or categories from Evernote

Warning 2: You will miss a search engine for your notes!

Feeds reader

Export your feeds from Netvibes as .opml and import them into the News app. Setup the cron job with the command crontab. You will enjoy a cleaner interface than Netvibes. You will also be able to focus on the text rather than the images as in Flipboard, etc.

GPS tool

A nice surprise: Gpxpod, a cool app to read and compare your .gpx files. It is a simpler alternative to Sports-tracker.com

$ python -V
Python 2.7.6

$ sudo apt-get install python-pip

$ sudo pip install  gpxpy

$ sudo pip install geojson

 

Calendar

I am yet to convert my .ics to .iCal file in order to import it into the app

Music streaming, gallery of pictures

Nice-to-have apps that work out of the box and do what they claim on the tin.

Bookmarking

This is one cloud service that I will not move out of Pinboard.in.

Future services

I would love to have a Wallabag-like self hostable application for saving web pages. Also Airdroid for connecting to portable devices on own’s one LAN via Wi-Fi.

I hope that IFTTT integrates owncloud servers in its catalogue of recipes.

SEMrush or Searchmetrics

Data-As-A-Service

SEMrush and Searchmetrics are two well-know Data As A Service vendors in the search marketing community.
Many projects of SEO, SEM and social networks require research and monitoring. The pricing of both Searchmetrics and SEMrush is similar: monthly recurring fees for around $100 for basic features.

Keyword research

Now, one of the key features of these services are providing data about search keywords on the major search engines (Google) in the largest markets.
The data of keywords are typically used to understand the reach and depth of search engine positioning of websites. This in turns allow to map these websites in their category and in relative terms to their competitors.

Benchmark and methodology

In order to evaluate the quality and relevancy of data available at SEMrush and Searchmetrics.
 
Spearman’s rank correlation coefficient
It assesses how well the relationship between two ordinal variables.
The Spearman’s rho is a nonparametric measure of statistical dependence between two variables
> kws.correlation <- read.csv(“kws-correlation.csv”, na.strings=””)
> plot(kws.correlation)
> attach(kws.correlation)
> cor.test(gwt,semrush,method=”spearman”)
     Spearman’s rank correlation rho
data:  gwt and semrush
S = 14832, p-value = 4.411e-06
alternative hypothesis: true rho is not equal to 0
sample estimates:
      rho
0.5665693
> cor.test(gwt,searchmetrics,method=”spearman”)
     Spearman’s rank correlation rho
data:  gwt and searchmetrics
S = 7310, p-value = 0.007778
alternative hypothesis: true rho is not equal to 0
sample estimates:
      rho
0.4076655
> cor.test(semrush,searchmetrics,method=”spearman”)
     Spearman’s rank correlation rho
data:  semrush and searchmetrics
S = 2, p-value < 2.2e-16
alternative hypothesis: true rho is not equal to 0
sample estimates:
      rho
0.9878788