###### Abstract
Given these traditional models, many researchers have optimized them in tandem with practical applications, yielding notable results in GNSS positioning with geodetic receivers [20; 21; 22; 23]. Nonetheless, smartphones exhibit distinct characteristics compared to geodetic receivers, with GNSS observations that are prone to noise and markedly affected by multipath and NLOS errors. In specific environments, like urban canyons, the low correlation between C/N0 and the corresponding satellite elevation means that the stochastic models for smartphones and professional geodetic receivers differ considerably [24; 25]. Recent studies have indicated that the elevation-dependent weighting model might no longer be apt for smartphone GNSS observations [26; 27; 28]. The C/N0, which gauges signal reception quality, has been shown to be more optimized for smartphone positioning than the elevation-dependent model [8; 24]. Recognizing the limitations of C/N0 in smartphone positioning, recent advancements include the elevation-C/N0 model, which merges both indicators (elevation and C/N0) with robust estimation principles [25], and the optimized C/N0-dependent stochastic model, which aptly describes smartphone GNSS observation quality [29]. These models have, to a degree, ameliorated smartphone positioning. However, the conventional C/N0-dependent stochastic model often fails to account for unmodeled errors like multipath and atmospheric delays, which are particularly significant for low-cost devices [30; 31]. To achieve superior positioning performance with smartphones, there is a pressing need for more refined stochastic models. This study focuses on the construction of an optimal subset of satellites with integrated C/N0, which plays a crucial role in satellite observation accuracy. In obstructed environments, selecting satellites with superior observational quality becomes imperative. To address this, we propose synthesizing the C/N0 metric to identify a subset of satellites with higher-quality observations. Based on that, we introduce a novel approach leveraging the characteristics of the double-difference code pseudorange residual (DDPR). This approach entails the development of a DDPR-dependent stochastic model capable of detecting significant outliers attributed to multipath and NLOS effects. By identifying and mitigating these outliers, our model effectively reduces the corresponding observational weights, thereby enhancing positioning accuracy to a significant extent. Consequently, this methodological integration contributes to the overall robustness and reliability of satellite-based positioning systems in challenging environments. The remainder of this paper proceeds as follows. In Section 2, we delve into the double-difference (DD) code pseudorange functional model. Drawing on the DDPR concept and utilizing experimental data, we examine the variation characteristics of a DDPR. Section 3 explores the correlation between the DDPR and the satellite-integrated C/N0 and elevation. We present a comparative analysis of methods for constructing the optimal satellite subset and detail the process of establishing a pseudorange relative positioning stochastic model for a smartphone-based optimal satellite subset. In Section 4, we contrast and analyze the positioning results of the optimized stochastic model and the C/N0-dependent model for Huawei P40 and Huawei Mate40 smartphones across diverse environments. Finally, Section 5 encapsulates the study's findings and conclusions.