Automated Satellite Track Detection and Endpoint Determination in Astronomical Images