Wireless sensor node for detection of freight train derailment