Dragline excavation simulation, real-time terrain recognition and object detection