Adds location calculation helper functions