Added functions for handling sensors calculations