New LoS algorithm. Needs refactoring.