In order to solve the sensor MEMS is vulnerable to outside interference when pose estimation, firstly design the extended Calman filter based on the number of four dirnentions, the attitude measurement of three degree of freedom is realized by the method adaptively establish covariance matrix and the introduction of sensor error compensation. secondly, the particle filter and Calman filter data fusion algorithm based on the WiFi/MARG integrated positioning system can effectively solve the floating received signal strength time; finally the adaptive weighted algorithm design, the WiFi/MARG and GPS/MARG sub system integration, construction of GPS/WiFi/MARGE positioning system to achieve seamless positioning of indoor and outdoor, experimental results show that the algorithm is better than the maximum the error of WiFi/MARG and GPS/MARG system were reduced by 51% and 82%, the average localization error is reduced by 53%and 62%, effectively improve the positioning accuracy.