I work in a control center for a train company in the UK. Our trains work in either direction but only one end has first class carriages. Because trains on our network reverse quite a lot it is difficult for us to track and advertise where first class will be. 

Is it possible to create a device using a digital compass that will identify whether the train is travelling North or South and that can push this information via a GPRS transmitter so that it can be read on a PC? The device would be positioned at the first class end of the train with North pointing forwards. In theory If the compass direction is north and pin also north we would know that first class would be north facing. If the compass read out was south first class would be south facing.

I presume the main difficulties with this would be transmitting the information being read from the compass. Can anybody offer a solution?