A wireless sensor network for distributed autonomous traffic monitoring