The condition on percentageInPolygon is ignored if the areaInPolygon is
very high.
Added 'ontrack' event. 'Leaving' event is ignored if there's a train.
Merge branch 'uni' into houghuni