Real time Location Based Automatic Railway Gate Control