Wireless sensor networks (WSNs) have become much more relevant in recent years, mainly because they can be used in a wide diversity of applications. Real-time locating systems (RTLSs) are one of the most promising applications based on WSNs and represent a currently growing market. Specifically, WSNs are an ideal alternative to develop RTLSs aimed at indoor environments where existing global navigation satellite systems, such as the global positioning system, do not work correctly due to the blockage of the satellite signals. However, accuracy in indoor RTLSs is still a problem requiring novel solutions. One of the main challenges is to deal with the problems that arise from the effects of the propagation of radiofrequency waves, such as attenuation, diffraction, reflection and scattering. These effects can lead to other undesired problems, such as multipath. When the ground is responsible for wave reflections, multipath can be modeled as the ground reflection effect. This paper presents an innovative mathematical model for improving the accuracy of RTLSs, focusing on the mitigation of the ground reflection effect by using multilayer perceptron artificial neural networks.