I struggled today with coming up with something even remotely elegant. Ended up modeling the line-of-sight between the monitoring station and the asteroids explicitly, then ordering them by angle between the LoS and the Y axis to perform a sweeping scan. Ugly code, but I am just glad it works - don't have the energy to clean it up! Code here:
https://github.com/jorispz/aoc-2019/blob/master/src/commonMain/kotlin/day10/p10.kt