Development and Optimisation of Wireless Indoor Localisation for the IoT Solutions