unified alot of duplicated code in orbit path generation