Satellite positioning method, electronic equipment and storage medium
By utilizing historical location or cell identifiers when the timer malfunctions, electronic devices ensure normal satellite communication, resolving the issue of inaccurate positioning caused by timer malfunctions and improving user experience.
Patent Information
- Application Number
- CN202411117965.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2026-03-10
AI Technical Summary
In satellite communications, timer malfunctions can prevent electronic devices from accurately obtaining their location, affecting the normal operation of subsequent satellite services and reducing user experience.
When the timer malfunctions, the electronic device determines its own location by obtaining the pre-stored target historical location or cell identifier, and recalibrates the location sensor or adjusts the calculation frequency if necessary to obtain an accurate location, ensuring the normal operation of satellite service communication.
Even if the timer malfunctions, the electronic device can still accurately obtain the location, ensuring the normal use of satellite service communication and improving the user experience.
Smart Images

Figure CN121634175A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal equipment technology, and in particular to a satellite positioning method, electronic device and storage medium. Background Technology
[0002] Traditional terrestrial communication networks struggle to cover certain areas, while satellite communication, through onboard equipment, fills this gap. The communication capabilities of satellite communication in remote areas or challenging environments have always been a focus of attention. Especially during emergency rescue and disaster relief efforts, satellite communication has demonstrated its irreplaceable importance.
[0003] Electronic devices need to obtain their location before they can use satellites for business communication. To do this, the electronic device calculates its location based on satellite signals received from the satellite and time provided by a timer. If the timer malfunctions, the electronic device will be unable to determine its location solely based on satellite signals, causing subsequent satellite business communication to fail and impacting the user experience. Summary of the Invention
[0004] To address the aforementioned issues, this application provides a satellite positioning method that allows the electronic device to still obtain its location even when the timer malfunctions, ensuring normal operation of subsequent satellite service communications and improving the user experience.
[0005] To achieve the above objectives, in a first aspect, in response to the electronic device receiving a satellite signal, it is determined whether a first position of the electronic device has been acquired, the first position being the current position of the electronic device; if the first position has not been acquired, it is determined whether a second position of the electronic device has been acquired, the second position being a target historical position pre-stored by the electronic device; if the second position has been acquired, the second position is determined as the target position.
[0006] The satellite positioning method provided in this application allows an electronic device to obtain its current location based on received satellite signals. If the current location cannot be obtained, the device can obtain its target historical location and determine that historical location as its target location. Thus, even if the timer malfunctions during satellite positioning, the electronic device can still determine its location based on the target historical location, ensuring normal operation of subsequent satellite communication services and improving the user experience.
[0007] In one feasible implementation, after determining whether the second location of the electronic device has been obtained, the method further includes: if the second location has not been obtained, determining whether the first cell identifier of the electronic device has been obtained, wherein the first cell identifier is a target historical cell identifier pre-stored by the electronic device; if the first cell identifier has been obtained, determining the target location of the electronic device based on the first cell identifier. Thus, during the process of locating the electronic device using satellite positioning, even if the timer malfunctions, the electronic device can still determine its location based on the target historical cell identifier, ensuring the normal use of subsequent satellite service communication and improving the user experience.
[0008] In one feasible implementation, after determining whether the second location of the electronic device has been obtained, the method further includes: if the second location has not been obtained, determining whether the second cell identifier of the electronic device has been obtained, where the second cell identifier is the current cell identifier obtained by the electronic device; if the second cell identifier has been obtained, determining the target location of the electronic device based on the second cell identifier. Thus, during the process of locating the electronic device using satellite positioning, even if the timer malfunctions, the electronic device can still determine its location based on the current cell identifier, ensuring the normal use of subsequent satellite service communication and improving the user experience.
[0009] In one feasible implementation, after obtaining a second location and determining it as the target location, the method further includes: within a first preset frequency, in response to the electronic device receiving a satellite signal, determining whether to re-obtain the first location of the electronic device; if the first location is obtained, determining the first location as the target location. Since using the second location as the target historical location and using the target historical location as the target location would result in location deviation, re-obtaining the current location of the electronic device within the first preset frequency and using the current location as the target location ensures the accuracy of the electronic device's positioning, guarantees the normal use of subsequent satellite service communication, and improves the user experience.
[0010] In one feasible implementation, in the absence of a second location, acquiring the first cell identifier of the electronic device includes: acquiring at least one pre-stored historical cell identifier of the electronic device, each historical cell identifier having a corresponding first time point; determining a first target time point from the first time points, wherein the first target time point is greater than a first preset threshold and less than a second preset threshold; and determining the historical cell identifier corresponding to the first target time point as the first cell identifier. Thus, during the positioning of the electronic device using satellite positioning, even if the timer malfunctions, the electronic device can still determine its location based on the target historical cell identifier, ensuring the normal use of subsequent satellite service communication and improving the user experience.
[0011] In one feasible implementation, upon obtaining a first cell identifier, determining the target location of the electronic device based on the first cell identifier includes: obtaining the first cell location corresponding to the first cell identifier based on a relationship table stored on the electronic device; the relationship table includes at least one cell identifier and at least one cell location, wherein each cell identifier has a corresponding cell location; the cell identifier includes the first cell identifier; and determining the target location of the electronic device based on the first cell location. Thus, during the process of locating the electronic device using satellite positioning, even if the timer malfunctions, the electronic device can still determine its location based on the target historical cell identifier, ensuring the normal use of subsequent satellite service communication and improving the user experience.
[0012] In one feasible implementation, after determining whether the first cell identifier of the electronic device has been obtained, the method further includes: if the first cell identifier has not been obtained, displaying a first interface, the first interface including a prompt text box to prompt the user to change the orientation of the electronic device; and if the orientation of the electronic device is changed based on the prompt text box, reacquiring satellite signals. Thus, during the process of locating the electronic device using satellite positioning, even if the timer malfunctions, the electronic device can reacquire satellite signals based on the user's continuous changes in orientation. Based on the reacquired satellite signals, the location of the electronic device can be further determined, ensuring the normal use of subsequent satellite service communication and improving the user experience.
[0013] In one feasible implementation, after determining whether the first location of the electronic device has been acquired in response to the electronic device receiving a satellite signal, the method further includes: if the first location has been acquired, storing the first location as a historical location. Since the first location is the current location of the electronic device, caching the current location ensures that if the current location cannot be acquired later, the stored historical location can be used as the target location. Thus, during the satellite positioning process, even if the timer malfunctions, the electronic device can still determine its location based on the stored historical location, ensuring normal operation of subsequent satellite communication services and improving the user experience.
[0014] In one feasible implementation, obtaining a second location of the electronic device when the first location is not obtained includes: obtaining at least one pre-stored historical location of the electronic device, each historical location having a corresponding second time point; determining a second target time point from the second time points, wherein the second target time point is greater than a third preset threshold and less than a fourth preset threshold; and determining the historical location corresponding to the second target time point as the second location. In this way, during the process of locating the electronic device using satellite positioning, even if the timer malfunctions, the electronic device can still determine its location based on the target historical location, ensuring the normal use of subsequent satellite service communication and improving the user experience.
[0015] In one feasible implementation, determining the first location of the electronic device in response to receiving a satellite signal includes: receiving the satellite signal transmitted by the satellite; extracting data from the satellite signal to obtain pseudorange and ephemeris data, wherein the pseudorange includes the measured distance from the satellite to the electronic device; and determining the first location of the electronic device based on the ephemeris data and pseudorange. In this way, the electronic device can calculate its location based on the received satellite signal, ensuring the normal operation of subsequent satellite service communications and improving the user experience.
[0016] In one feasible implementation, after obtaining a first location and storing it as a second location, the method further includes: obtaining a third location of the electronic device based on a first triggering condition, where the third location is the updated current location of the electronic device; the first triggering condition is determined based on the user's location update operation; and storing the third location as a historical location when the third location of the electronic device is obtained. In this way, after obtaining a location, during satellite service communication, the electronic device can obtain its updated current location (i.e., the third location) based on the first triggering condition and store it as a historical location. This ensures that the second location obtained by the electronic device is closer to its real-time location, improving the accuracy of the electronic device's positioning and enhancing the user experience.
[0017] In one feasible implementation, the first triggering condition includes at least one of a second preset frequency and a preset satellite signal strength. The user can trigger the operation to update their location within the second preset frequency, or the user can trigger the operation to update their location within the preset satellite signal strength. Thus, based on the first triggering condition, a third location of the electronic device is obtained, improving the accuracy of the electronic device's positioning and enhancing the user experience.
[0018] In one feasible implementation, if the first location is not obtained, determining whether the second location of the electronic device has been obtained includes: if the first location is not obtained, determining whether the first and second locations of the electronic device have been obtained; if the first and second locations are obtained, determining the first location as the target location. Thus, during the process of locating the electronic device using satellite positioning, even if the timer malfunctions and the electronic device obtains both the first and second locations, if both are obtained, the electronic device can determine its location based on the first location, ensuring the normal use of subsequent satellite service communication and improving the user experience.
[0019] In one feasible implementation, in response to the electronic device receiving a satellite signal, the acquisition of the electronic device's first location includes: the satellite application software development kit (SDK) in the electronic device's application layer, in response to the user's first click operation on the satellite communication application, sending a request to the satellite communication service in the electronic device's application framework layer to locate the electronic device; the satellite communication service then sends a request to the electronic device's hardware abstraction layer... The satellite communication module in the HAL (Host Alignment Layer) layer sends a request to locate the electronic device. In response to this request, the satellite communication module sends a first data request to the satellite antenna service in the application framework layer, requesting the acquisition of satellite signals transmitted by the satellite. The satellite antenna service calls the satellite antenna HAL in the HAL layer and sends the first data request to the satellite antenna driver module in the driver layer of the electronic device. In response to the first data request, the satellite antenna driver module drives the satellite antenna in the hardware layer of the electronic device to acquire the satellite signals transmitted by the satellite. The satellite antenna sends the satellite signals to the satellite communication receiver in the hardware layer. The satellite communication receiver driver module in the kernel layer of the electronic device acquires the satellite signals from the satellite communication receiver. The satellite communication receiver driver module sends the satellite signals to the satellite communication module. Based on the satellite signals, the satellite communication module determines the first location of the electronic device. Thus, during the satellite positioning process, the electronic device determines its location based on satellite signals, ensuring the normal operation of subsequent satellite communication services and improving the user experience.
[0020] In one feasible implementation, obtaining a second location of the electronic device when the first location is not obtained includes: if the first location is not obtained, the satellite communication module sends a second data request to the storage service in the application framework layer, the second data request requesting the second location of the electronic device; the storage service calls the storage HAL in the HAL layer and sends the second data request to the storage driver module in the kernel layer; in response to the second data request, the storage driver module obtains the second location of the electronic device from the memory in the hardware layer; the driver module sends the second location of the electronic device to the storage HAL; the storage HAL sends the second location of the electronic device to the storage service; and the satellite communication module obtains the second location of the electronic device from the storage service. Thus, during the process of locating the electronic device using satellite positioning, even if the timer malfunctions, the electronic device can determine its location based on the second location, ensuring the normal use of subsequent satellite service communication and improving the user experience.
[0021] Secondly, this application provides a satellite positioning device that has the function of implementing the electronic device behavior in the satellite positioning method of the first aspect described above. The function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-described function.
[0022] Thirdly, this application provides an electronic device, including: a display screen, a memory, and one or more processors; the display screen, the memory, and the processors are coupled; wherein, the memory stores computer program code, the computer program code including computer instructions, and when the computer instructions are executed by the processor, the electronic device performs the satellite positioning method provided in the first aspect above.
[0023] Fourthly, this application provides a computer-readable storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform the satellite positioning method provided in the first aspect above.
[0024] Fifthly, this application provides a computer program product that, when run on a computer, causes the computer to perform the satellite positioning method provided in the first aspect above.
[0025] It is understood that the beneficial effects that the technical solutions provided in the second to fifth aspects described above can be achieved by referring to the beneficial effects of the first aspect and any feasible implementation thereof, which will not be repeated here. Attached Figure Description
[0026] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is a schematic diagram illustrating the process of an electronic device performing satellite positioning function according to an embodiment of this application;
[0028] Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0029] Figure 3 This is a schematic diagram of the layered architecture of a software system for an electronic device provided in an embodiment of this application;
[0030] Figure 4 This is a schematic diagram of the software modules and interactions between modules involved in a satellite positioning method provided in an embodiment of this application;
[0031] Figure 5This is the first flowchart of a satellite positioning method provided in an embodiment of this application;
[0032] Figure 6 This is a schematic diagram of an interface for launching a satellite communication application provided in an embodiment of this application;
[0033] Figure 7 This is a second flowchart of a satellite positioning method provided in an embodiment of this application;
[0034] Figure 8 This is a schematic diagram of a first interface for satellite positioning provided in an embodiment of this application;
[0035] Figure 9 This is the third flowchart of a satellite positioning method provided in an embodiment of this application;
[0036] Figure 10 This is a schematic diagram of a second interface for satellite positioning provided in an embodiment of this application;
[0037] Figure 11 This is the fourth flowchart of a satellite positioning method provided in the embodiments of this application;
[0038] Figure 12 This is the fifth flowchart of a satellite positioning method provided in the embodiments of this application;
[0039] Figure 13 This is the sixth flowchart of a satellite positioning method provided in the embodiments of this application;
[0040] Figure 14 This is the seventh flowchart of a satellite positioning method provided in the embodiments of this application;
[0041] Figure 15 This is a schematic diagram of a first interface for satellite positioning provided in an embodiment of this application;
[0042] Figure 16 This is the eighth flowchart of a satellite positioning method provided in the embodiments of this application;
[0043] Figure 17 This is the ninth flowchart of a satellite positioning method provided in an embodiment of this application;
[0044] Figure 18 This application provides a structural block diagram of a chip system. Detailed Implementation
[0045] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are all within the protection scope of this application.
[0046] In the following description, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0047] Furthermore, in this application, directional terms such as "upper," "lower," "inner," and "outer" are defined relative to the indicated placement of the components in the accompanying drawings. It should be understood that these directional terms are relative concepts, used for relative description and clarification, and can change accordingly depending on the placement of the components in the accompanying drawings.
[0048] To facilitate understanding of the technical solutions of the embodiments of this application by those skilled in the art, the technical terms involved in the embodiments of this application will be explained below.
[0049] Satellite positioning is a technique that uses artificial satellite systems (such as the Global Positioning System (GPS), the BeiDou Navigation Satellite System (BDS), and other Global Navigation Satellite Systems (GNSS)) to measure the distance between satellites and satellite communication receivers in order to determine the location of the satellite communication receiver. The satellite communication receiver is typically integrated into electronic devices. The location of the satellite communication receiver can be considered as the location of the electronic device.
[0050] A timer, generally referring to a timing element or timing device, is a device that uses specific principles to measure time. Timers can be used in satellite positioning systems for electronic devices. These systems rely on accurate time measurements to determine the distance between the electronic device and the satellite; the timer is a crucial component ensuring the proper functioning of the satellite positioning system and providing accurate positioning services.
[0051] A software development kit (SDK) is, in a broad sense, a collection of related documents, examples, and tools that assist in the development of a particular type of software.
[0052] Ephemeris data is an important part of satellite positioning systems, providing information about satellite positions and trajectories. In embodiments of this application, electronic devices can determine satellite positions based on ephemeris data.
[0053] A cell identity (CID) is an identifier used to identify a cell within a cellular network. In mobile communication networks, each cell has a unique identifier to distinguish different cells and to assist electronic devices in positioning and communication.
[0054] The embodiments of this application will now be described with reference to the accompanying drawings.
[0055] Traditional communication typically relies on fiber optic cables, electrical cables, and wireless base stations. This method depends on terrestrial infrastructure, leading to limitations in coverage and difficulties in deployment in certain areas. For example, fiber optic cables and electrical cables in traditional communication require physical connections to transmit signals, necessitating the laying of these facilities on the ground, underground, or underwater. Wireless communication in traditional communication requires the deployment of numerous base stations to cover a specific area. Therefore, laying these cables, fibers, and base stations often necessitates complex infrastructure construction. In some remote areas or special environments, deployment may be impossible.
[0056] Compared to traditional communications, satellite communications have advantages such as wide coverage. Satellite communications can cover almost every corner of the earth, including remote areas, oceans, and polar regions that are difficult for traditional terrestrial communication networks to reach.
[0057] Satellite communication is irreplaceable in emergency rescue and disaster relief.
[0058] When electronic devices use satellites to conduct business communications, they first need to use satellite positioning to obtain the location of the electronic devices.
[0059] Figure 1 This is a schematic diagram of the process of an electronic device performing satellite positioning function according to an embodiment of this application.
[0060] like Figure 1 As shown, the process includes steps S101-S109.
[0061] In step S101, the electronic device receives the user's click on the satellite communication application and determines whether the position sensor has lost accuracy.
[0062] Electronic devices can launch satellite communication applications from their main interface.
[0063] A position sensor is a sensor used to measure the position of itself or a measured object. Position sensors are built into electronic devices. In this embodiment, the position sensor may be a satellite communication receiver.
[0064] The accuracy of a position sensor affects the position measurement results of an electronic device. Position sensor accuracy typically refers to the error between the position measured by the electronic device and the actual position. The lower the accuracy of the position sensor, the further the measured position deviates from the actual position. Conversely, the higher the accuracy of the position sensor, the closer the measured position is to the actual position. High-accuracy position sensors result in more accurate and reliable position measurements from the electronic device.
[0065] In step S101, the accuracy of the position sensor can be described by a first accuracy. The first accuracy is the accuracy of the initial calibration.
[0066] In practical applications, the first precision is usually displayed in terms of the number of decimal places.
[0067] In other words, the first precision has a corresponding number of decimal places. For example, the first precision corresponds to 3 decimal places.
[0068] For example, an electronic device can determine whether a position sensor has lost accuracy by judging whether a first accuracy is greater than or equal to a preset accuracy.
[0069] The preset precision has a corresponding number of decimal places. For example, the preset precision corresponds to 15 decimal places.
[0070] Thus, when the first precision corresponds to 16 decimal places, this number of places is greater than the 15 decimal places corresponding to the preset precision, and the position sensor does not lose precision. When the first precision corresponds to 14 decimal places, this number of places is less than the 15 decimal places corresponding to the preset precision, and the position sensor loses precision.
[0071] It should be noted that electronic devices can set different preset precision for position sensors in different application scenarios. For example, in civilian navigation scenarios, the preset precision corresponds to 15 decimal places, while in precision agriculture scenarios, the preset precision corresponds to 10 decimal places. This application embodiment does not specifically limit the setting of preset precision.
[0072] Step S102: If the position sensor loses accuracy, recalibrate the accuracy of the position sensor.
[0073] For example, if the number of decimal places corresponding to the first precision is less than 15, the electronic device determines that the position sensor has lost precision.
[0074] For example, the first precision is 0.1234567896312, and the preset precision is 0.213456789120225. That is to say, the first precision corresponds to 13 decimal places. Since the number of decimal places corresponding to the first precision is less than the number of decimal places corresponding to the preset precision, the electronic device determines that the position sensor has lost precision.
[0075] Furthermore, recalibrating the electronic device to the first level of accuracy can improve the accuracy of the position sensor in the electronic device.
[0076] Alternatively, recalibrating the initial precision can be achieved by adjusting the precision of floating-point operations in the computer hardware's floating-point unit. Specifically, electronic devices can use high-precision libraries or software tools for precision adjustment, such as the "decimal" module in Python development tools.
[0077] After recalibrating the initial accuracy, the electronic device can determine the accuracy of the calibrated position sensor. Specifically, the electronic device compares the newly determined initial accuracy of the position sensor with the preset accuracy, and then re-determines whether the initial accuracy is greater than or equal to the preset accuracy.
[0078] For example, if the number of decimal places corresponding to the first precision is greater than the number of decimal places corresponding to the preset precision, the position sensor's precision calibration is successful; if the number of decimal places corresponding to the first precision is less than the number of decimal places corresponding to the preset precision, the first precision is recalibrated.
[0079] Step S103: If the position sensor has not lost accuracy, the electronic device searches for satellites and determines whether the satellite search was successful.
[0080] For example, if the number of decimal places corresponding to the first precision is greater than the number of decimal places corresponding to the preset precision, the electronic device determines that the position sensor has not lost precision.
[0081] For example, the first precision is 0.12345678963121236, and the preset precision is 0.213456789120225. That is to say, the first precision corresponds to 17 decimal places. Since the number of decimal places corresponding to the first precision is greater than the number of decimal places corresponding to the preset precision, the electronic device determines that the position sensor has not lost precision.
[0082] The purpose of satellite search is to determine the location of electronic devices. In practice, electronic devices receive satellite signals. These signals contain data on time and satellite positions. By receiving signals from at least four satellites, the electronic device can calculate its own precise location.
[0083] For example, the electronic device successfully searches for a satellite when it can determine its own location. It fails to do so when it cannot determine its own location.
[0084] If the satellite search is successful, the electronic device performs satellite pairing to determine whether the pairing was successful (execute step S104), and starts the protocol stack, searches for and registers the network, and closes other services (execute step S106).
[0085] Step S104: If the satellite search is successful, the electronic device performs satellite alignment to determine whether the satellite alignment was successful.
[0086] Satellite-to-satellite communication refers to establishing communication or data transmission between electronic devices and satellites. In other words, the purpose of satellite-to-satellite communication is to establish a reliable data transmission link between satellites and electronic devices. For example, if electronic devices and satellites successfully establish a data transmission link, it can ensure that they can send and receive signals to each other.
[0087] For example, satellite-to-satellite connection is successful when communication or data transmission is established between the electronic device and the satellite. Satellite-to-satellite connection is unsuccessful when communication or data transmission is not established between the electronic device and the satellite. Connecting to the satellite can include either a failed connection or a successful connection.
[0088] It should be noted that if the satellite search is unsuccessful, the satellite search will be performed again. If the satellite search is still unsuccessful after three satellite search attempts, the satellite function will be exited.
[0089] In step S105, once it is confirmed that satellite alignment is successful, the electronic equipment begins to connect to the satellite.
[0090] Whether an electronic device is successfully connected to a satellite can be checked through the device's display screen or indicator lights. The device can display the connection status, the number of satellites received, or use specific icons or indicators to represent the connection status.
[0091] For example, if the electronic device's display shows a successful connection or the indicator light is on, the electronic device has successfully connected to the satellite. If the electronic device's display does not show a successful connection or the indicator light is not on, the electronic device has not successfully connected to the satellite.
[0092] If the electronic device fails to connect to the satellite, try connecting to the satellite again.
[0093] It should be noted that a time threshold is typically set during the process of establishing a connection between electronic devices and satellites. Connecting to the satellite within a certain time threshold ensures a good user experience. For example, the time threshold could be set to 120 seconds, ensuring the connection between the electronic device and the satellite is established within 120 seconds.
[0094] Step S106: The electronic device starts the protocol stack, searches for and registers the network, and closes other services.
[0095] In this context, the protocol stack refers to a set of software and hardware components in an electronic device that implement communication protocols. Starting the protocol stack is the process by which an electronic device loads and initializes these components to enable subsequent satellite communication services. Network search and registration refers to the process by which the electronic device, after starting the protocol stack, searches for available satellite networks and completes registration.
[0096] Other services can include cellular network, Wi-Fi, Near Field Communication (NFC), and background applications. For example, disabling other services could include powering off cellular network, turning off Wi-Fi, turning off NFC, and freezing background applications.
[0097] Step S107: The electronic device determines whether the satellite service is activated.
[0098] In establishing satellite communication services, electronic devices determine whether satellite services are operational to ensure that both the devices and users can legally and effectively utilize satellite communication services. Without operational services, electronic devices will not be able to obtain the necessary authorization and resources, thus preventing them from conducting satellite communication.
[0099] Step S108: When the satellite service is activated and the electronic device is successfully connected to the satellite, the electronic device enables satellite communication services.
[0100] For example, electronic devices can use satellites to make and receive phone calls, send and receive text messages, and conduct network services.
[0101] In step S109, if the satellite service is not activated, the electronic device returns the reason value for the satellite service not being activated, exits the satellite function, and restores other services.
[0102] The reasons for satellite service not being activated can include multiple factors, such as technical reasons, environmental reasons, and other reasons. Technical reasons can include signal interference and transmission delays. Environmental reasons can include severe weather conditions, such as heavy rain, or adverse space environments, such as mountains blocking satellite signals. Other reasons can include ongoing technical upgrades. Each reason can correspond to a reason value; for example, signal interference corresponds to the first reason value, transmission delay to the second, severe weather conditions to the third, adverse space environments to the fourth, and ongoing technical upgrades to the fifth.
[0103] Exiting satellite functionality can include powering off the satellite. Powering off the satellite means stopping power supply to the hardware corresponding to the satellite communication application, causing the satellite communication application to cease operation. Resuming other services can include Wi-Fi recovery, NFC recovery, cellular power-on, and launching background applications.
[0104] It should be understood that after executing step 108, one can also actively exit the satellite function (execute step S109).
[0105] For example, an electronic device is conducting satellite communication services. For instance, when sending a satellite text message, the device can actively exit the satellite function upon completion of sending the message, i.e., step S109.
[0106] By utilizing steps S101-S109 above, the electronic device can achieve satellite communication. The electronic device first uses satellite positioning to obtain its location, i.e., step S103 above, which is searching for satellites. After successfully obtaining the location of the electronic device, it further determines whether satellite communication can be achieved.
[0107] In one implementation, electronic devices can determine their own location using the propagation time of satellite signals and the satellite's position.
[0108] For example, an electronic device can receive satellite signals transmitted by a satellite, the satellite signals including the satellite's position and the time of transmission. The electronic device records the time of reception of the satellite signal. Then, based on the time of transmission, the time of reception, and the satellite's position, the electronic device determines its own position.
[0109] For example, the reception time of satellite signals can be recorded using a timer built into an electronic device. If the timer used to acquire the reception time malfunctions, the electronic device will be unable to determine its location, causing subsequent satellite service communication to fail and thus affecting the user experience.
[0110] The timer malfunction can be caused by the following two reasons.
[0111] One possible reason is that the timer is corrupted, causing a timer malfunction.
[0112] A timer malfunction typically refers to a timer failing to record time properly due to some kind of fault (such as a depleted battery, mechanical failure, or damaged electronic components). When a timer malfunctions, the electronic device cannot use satellite positioning to determine its own location, thus affecting the user experience.
[0113] Another reason could be timer instability leading to timer malfunction.
[0114] Unlike a malfunctioning timer, an unstable timer refers to a timer that works intermittently, resulting in inconsistent recording times.
[0115] Intermittent timer malfunctions can be caused by a variety of factors, such as unstable power supply, internal component failure, or software or firmware issues. When the timer is unstable, the electronic device cannot reliably obtain its own location using satellite positioning, leading to disruptions in subsequent satellite communication and impacting the user experience.
[0116] In summary, when the timer malfunctions, the electronic device cannot accurately obtain its own location, causing subsequent satellite service communication to fail and thus affecting the user experience.
[0117] To address the aforementioned issues, this application provides a satellite positioning method that allows the electronic device to still obtain its location even when the timer malfunctions, ensuring normal operation of subsequent satellite service communications and improving the user experience.
[0118] The satellite positioning method provided in this embodiment can be applied to electronic devices. In some embodiments, the electronic device may be a mobile phone, tablet computer, handheld computer, personal computer (PC), ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), augmented reality (AR) device, virtual reality (VR) device, artificial intelligence (AI) device, wearable device, etc. This application embodiment does not impose any special restrictions on the specific type of electronic device.
[0119] For example, Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, with a mobile phone as an example.
[0120] like Figure 2As shown, the mobile phone may include a processor 210, a satellite communication receiver 211 (a processor with satellite communication function, or a satellite communication chip, which may also have other communication functions, such as cellular communication function), an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, antennas 1, 2, and 3, a mobile communication module 250, a wireless communication module 260, a satellite communication module 270, a sensor module 280, a display screen 293, and a subscriber identification module (SIM) card interface 294, etc. The sensor module 280 may include a pressure sensor 280A, a fingerprint sensor 280B, a temperature sensor 280C, a touch sensor 280D, an ambient light sensor 280E, etc.
[0121] Processor 210 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. In some embodiments of this application, processor 210 also includes a satellite communication receiver 211, which is used to calculate the current location information of the electronic device based on ephemeris data.
[0122] A controller can be the nerve center and command center of an electronic device. Based on the instruction opcode and timing signals, the controller generates operation control signals to control the fetching and execution of instructions.
[0123] The processor 210 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. This memory can store instructions or data that the processor 210 has just used or that are used repeatedly. If the processor 210 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.
[0124] In some embodiments, the processor 210 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0125] The external memory interface 220 can be used to connect to an external non-volatile memory, thereby expanding the phone's storage capacity. The external non-volatile memory communicates with the processor 210 through the external memory interface 220 to perform data storage functions. For example, music, video, and other files can be saved in the external non-volatile memory.
[0126] Internal memory 221 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM). The RAM can be directly read and written by the processor 210 and can be used to store executable programs (e.g., machine instructions) of the operating system or other running programs, as well as user and application data. The NVM can also store executable programs and user and application data, and can be pre-loaded into the RAM for direct read and write operations by the processor 510.
[0127] While charging the battery 242, the charging management module 240 can also supply power to the mobile phone through the power management module 241. Specifically, the battery 242 can be composed of multiple batteries connected in series. The power management module 241 is used to connect the battery 242, the charging management module 240, and the processor 210.
[0128] The power management module 241 connects the battery 242, the charging management module 240, and the processor 210. The power management module 241 receives input from the battery 242 and / or the charging management module 240, providing power to the processor 210, internal memory 221, display screen 293, camera 295, and wireless communication module 260, etc. The power management module 241 can also monitor parameters such as battery voltage, current, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 241 may also be located within the processor 210.
[0129] The wireless communication function of the electronic device can be realized through antenna 1, antenna 2, antenna 3, mobile communication module 250, satellite communication module 270, wireless communication module 260, modem, baseband processor, and satellite communication receiver 211, etc.
[0130] Antennas 1, 2, and 3 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover one or more communication frequency bands. In some embodiments, antennas can be used in conjunction with tuning switches, and different antennas can be multiplexed to improve antenna utilization.
[0131] The mobile communication module 250 can provide wireless communication solutions, including 2G / 3G / 4G / 5G, for use in electronic devices. The mobile communication module 250 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 250 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 250 can be housed in the processor 210. In some embodiments, at least some functional modules of the mobile communication module 250 and at least some modules of the processor 210 can be housed in the same device.
[0132] The wireless communication module 260 may include a Wi-Fi module, a Bluetooth (BT) module, a GNSS module, a near-field communication (NFC) module, an infrared (IR) module, etc. The wireless communication module 260 may be one or more devices integrating at least one of the above modules. The wireless communication module 260 receives electromagnetic waves via antenna 3, modulates and filters the electromagnetic wave signal, and sends the processed signal to processor 210. The wireless communication module 260 can also receive signals to be transmitted from processor 210, modulate and amplify them, and then convert them into electromagnetic waves for radiation via antenna 3.
[0133] The satellite communication module 270 can provide a solution for satellite communication applications in smartphones. The satellite communication module 270 may include at least one filter, switch, power amplifier, low-noise amplifier, etc. The satellite communication module 270 can receive electromagnetic waves via antenna 2, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to the satellite communication chip (i.e., satellite communication receiver 211) for further processing. The satellite communication module 270 can also amplify the signal processed by the satellite communication chip and convert it into electromagnetic waves for radiation via antenna 2.
[0134] The satellite communication module 270 can be independent of the satellite communication receiver 211. Alternatively, the satellite communication module 270 can be partially encapsulated within the satellite communication receiver 211.
[0135] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs a sound signal through an audio device or displays an image or video through the display screen 293. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 210 and may be housed in the same device as the mobile communication module 250 or other functional modules.
[0136] In some embodiments, the sensor module 280 may include a pressure sensor 280A, a fingerprint sensor 280B, a temperature sensor 280C, a touch sensor 280D, an ambient light sensor 280E, etc.
[0137] The pressure sensor 280A is used to sense pressure signals and convert them into electrical signals. In some embodiments, the pressure sensor 280A can be disposed on the display screen 293. There are many types of pressure sensors 280A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to the pressure sensor 280A, the capacitance between the electrodes changes. The mobile phone determines the pressure intensity based on the change in capacitance. When a touch operation is applied to the display screen 293, the mobile phone detects the intensity of the touch operation based on the pressure sensor 280A. The mobile phone can also calculate the touch position based on the detection signal from the pressure sensor 280A. In this embodiment, the pressure sensor 280A performs satellite positioning based on the user's operation on the satellite communication application interface.
[0138] The fingerprint sensor 280B is used to collect fingerprints. The phone can then use the collected fingerprint characteristics to unlock the phone, access app locks, and take photos with the fingerprint.
[0139] Temperature sensor 280C is used to detect temperature. In some embodiments, the mobile phone uses the temperature detected by temperature sensor 280C to execute a temperature handling strategy. For example, when the temperature reported by temperature sensor 280C exceeds a threshold, the mobile phone reduces the performance of the processor located near temperature sensor 280C to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is below another threshold, the mobile phone heats battery 242 to prevent abnormal shutdown caused by low temperature. In still other embodiments, when the temperature is below yet another threshold, the mobile phone boosts the output voltage of battery 242 to prevent abnormal shutdown caused by low temperature.
[0140] Touch sensor 280D is also called a "touch device". Touch sensor 280D can be disposed on display screen 293, and the touch sensor 280D and display screen 293 together form a touch screen, also called a "touchscreen". Touch sensor 280D is used to detect touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 293. In other embodiments, touch sensor 280D may also be disposed on the surface of the electronic device, in a different location than display screen 293.
[0141] An ambient light sensor 280E is used to sense ambient light intensity. The electronic device can adaptively adjust the brightness of the display screen 293 based on the sensed ambient light intensity. The ambient light sensor 280E can also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 280E can also work in conjunction with a proximity sensor to detect whether the electronic device is in a pocket, preventing accidental touches. In this embodiment, the ambient light sensor 280E can be used to sense the ambient light intensity of the electronic device in an uninhabited area, and then adaptively adjust the brightness of the display screen 293 based on the sensed ambient light intensity.
[0142] The mobile phone implements its display function through a GPU, a display screen 293, and an application processor. The GPU is a microprocessor for image editing, connected to the display screen 293 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 210 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0143] The display screen 293 is used to display images, videos, etc. The display screen 293 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a minimized LED, a microLED, a quantum dot LED (QLED), etc. In some embodiments, the mobile phone 400 may include one or N displays 293, where N is a positive integer greater than 1. In this embodiment, the display screen 293 can be used to display pages required by the mobile phone (e.g., satellite search interface 12, etc.).
[0144] The SIM card interface 294 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 294 to make contact with the phone. A phone can support one or more SIM card interfaces. The SIM card interface 294 supports Nano SIM cards, Micro SIM cards, and other SIM cards. Multiple cards can be inserted into the same SIM card interface 294 simultaneously. The SIM card interface 294 is also compatible with external memory cards. The phone interacts with the network through the SIM card to perform functions such as calls and data communication. One SIM card corresponds to one user number.
[0145] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a limitation on the structure of the mobile phone. In other embodiments of this application, the mobile phone may also adopt different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0146] Of course, it is understandable that the above... Figure 2 The illustration shown is merely an example of an electronic device in the form of a mobile phone. If the electronic device is a tablet, handheld computer, wearable device (such as a smartwatch, smart bracelet), or other device form factor, the structure of the electronic device may include more advanced technologies. Figure 2 The fewer structures shown can also include more than Figure 4 The structures shown are not limited here.
[0147] It is understandable that, generally speaking, the implementation of electronic device functions requires not only hardware support but also software cooperation. The software system of electronic devices can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application's embodiment uses a layered architecture... Taking the system as an example, the software structure of the electronic device is illustrated.
[0148] Figure 3 This is a schematic diagram of the layered architecture of a software system for an electronic device provided in an embodiment of this application.
[0149] Layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces (such as APIs).
[0150] In some examples, refer to Figure 3 As shown in this embodiment, the software of the electronic device is divided into five layers, from top to bottom: the application layer, the framework layer (or application framework layer), the system library and Android runtime, the HAL layer (hardware abstraction layer), and the driver layer (or kernel layer). The system library and Android runtime can also be referred to as the native framework layer or the native layer.
[0151] The application layer can include a series of applications. For example... Figure 3 As shown, the application layer can include applications (APPs) such as camera, gallery, calendar, map, WLAN, settings, music, SMS, calls, and satellite communication.
[0152] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer.
[0153] The application framework layer includes some predefined functions or services. For example, the application framework layer may include a window manager, content provider, phone manager, resource manager, notification manager, satellite antenna service, satellite communication service, storage service, etc., and this application embodiment does not impose any limitations on this.
[0154] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
[0155] Content providers store and retrieve data, making that data accessible to applications. This data can include videos, images, audio, phone calls made and received, browsing history and bookmarks, phone books, etc.
[0156] A phone manager is used to provide communication functionality for electronic devices. For example, a phone manager can manage the call status of a calling application (including initiation, connection, and termination).
[0157] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0158] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.
[0159] Satellite antenna services are used to manage antenna signal transmission and reception. Satellite communication services are used to manage satellite positioning and satellite services. Storage services are used to manage stored data.
[0160] The system library can include multiple functional modules, such as the surface manager and media libraries. The surface manager manages the display subsystem and provides 2D and 3D layer blending for multiple applications. The media libraries support playback and recording of various common audio and video formats, as well as still image files. The media libraries support multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0161] The Hardware Abstraction Layer (HAL) is the interface layer between the operating system kernel and the hardware circuitry, its purpose being to abstract the hardware. It hides the platform-specific hardware interface details, providing the operating system with a virtual hardware platform, making it hardware-independent and portable across multiple platforms. The HAL provides a standard interface, exposing device hardware functionality to the higher-level Java API framework (i.e., the framework layer). The HAL contains multiple library modules, each implementing an interface for a specific type of hardware component, such as: Wi-Fi HAL, Audio HAL, Satellite Antenna HAL, Satellite Communication Module, and Storage HAL.
[0162] The satellite communication module is used to calculate satellite positioning and implement satellite services.
[0163] The driver layer is the layer between hardware and software. The driver layer includes at least a display driver, a camera module driver, an audio driver, a sensor driver, a battery driver, etc., but this application is not limited to these. Specifically, the sensor driver can include the driver for each sensor included in the electronic device, such as an ambient light sensor driver. For example, the ambient light sensor driver can, in response to an indication or instruction from the sensor module to acquire detection data, promptly send the detection data from the ambient light sensor to the sensing module. In this embodiment, the display driver is used to display a series of operations on the display.
[0164] The hardware layer includes displays, satellite communication receivers, antennas, memory, etc.
[0165] A display is a hardware device in the Android system, typically used to display images, text, videos, and other content. In this embodiment, the display is used to show the interface required during satellite positioning.
[0166] A satellite communication receiver is hardware used to receive and process signals from a satellite. In this embodiment, the satellite communication receiver utilizes an antenna to receive satellite signals from the satellite. The antenna is a key physical component in the satellite communication receiver, used to receive radio frequency signals transmitted from the satellite and convert them into electrical signals for subsequent processing.
[0167] The memory can be secure memory, which is used to store historical location information of electronic devices.
[0168] exist In this system, applications are typically written in Java. Each application can include one or more class files. Each application can run its own class files as a process within the application layer. When a user interacts with an application, the application can call the relevant application programming interface (API) or service in the application framework layer to interact with system libraries or the kernel layer and implement the functionality corresponding to the user's actions.
[0169] Figure 4 This is a schematic diagram of the software modules and interactions between modules involved in a satellite positioning method provided in an embodiment of this application.
[0170] like Figure 4As shown, the satellite communication application in the application layer can interact with the satellite communication SDK. This interaction can occur by calling a pre-defined application programming interface (API) to interact with the satellite communication service in the application framework layer, or by calling a pre-defined API to interact with the display service in the application framework layer. The satellite communication service can interact with the satellite communication module in the HAL layer, or the satellite communication module can interact with the satellite antenna service in the antenna service of the application framework layer. The satellite antenna HAL can interact with the satellite antenna driver module in the kernel layer, which can be used to drive the satellite antenna in the hardware layer to receive satellite signals. The satellite antenna can transmit the received satellite signals to the satellite communication receiver, and the satellite driver module can obtain the satellite signals from the receiver. The satellite signals can be represented using civilian frequency band signals from the satellite positioning system. The satellite communication receiver driver module can interact with the satellite communication module, which can calculate the location of the electronic device based on the satellite signals, using a file descriptor (FD). The satellite communication module can store the location in memory or retrieve the location of the electronic device from memory. The satellite communication module can also interact with the display module in the HAL layer. The display module can interact with the display service, or it can interact with the display driver module, which is used to drive the display in the hardware layer to determine the interface display data.
[0171] Figure 5 This is the first flowchart of a satellite positioning method provided in the embodiments of this application.
[0172] Combination Figure 5 As shown, in the first embodiment, the satellite positioning method provided by this application may include the following steps:
[0173] Step S5001: The electronic device starts the satellite communication application.
[0174] Figure 6 This is a schematic diagram of an interface for launching a satellite communication application provided in an embodiment of this application.
[0175] For example, Figure 6(a) shows the main interface 10 of the electronic device. The main interface 10 can display icons for multiple applications, such as a clock application icon, a calendar application icon, a memo application icon, a satellite communication application icon 100, a settings application icon 200, and a text messaging application icon 300. The electronic device can launch an application in response to a user's click on its icon. The main interface 10 can also display a status bar, which may include one or more signal strength indicators for mobile communication signals, one or more signal strength indicators for Wi-Fi signals, a battery indicator, and a time indicator.
[0176] In one implementation, the electronic device can launch a satellite communication application from the main interface 10.
[0177] For example, the electronic device can respond to a user's click operation 01 on the icon 100 of the satellite communication application in the main interface 10, and jump to the launch interface 11 (e.g., Figure 6 (as shown in (b)). Next, the electronic device can launch the satellite communication application in response to the user's click operation 02 on the launch satellite control 110 in the launch interface 11.
[0178] Alternatively, the electronic device can also directly launch the satellite communication application in response to the user's click operation 01 on the icon 100 of the satellite communication application in the main interface 10, without having to go through the launch interface 11.
[0179] In another implementation, electronic devices can launch satellite communication applications within their settings app.
[0180] For example, the electronic device can respond to a user's click operation 03 on the settings application icon 200 in the main interface 10, and jump to the settings interface 12 (e.g., ...). Figure 6 As shown in (c) in the settings interface 12, multiple settings items can be included, such as application settings, WLAN settings, Bluetooth settings, mobile network settings, satellite communication settings 121, etc.
[0181] Next, the electronic device can respond to the user's click operation 04 on the satellite communication list 121 in the settings interface 12 and jump to the startup interface 11 (e.g. Figure 6 (as shown in (b)). Next, the electronic device can launch the satellite communication application in response to the user's click operation 02 on the launch interface 11 to launch the satellite control 110.
[0182] It should be noted that, Figure 6The icons in the interfaces (main interface 10, startup interface 11, settings interface 12) are for illustrative purposes only and are not specifically limited.
[0183] In step S5002, after the satellite communication application starts, it calls the satellite communication SDK to send a first positioning request to the satellite communication service.
[0184] Specifically, a satellite communication application can register a callback with the satellite communication SDK. The purpose of this callback is to report the current location of the electronic device to the satellite communication application after the satellite communication SDK obtains the current location of the electronic device.
[0185] The first positioning request may include the target location type and the target accuracy standard. The target location type is the type of location the electronic device expects to obtain during satellite positioning; this type may include, for example, a two-dimensional location and / or a three-dimensional location. The target accuracy standard is the expected accuracy of the satellite positioning result (e.g., the location of the electronic device) by the electronic device; this accuracy standard may include standards related to frequency accuracy, gain, directivity, bandwidth, VSWR, intermodulation loss, efficiency, mutual interference, and environmental adaptability.
[0186] Two-dimensional position refers to the location of the electronic device based on latitude and longitude, determined by satellite signals emitted by three satellites. Three-dimensional position is based on a geocentric rectangular coordinate system. This system has its origin at the Earth's center of mass. The X-axis points from the Earth's center of mass in an east-west direction, parallel to the equator. The Y-axis points from the Earth's center of mass in a north-south direction, parallel to the prime meridian. The Z-axis points from the Earth's center of mass towards the North Pole. The three-dimensional position is determined by satellite signals emitted by four satellites.
[0187] In step S5003, the satellite communication service sends a first positioning request to the satellite communication module.
[0188] In one implementation, the satellite communication service can register a callback with the satellite communication module. The purpose of registering this callback is that once the satellite communication system obtains the location of the electronic device, the satellite communication module can report the location of the electronic device to the satellite communication service.
[0189] In step S5004, the satellite communication module matches the antenna according to the first positioning request.
[0190] In one implementation, the electronic device may include multiple antennas for transmitting and receiving various types of wireless communication signals to ensure that the electronic device can operate efficiently in various environments.
[0191] For example, each antenna and its corresponding related information can be shown in Table 1:
[0192] Table 1
[0193]
[0194] It should be noted that the accuracy standards for various types of antennas may include not only frequency accuracy standards, but also other accuracy standards. This application does not limit this.
[0195] In one implementation, the satellite communication module can obtain the standard for the type and accuracy of the target location obtained by the electronic device from the first positioning request, and determine the matching antenna by querying the antenna type through the antenna service.
[0196] For example, the satellite communication module can query the antenna type through the antenna service, and based on the antenna type, match a satellite antenna for receiving satellite signals (such as...). Figure 2 Antenna 2 is shown in the image.
[0197] In step S5005, the satellite communication module sends a first data request to the satellite antenna service in the antenna service.
[0198] For example, the satellite communication module can send a first data request to the satellite antenna service in the antenna service through the vendor native development kit (VNDK) interface.
[0199] The first data request is used to request the satellite signal emitted by the satellite.
[0200] Step S5006: The satellite antenna service sends a first data request to the satellite antenna HAL.
[0201] In step S5007, the satellite antenna HAL sends a request to the satellite antenna driver module to obtain the first data.
[0202] In step S5008, in response to the first data request, the satellite antenna driving module drives the satellite antenna to acquire the satellite signal transmitted by the satellite.
[0203] Step S5009: The satellite antenna receives satellite signals transmitted by the satellite.
[0204] Optionally, when the satellite antenna receives satellite signals transmitted by the satellite, a timer built into the electronic device will synchronously record the reception time of the satellite signals.
[0205] In step S5010, the satellite antenna transmits satellite signals to the satellite communication receiver.
[0206] The satellite signal may include the transmission time, reception time, and ephemeris data.
[0207] For example, a satellite antenna can transmit satellite signals to a satellite communication receiver via a MIPI interface.
[0208] Step S5011: The satellite communication receiver sends satellite signals to the satellite communication receiving driver module.
[0209] In step S5012, the satellite communication receiving driver module sends satellite signals to the satellite communication module.
[0210] Optionally, the satellite communication module receives the satellite signal and obtains the reception time of the satellite signal received by the satellite antenna.
[0211] In step S5013, the satellite communication module obtains the satellite ephemeris data based on the satellite signal and the pseudorange between the satellite and the electronic equipment.
[0212] Pseudorange is a concept in satellite positioning used to describe the distance between a satellite and electronic equipment. It is not a physically measured distance but is calculated based on satellite signals, hence the name "pseudo" range. Due to various errors, such as atmospheric delay, pseudorange does not equal the actual geometric distance.
[0213] In one implementation, the satellite communication module extracts data from the satellite signal to determine the satellite signal transmission time and ephemeris data. Further, based on the ephemeris data, the satellite communication module determines the satellite's position. Next, based on the satellite signal transmission and reception times, the satellite communication module determines the satellite signal propagation time, and subsequently, the satellite communication module can use the satellite signal propagation time and the speed of light to determine the pseudorange between the satellite and the electronic device.
[0214] Optionally, due to a malfunction in the timer used to record the satellite signal transmission time, such as a timer failure, the satellite communication module cannot obtain the transmission time in the satellite signal, and therefore cannot obtain the propagation time from the electronic device to the satellite, and further, cannot obtain the pseudorange from the electronic device to the satellite.
[0215] In step S5014, if the pseudorange from the electronic device to the satellite is not obtained, the satellite communication module cannot obtain the first position of the electronic device.
[0216] The first position refers to the current position in this application.
[0217] Based on step S5014, the satellite communication module did not obtain the pseudorange from the electronic device to the satellite. Based solely on ephemeris data, it is impossible to calculate the current position of the electronic device, i.e., it is impossible to calculate the first position of the electronic device.
[0218] In step S5015, the satellite communication module sends a second data request to the storage service.
[0219] The second data request is used to obtain at least one pre-stored historical location of the electronic device or to obtain the previous pre-stored historical location of the electronic device. Specifically, when the timer is functioning normally, the satellite communication module will obtain the current location of the electronic device and store it as a historical location. This allows for the subsequent acquisition of a target historical location (second location) when the satellite communication module cannot obtain the current location of the electronic device, and the target historical location will be used as the target location of the electronic device.
[0220] The following explanation refers to steps S5016-S5023.
[0221] Step S5016: The storage service sends a second data request to the storage HAL.
[0222] In step S5017, the storage HAL sends a second data request to the storage driver module.
[0223] In step S5018, in response to the second data request, the storage driver module drives the memory to obtain at least one pre-stored historical location or to obtain the previous pre-stored historical location of the electronic device.
[0224] In step S5019, the memory sends second response data to the memory driver module.
[0225] The second response data includes at least one pre-stored historical location or the previous pre-stored historical location of the electronic device.
[0226] In step S5020, the storage driver module sends the second response data to the storage HAL.
[0227] Step S5021: The storage HAL sends the second response data to the storage service.
[0228] Step S5022: The storage service sends the second response data to the satellite communication module.
[0229] In step S5023, the satellite communication module obtains the second location of the electronic device based on the second response data.
[0230] The second position of the electronic device is the target historical position.
[0231] In one implementation, the second response request includes the electronic device pre-storing at least one historical location.
[0232] In one example, the satellite communication module acquires at least one historical location pre-stored by the electronic device, each historical location having a corresponding second time point; determines a second target time point from the second time points, the second target time point being a second time point greater than a third preset threshold and less than a fourth preset threshold; and determines the historical location corresponding to the second target time point as the second location.
[0233] The fourth preset threshold is the current second time point of the electronic device, which can also be called the end point of the second time point. The electronic device determines the third preset threshold as the second time point in its history, which can also be called the start point of the second time point. Further, the second target time point is the second time point that falls within the range of the start point and the end point of the second time point. For example, the end point of the second time point of the electronic device is 1.10s, and the end point of the second time point of the electronic device is 1.07s.
[0234] For example, assume the end point of the second time point of the electronic device is 1.10s and the start point of the second time point of the electronic device is 1.07s. The satellite communication module obtains three pre-stored historical positions, namely historical position 1, historical position 2, and historical position 3. The second time point corresponding to historical position 1 is 1.05s, the second time point corresponding to historical position 2 is 1.06s, and the second time point corresponding to historical position 3 is 1.08s. Based on the end point and the start point of the second time point, the satellite communication module determines that the second time point of 1.08s is the second target time point. Furthermore, the satellite communication module determines historical position 3 as the second position of the electronic device.
[0235] In another implementation, the second response request includes the previous historical location pre-stored by the electronic device.
[0236] In one example, the satellite communication module retrieves the last stored historical location of the electronic device.
[0237] The last stored location refers to the last stored historical location among the pre-stored historical locations.
[0238] For example, suppose the memory includes two historical locations, historical location 1 and historical location 2. The second time point corresponding to historical location 1 is 1.05s, and the second time point corresponding to historical location 2 is 1.06s. At this time, the satellite communication module obtains the previously stored historical location. Specifically, the satellite communication module determines the previously stored historical location within the historical locations based on the current second time point. For instance, the satellite communication module determines the historical location corresponding to the second time point of 1.06s as the previously stored historical location. Further, the satellite communication module determines historical location 2 as the second location of the electronic device.
[0239] In step S5024, the satellite communication module determines the second location as the target location of the electronic device.
[0240] In summary, due to the timer malfunction, the electronic device was unable to obtain its first location. However, when the first location could not be obtained, the electronic device could obtain its second location to locate itself, ensuring the normal operation of subsequent satellite services and improving the user experience.
[0241] In the above embodiments, after executing step S5024, the electronic device can directly obtain the second location of the electronic device, or it can obtain the second location of the electronic device in response to the user's click operation.
[0242] Figure 7 This is a second flowchart of a satellite positioning method provided in an embodiment of this application.
[0243] Figure 8 This is a schematic diagram of the first interface for satellite positioning provided in an embodiment of this application.
[0244] Combination Figure 8 As shown, when the satellite communication module is unable to calculate the first location of the electronic device, the electronic device displays a prompt interface to the user, which asks the user whether they need to obtain the location again.
[0245] In one implementation, combining Figure 7 As shown, the method for displaying a first interface provided in this application embodiment may include the following steps:
[0246] In step S701, the satellite communication module sends a third data request to the display service.
[0247] The third data request is used to request the display of the prompt interface.
[0248] In step S702, the display service sends a third data request to the display HAL module.
[0249] Step S703: The HAL module sends a third data request to the display driver module.
[0250] In step S704, in response to the third data request, the display driver module drives the display to generate a prompt interface.
[0251] The prompt interface includes a text box containing prompt text that asks the user whether they need to retrieve the location of the electronic device again.
[0252] In step S705, the display sends a prompt interface to the display driver module.
[0253] Step S706: The display driver module sends a prompt interface to the display HAL module.
[0254] Step S707: The HAL module sends a prompt interface to the display service.
[0255] Step S708: Display the prompt interface sent by the service to the satellite communication SDK.
[0256] Step S709: The satellite communication application calls the satellite communication SDK and displays a prompt interface.
[0257] Furthermore, continue to combine Figure 8 As shown, in response to the user's click operation 06 on the text box 400 in the prompt interface 13, the satellite communication module obtains the second location of the electronic device.
[0258] The specific details of how the satellite communication module obtains the second location of the electronic device can be found in steps S5016-S5025 above, and will not be repeated here.
[0259] The second position mentioned above is the target historical position of the electronic device. The target historical position is determined based on the historical positions pre-stored in the memory of the electronic device. The historical position can be obtained in the following ways.
[0260] Figure 9 This is the third flowchart of a satellite positioning method provided in the embodiments of this application.
[0261] Combination Figure 9 As shown, in the second embodiment, the satellite positioning method provided in this application may include the following steps:
[0262] Step S9001: The electronic device starts the satellite communication application.
[0263] In step S9002, after the satellite communication application starts, it calls the satellite communication SDK to send a first positioning request to the satellite communication service.
[0264] In step S9003, the satellite communication service sends a first positioning request to the satellite communication module.
[0265] In step S9004, the satellite communication module matches the antenna according to the request of the positioning electronic device.
[0266] In step S9005, the satellite communication module sends a first data request to the satellite antenna service in the antenna service.
[0267] Step S9006: The satellite antenna service sends a first data request to the satellite antenna HAL.
[0268] In step S9007, the satellite antenna HAL sends a request to the satellite antenna drive module to obtain the first data.
[0269] In step S9008, in response to the first data request, the satellite antenna driving module drives the satellite antenna to acquire the satellite signal transmitted by the satellite.
[0270] Step S9009: The satellite antenna receives satellite signals transmitted by the satellite.
[0271] In step S9010, the satellite antenna transmits satellite signals to the satellite communication receiver.
[0272] In step S9011, the satellite communication receiver sends satellite signals to the satellite communication receiving driver module.
[0273] The specific details of steps S9001-S9011 above can be found in steps S5001-S5011 above, and will not be repeated here.
[0274] In step S9012, the satellite communication receiving driver module sends satellite signals to the satellite communication module.
[0275] In step S9013, the satellite communication module obtains the pseudorange between the satellite and the electronic equipment and the satellite's ephemeris data based on the satellite signal.
[0276] In one implementation, the satellite communication module extracts data from the satellite signal to determine the satellite signal transmission time and ephemeris data. Further, based on the ephemeris data, the satellite communication module determines the satellite's position. Next, based on the satellite signal transmission and reception times, the satellite communication module determines the satellite signal propagation time, and subsequently, the satellite communication module can use the satellite signal propagation time and the speed of light to determine the pseudorange between the satellite and the electronic device.
[0277] For example, the propagation time of a satellite signal can be determined using the following formula (1):
[0278] ΔT i =T1-T2 Formula (1)
[0279] Where ΔTi is the propagation time of satellite signal i transmitted by satellite i to the electronic device, T1 is the time when the antenna receives satellite signal i (i.e., the reception time of satellite signal i), and T2 is the transmission time of satellite signal i (the transmission time of satellite signal i).
[0280] For example, the pseudorange can be determined by the following formula (2):
[0281] D i =ΔT i ×C formula (2)
[0282] Where Di is the initial pseudorange from satellite i to the electronic device, and C is the speed of light.
[0283] Optionally, since there is a discrepancy between the clock of the satellite communication module and the satellite clock, the initial pseudorange can be corrected based on the clock deviation between the clock of the satellite communication module and the satellite clock, thereby improving the accuracy of the pseudorange.
[0284] For example, the corrected pseudorange can be determined using the following formula (3):
[0285] D i '=ΔT i ×C+Di formula (3)
[0286] The following explanation will continue using the corrected pseudorange.
[0287] Taking the reception of satellite signals from satellites 1, 2, and 3 as an example, the location of electronic devices is represented by latitude and longitude.
[0288] Assume that the transmission time T of satellite signal 1 from satellite 1 is... 11 =0 seconds, satellite signal 1 reception time T of satellite 1 12 =0.006670 seconds, the transmission time T of satellite signal 2 of satellite 2 21 =0 seconds, the reception time T of satellite signal 2 from satellite 2 22 =0.00670 seconds, the transmission time T of satellite signal 3 of satellite 3. 31 =0 seconds, the reception time T of satellite signal 3 of satellite 3 32 =0.00673 seconds, speed of light C = 299792458 m / s. According to formula (1), the propagation time of satellite signal 1 from the satellite to the electronic device is ΔT1 = 0.006670 seconds, the propagation time of satellite signal 2 from the satellite to the electronic device is ΔT2 = 0.00670 seconds, and the propagation time of satellite signal 3 from the satellite to the electronic device is ΔT3 = 0.00673 seconds. According to formulas (2) and (3), the corrected pseudorange D1' between satellite 1 and the electronic device is approximately 200000 meters, the corrected pseudorange D2' between satellite 2 and the electronic device is approximately 201000 meters, and the corrected pseudorange D3' between satellite 3 and the electronic device is approximately 202000 meters.
[0289] Taking the reception of satellite signals from satellites 4, 5, 6, and 7 as an example, the location of electronic equipment is represented using a geocentric rectangular coordinate system.
[0290] Assume that the transmission time T of satellite signal 4 from satellite 4 is... 41 =0 seconds, the reception time T of satellite signal 4 from satellite 4 42=0.07 seconds, the transmission time T of satellite signal 5 of satellite 5 51 =0 seconds, satellite signal reception time T of satellite 5 52 =0.08 seconds, the transmission time T of satellite signal 6 of satellite 6 61 =0 seconds, satellite signal reception time T of satellite 6 62 =0.09 seconds, the transmission time T of satellite signal 7 of satellite 7 71 =0 seconds, satellite signal reception time T of satellite 7. 72 =0.10 seconds, speed of light C = 299,792,458 m / s. According to formula (1), the propagation time of satellite signal 4 from the satellite to the electronic device is ΔT4 = 0.07 seconds, the propagation time of satellite signal 5 from the satellite to the electronic device is ΔT5 = 0.08 seconds, the propagation time of satellite signal 6 from the satellite to the electronic device is ΔT6 = 0.09 seconds, and the propagation time of satellite signal 7 from the satellite to the electronic device is ΔT7 = 0.09 seconds. According to formulas (2) and (3), the corrected pseudorange D4' between satellite 4 and the electronic device is 23,000,000 meters, the corrected pseudorange D5' between satellite 5 and the electronic device is 25,000,000 meters, the corrected pseudorange D6' between satellite 6 and the electronic device is 24,000,000 meters, and the corrected pseudorange D7' between satellite 7 and the electronic device is 22,000,000 meters.
[0291] In step S9014, the satellite communication module determines the first position of the electronic device based on the corrected pseudorange between the satellite and the electronic device and the satellite's ephemeris data.
[0292] The first position is the current position of the electronic device.
[0293] In one implementation, the satellite communication module can determine the satellite's position based on ephemeris data, and then determine the electronic device's first position, i.e., its current position, based on the satellite's position and the pseudorange from the satellite to the electronic device.
[0294] Continuing with the example of receiving satellite signals from Satellite 1, Satellite 2, and Satellite 3, and representing the location of electronic devices using latitude and longitude.
[0295] As shown in Table 2, the location information of satellites in a two-dimensional map is represented by coordinates (N, W). Here, W corresponds to longitude and N corresponds to latitude.
[0296] Assume the position information of satellite 1 is latitude N1 = 40.0000°N and longitude W1 = 100.0000°W, i.e., satellite 1: (N1, W1,) = (40.0000, 100.0000), satellite 2 is latitude 40.0050°N and longitude 100.0100°W, i.e., satellite 2: (N2, W2,) = (40.0050, 100.0100), and satellite 3 is latitude 40.0020°N and longitude 100.0050°W, i.e., satellite 3: (N3, W3,) = (40.0020, 100.0050). Based on the above example, the corrected pseudorange D1' between satellite 1 and the electronic equipment is 200,000 meters, the corrected pseudorange D2' between satellite 2 and the electronic equipment is 201,000 meters, and the corrected pseudorange D3' between satellite 3 and the electronic equipment is 202,000 meters.
[0297] Table 2
[0298] satellite Latitude (°) Longitude (°) Corrected pseudorange (meters) 1 <![CDATA[N1=40.0000]]> <![CDATA[W1=100.0000]]> <![CDATA[D1’=200000]]> 2 <![CDATA[N2=40.0050]]> <![CDATA[W2=100.0100]]> <![CDATA[D2’=201000]]> 3 <![CDATA[N3=40.0020]]> <![CDATA[W3=100.0050]]> <![CDATA[D3’=202000]]> ;
[0299] Based on this, a distance equation can be established, as shown in formula (4), and the first position of the electronic device can be determined by formula (4):
[0300]
[0301] Where Wi is the latitude of satellite i, W is the longitude of satellite i, N is the latitude of electronic device, W is the longitude of electronic device, and Di' is the corrected pseudorange from satellite i to electronic device.
[0302] For example, for satellite 1:
[0303] For satellite 2:
[0304] For satellite 3:
[0305] In summary, N is approximately 100.0032, W is approximately 40.0028, and the first position of the electronic device is longitude 40.0028°W and latitude 100.0032°N.
[0306] Continuing with the example of receiving satellite signals from satellites 4, 5, 6, and 7, and representing the location of electronic devices using a geocentric rectangular coordinate system.
[0307] As shown in Table 3, Table 3 illustrates the satellite's position information in the geocentric rectangular coordinate system, represented by coordinates (X, Y, Z).
[0308] Assume the position information of satellite 4 is (20000000, 10000000, 21000000), the position information of satellite 5 is (-18000000, 16000000, 22000000), the position information of satellite 6 is (21000000, -14000000, 19000000), and the position information of satellite 7 is (-19000000, 18000000, 20000000). Then, the corrected pseudoranges between satellite 4 and the electronic equipment obtained in step S8012 are: D4' = 23000000 meters, D5' = 25000000 meters, D6' = 24000000 meters, and D7' = 22000000 meters.
[0309] Based on this, a distance equation can be established, as shown in formula (5), and the first position of the electronic device can be determined by formula (5):
[0310]
[0311] Where (Xi, Yi, Zi) represents the position of satellite i. Xi is the position of satellite i on the X-axis in the geocentric rectangular coordinate system, Yi is the position of satellite i on the Y-axis in the geocentric rectangular coordinate system, and Zi is the position of satellite i on the Z-axis in the geocentric rectangular coordinate system. i Let ' be the pseudorange from satellite i to the electronic device after correction, and (X, Y, Z) be the first position used to represent the electronic device.
[0312] For example, for satellite 4: For satellite 5: For satellite 6: For satellite 7:
[0313] The satellite communication module can obtain the first position of the electronic device as (11000000, -19000000, 22000000).
[0314] In summary, the first position of the electronic device can be determined based on the satellite's ephemeris data and the corrected pseudorange from the satellite to the electronic device.
[0315] It should be understood that the electronic device's first position can also be determined based on satellite ephemeris data and the pseudorange from the satellite to the electronic device.
[0316] In the case of obtaining the first location as described above, the satellite communication module can store the first location as a historical location. This method may include the following steps:
[0317] In step S9015, after obtaining the first location, the satellite communication module sends a request for the first stored data to the storage service.
[0318] The request for the first stored data is used to store the first location.
[0319] Step S9016: The storage service sends a request for the first stored data to the storage HAL.
[0320] In step S9017, the storage HAL sends a request for the first stored data to the storage driver module.
[0321] In step S9018, in response to the request for the first stored data, the storage driver module drives the memory to store the first location as a historical location.
[0322] In step S9019, based on the first triggering condition, the satellite communication module obtains the third location of the electronic device.
[0323] The third location is the current location of the electronic device after the update, and the first triggering condition is determined based on the user's operation of updating the location.
[0324] Figure 10 This is a schematic diagram of a second interface for satellite positioning provided in an embodiment of this application.
[0325] Combination Figure 10 As shown, in subsequent satellite service communications, the satellite communication module can respond to the user's click operation on the location-carrying control in the service interface, i.e., the first trigger condition, to reacquire the current location of the electronic device. In other words, the satellite communication module acquires the updated current location of the electronic device, i.e., the third location.
[0326] Combination Figure 6 and Figure 10 As shown, taking the scenario of sending SMS in satellite communication services as an example, when an electronic device sends an SMS to other terminal devices, the satellite communication module responds to the user's operation of updating location triggered on the electronic device's service interface, such as the information interface, i.e., the first triggering condition, and obtains the third location.
[0327] For example, the electronic device responds to the user's input on the main interface 10 (e.g., ... Figure 6 In (a) shown in the image, clicking on information 300 (05) will redirect to information interface 14 (as shown in the image). Figure 10 As shown, the information interface 14 includes information content, location content, and update controls, such as a location-carrying control 500. In response to a user's click on the location-carrying control 500 in the information interface 14, the satellite communication module acquires the third location of the electronic device.
[0328] The process of obtaining the third location of the electronic device can be referred to in steps S9001-S9014, and will not be repeated here.
[0329] Optionally, the first triggering condition includes at least one of a second preset frequency and a preset satellite signal strength.
[0330] A preset frequency refers to a specific frequency value pre-set in an electronic device, typically used for fixed operations or setting related operations. Preset frequencies can be applied in various fields, including wireless communication, audio processing, and signal analysis. For example, in the field of wireless communication, a preset frequency is used to tune to a specific broadcast or communication channel. For instance, a preset radio station frequency on a radio. In this embodiment, the second preset frequency can be set to 3 minutes / time to determine whether the satellite communication module has acquired the third location of the electronic device. A preset satellite signal strength refers to a predetermined power level when the satellite transmits satellite signals to the electronic device in satellite communication. In this embodiment, the preset satellite signal strength can be set to 60 decibels to determine whether the satellite communication module has acquired the third location of the electronic device.
[0331] In one example, when the first triggering condition includes at least one of a second preset frequency and a preset satellite signal strength, the satellite communication module can record the acquisition time of the first location.
[0332] The satellite communication module can acquire the third location of the electronic device based on a second preset frequency. For example, when the frequency is higher than the second preset frequency, the satellite communication module acquires the third location of the electronic device. For instance, if the second preset frequency is 3 minutes per interval, the satellite communication module acquires the third location of the electronic device when the interval exceeds 3 minutes.
[0333] The satellite communication module can obtain the third location of the electronic device based on a preset satellite signal strength. For example, if the preset satellite signal strength is greater than the preset satellite signal strength, the satellite communication module will obtain the third location of the electronic device. For instance, if the preset satellite signal strength is 60 decibels, the satellite communication module will obtain the third location of the electronic device if the signal strength is greater than 60 decibels.
[0334] The satellite communication module can obtain the third location of the electronic device based on a second preset frequency and a preset satellite signal strength. For example, the satellite communication module can obtain the third location of the electronic device when the frequency and signal strength are greater than the second preset frequency and the preset satellite signal strength. For instance, if the signal strength exceeds 60 decibels for more than 3 minutes, the satellite communication module can obtain the third location of the electronic device.
[0335] In step S9020, the satellite communication module sends a request for the second stored data to the storage service.
[0336] The request for the second stored data is used to store the third location.
[0337] Step S9021: The storage service sends a request for the second stored data to the storage HAL.
[0338] In step S9022, the storage HAL sends a request for the second storage data to the storage driver module.
[0339] In step S9023, in response to the request for the second stored data, the storage driver module drives the memory to store the third location as a historical location.
[0340] Each historical location contains a timestamp.
[0341] Steps S9020-S9023 can be implemented similarly to the aforementioned steps S9015-S9018, and will not be described again.
[0342] In summary, the satellite communication module continuously acquires the first location of the electronic device and stores it as a historical location. The electronic device can also acquire a third location based on a first trigger condition and store it as a historical location. If the electronic device cannot subsequently acquire the first location, it can acquire the second location from the stored historical locations, thus improving the accuracy of acquiring the second location.
[0343] In such Figure 5 In the illustrated embodiment, the satellite communication module uses the electronic device's second location as its target location. Since this second location is determined based on the electronic device's historical locations, it may not be the device's current location. Therefore, the satellite communication module can reacquire the electronic device's first location, improving the accuracy of the target location.
[0344] Figure 11 This is the fourth flowchart of a satellite positioning method provided in the embodiments of this application.
[0345] In step S1101, within the first preset frequency, the satellite communication module sends a first data request to the satellite antenna service in the antenna service.
[0346] For example, assuming the first preset frequency is set to 5 minutes / time, the satellite communication module obtains a first data request sent by the satellite communication module to the satellite antenna service in the antenna service once every 5 minutes.
[0347] In step S1102, the satellite antenna service sends a first data request to the satellite antenna HAL.
[0348] In step S1103, the satellite antenna HAL sends a request to the satellite antenna drive module to obtain the first data.
[0349] In step S1104, in response to the first data request, the satellite antenna driving module drives the satellite antenna to acquire the satellite signal transmitted by the satellite.
[0350] Step S1105: The satellite antenna receives the satellite signal transmitted by the satellite.
[0351] Step S1106: The satellite antenna transmits satellite signals to the satellite communication receiver.
[0352] Step S1107: The satellite communication receiver sends satellite signals to the satellite communication receiving driver module.
[0353] Step S1108: The satellite communication receiving driver module sends satellite signals to the satellite communication module.
[0354] The specific details of steps S1102-S1108 can be found in steps S5006-S5013.
[0355] In step S1109, the satellite communication module obtains the corrected pseudorange and ephemeris data between the satellite and electronic equipment based on the satellite signal.
[0356] In step S1110, based on the corrected pseudorange between the satellite and the electronic device and the satellite's ephemeris data, the satellite communication module determines the first position of the electronic device.
[0357] The specific details of steps S1109-S1110 can be found in steps S8012-S8013, and will not be repeated here.
[0358] In step S1111, the satellite communication module determines the first location as the target location of the electronic device.
[0359] In summary, since the second location is the target historical location of the electronic device, not the current location of the electronic device, in order to ensure the accuracy of the electronic device in obtaining the target location, the first location of the electronic device can be re-obtained based on the first preset frequency to update the target location of the electronic device, thereby ensuring the accuracy of locating the electronic device and improving the user experience.
[0360] Figure 12 This is the fifth flowchart of a satellite positioning method provided in the embodiments of this application.
[0361] Combination Figure 12 As shown, the satellite positioning method provided in this application embodiment may include the following steps:
[0362] Step S1201: The electronic device starts the satellite communication application.
[0363] In step S1202, after the satellite communication application starts, it calls the satellite communication SDK to send a first positioning request to the satellite communication service.
[0364] In step S1203, the satellite communication service sends a first positioning request to the satellite communication module.
[0365] In step S1204, the satellite communication module matches the antenna according to the first positioning request.
[0366] In step S1205, the satellite communication module sends a first data request to the satellite antenna service in the antenna service.
[0367] Step S1206: The satellite antenna service sends a first data request to the satellite antenna HAL.
[0368] In step S1207, the satellite antenna HAL sends a request to the satellite antenna drive module to obtain the first data.
[0369] In step S1208, in response to the first data request, the satellite antenna driving module drives the satellite antenna to acquire the satellite signal transmitted by the satellite.
[0370] Step S1209: The satellite antenna receives satellite signals transmitted by the satellite.
[0371] Step S1210: The satellite antenna transmits satellite signals to the satellite communication receiver.
[0372] Step S1211: The satellite communication receiver sends satellite signals to the satellite communication receiving driver module.
[0373] In step S1212, the satellite communication receiving driver module sends satellite signals to the satellite communication module.
[0374] In step S1213, the satellite communication module obtains the satellite ephemeris data based on the satellite signal and the corrected pseudorange between the satellite and the electronic equipment.
[0375] In step S1214, without obtaining the corrected pseudorange between the satellite and the electronic device, the satellite communication module cannot obtain the first position of the electronic device.
[0376] In step S1215, the satellite communication module sends a first data request to the satellite antenna service in the antenna service.
[0377] Specifically, after the satellite communication module sends a first data request to the satellite antenna service in the antenna service, the electronic device executes steps S1216-S1222. After the satellite communication module sends a second data request to the storage service, the electronic device executes steps S1223-S1231.
[0378] In step S1216, the satellite antenna service sends a first data request to the satellite antenna HAL.
[0379] In step S1217, the satellite antenna HAL sends a request to the satellite antenna driver module to obtain the first data.
[0380] In step S1218, in response to the first data request, the satellite antenna driving module drives the satellite antenna to acquire the satellite signal transmitted by the satellite.
[0381] Step S1219: The satellite antenna receives the satellite signal transmitted by the satellite.
[0382] In step S1220, the satellite antenna transmits satellite signals to the satellite communication receiver.
[0383] In step S1221, the satellite communication module obtains the pseudorange between the satellite and the electronic equipment and the satellite's ephemeris data based on the satellite signal.
[0384] In step S1222, the satellite communication module determines the first position of the electronic device based on the corrected pseudorange between the satellite and the electronic device and the satellite's ephemeris data.
[0385] Steps S1216-S1221 can be referred to steps S1206-S1214, and will not be shown again in the figure.
[0386] In step S1223, the satellite communication module sends a second data request to the storage service.
[0387] The second data request is used to obtain at least one pre-stored historical location of the electronic device or to obtain the previous pre-stored historical location of the electronic device.
[0388] Steps S1215 and S1223 can be executed simultaneously.
[0389] Step S1224: The storage service sends a second data request to the storage HAL.
[0390] In step S1225, the storage HAL sends a second data request to the storage driver module.
[0391] In step S1226, in response to the second data request, the storage driver module drives the memory to obtain at least one pre-stored historical location or to obtain the previous pre-stored historical location of the electronic device.
[0392] In step S1227, the memory sends the second response data to the memory driver module.
[0393] The second response data includes at least one pre-stored historical location or the previous pre-stored historical location of the electronic device.
[0394] In step S1228, the storage driver module sends the second response data to the storage HAL.
[0395] Step S1229: The storage HAL sends the second response data to the storage service.
[0396] Step S1230: The storage service sends the second response data to the satellite communication module.
[0397] In step S1231, the satellite communication module obtains the second location of the electronic device based on the second response data.
[0398] In step S1232, the satellite communication module determines the first position of the electronic device as the target position.
[0399] Optionally, after acquiring the first and second positions of the electronic device, the satellite communication module may, based on a preset priority, use the first position as the target position.
[0400] For example, the first position has a higher priority than the second position.
[0401] In summary, due to timer malfunctions, such as timer instability, when the electronic device is unable to acquire its first position, it can reacquire its first and second positions to further locate the device, ensuring the normal operation of subsequent satellite services and improving the user experience.
[0402] In the above Figure 5 In the illustrated embodiment, if the satellite communication module fails to acquire the second location of the electronic device, the satellite communication module can determine the target location of the electronic device based on the cell identifier.
[0403] Figure 13 This is the sixth flowchart of a satellite positioning method provided in the embodiments of this application.
[0404] Combination Figure 13 As shown, in another embodiment, the satellite positioning method provided in this application may include the following steps:
[0405] In one implementation, the satellite communication module can determine the target location of the electronic device based on a first cell identifier.
[0406] The first cell identifier is the target historical cell identifier pre-stored in the electronic device.
[0407] In step S1301, the satellite communication module sends a fifth data request to the storage service.
[0408] The fifth data request is used to obtain multiple historical cell identifiers.
[0409] Step S1302: The storage service sends a fifth data request to the storage HAL.
[0410] Step S1303: The storage HAL sends a fifth data request to the storage driver module.
[0411] Step S1304: The storage driver module drives the memory to acquire the fifth response data of the electronic device.
[0412] The fifth response data includes multiple historical cell identifiers.
[0413] In step S1305, the memory sends the fifth response data to the memory driver module.
[0414] In step S1306, the storage driver module sends the fifth response data to the storage HAL.
[0415] Step S1307: The storage HAL sends the fifth response data to the storage service.
[0416] Step S1308: The storage service sends the fifth response data to the satellite communication module.
[0417] In step S1309, the satellite communication module obtains the first cell identifier of the electronic device based on the fifth response data.
[0418] Optionally, if the satellite communication module fails to obtain the second location of the electronic device, it acquires at least one historical cell identifier pre-stored by the electronic device. Each historical cell identifier has a corresponding first time point. A first target time point is determined from the first time points. If the first target time point is greater than a first preset threshold and less than a second preset threshold, the historical cell identifier corresponding to the first target time point is determined as the first cell identifier.
[0419] The second preset threshold is based on the current first time point, which can also be called the end point of the first time point. The electronic device determines the third preset threshold as the first time point in the electronic device's history, which can also be called the start point of the first time point. Further, the first target time point is the first time point that falls within the range of the first preset threshold and the second preset threshold.
[0420] For example, assuming the first preset threshold is 1.10s and the second preset threshold is 1.15s, the range of the first and second preset thresholds is determined to be 1.10s-1.15s. The satellite communication module obtains pre-stored historical cell identifiers, namely historical cell identifier 1, historical cell identifier 2, and historical cell identifier 3. The first time point corresponding to historical cell identifier 1 is 1.05s, the first time point corresponding to historical cell identifier 2 is 1.09s, and the first time point corresponding to historical cell identifier 3 is 1.12s. The satellite communication module determines that the first time point of 1.12s is within the range of 1.10s-1.15s, and thus determines that the first time point corresponding to 1.12s is the first target time point. Further, the satellite communication module determines that historical cell identifier 3 corresponding to the first target time point is the first cell identifier.
[0421] Step S1310: Based on the first cell identifier, the satellite communication module determines the target location of the electronic device.
[0422] Optionally, the satellite communication module obtains the location of the first cell corresponding to the first cell identifier, such as latitude and longitude information, based on the relationship table stored on the electronic device.
[0423] The first cell location is the location of the base station. The relationship table can be stored in memory. The relationship table stores at least one cell identifier and at least one cell location, and each cell identifier has a corresponding cell location. The relationship table also includes the first cell identifier.
[0424] Therefore, the satellite communication module can obtain the first cell identifier from the relation table. Furthermore, the satellite communication module can obtain the location of the first cell corresponding to the first cell identifier. Then, based on the first cell location, the satellite communication module determines the target location of the electronic device.
[0425] In one example, after acquiring the location of the first cell, the satellite communication module determines the target location of the electronic device based on the location of the first cell and the distance between the electronic device and the base station.
[0426] For example, the satellite communication module first acquires the base station's transmission power and satellite signal strength to determine the distance between the base station and the electronic device, i.e., the distance between the location of the first cell and the location of the electronic device. Then, based on the distance between the location of the first cell and the location of the electronic device, and the location of the first cell, the satellite communication module determines the target location of the electronic device.
[0427] Optionally, in order to improve the accuracy of the target location of the electronic device, the satellite communication module can use multiple first cell locations and the distance between each first cell location and the electronic device to determine the target location of the electronic device.
[0428] In another implementation, steps S1309-S1310 can also determine the target location of the electronic device in the following manner.
[0429] For example, the satellite communication module can determine the target location of the electronic device based on the second cell identifier.
[0430] Step S1311: The satellite communication module obtains the second cell identifier.
[0431] The second cell identifier is the current cell identifier obtained by the electronic device.
[0432] In step S1312, based on the second cell identifier, the satellite communication module determines the target location of the electronic device.
[0433] Optionally, the first cell location is the location of the base station. A relation table can be stored in a memory, storing at least one cell identifier and at least one cell location, with each cell identifier having a corresponding cell location. The relation table also includes a second cell identifier.
[0434] The satellite communication module obtains the location of the second cell corresponding to the second cell identifier based on the relationship table stored on the electronic device; based on the location of the second cell, the satellite communication module determines the target location of the electronic device.
[0435] The specific content of step S1312 can be referred to in the same way as step S1310 above, and will not be repeated here.
[0436] In this embodiment of the application, steps S1311-S1312 can be replaced with Figure 13 Steps S1309-S1310 are shown in the figure, while steps S1311-S1312 are not shown in the figure.
[0437] In summary, due to a timer malfunction, the electronic device is unable to obtain its first location, nor its second location. Under these circumstances, the electronic device can be located based on either its first or second cell location to ensure the normal operation of subsequent satellite services and improve user experience.
[0438] Figure 14 This is the seventh flowchart of a satellite positioning method provided in the embodiments of this application.
[0439] In the above Figure 13In the illustrated embodiment, if the electronic device fails to acquire the first location and the second location, it can acquire the first cell identifier and determine the target location of the electronic device based on the first cell location corresponding to the first cell identifier. If the first cell identifier is also not acquired, the satellite communication module can prompt the user to change the orientation of the electronic device, reacquire satellite signals, and then re-attempt to locate the electronic device.
[0440] Combination Figure 14 As shown, the satellite positioning method provided in this application embodiment may include the following steps:
[0441] Step S141: The satellite communication module failed to obtain the first cell identifier of the electronic device.
[0442] For example, assuming the first preset threshold is 1.10s and the second preset threshold is 1.15s, the range of the first and second preset thresholds is determined to be 1.10s-1.15s. The satellite communication module obtains pre-stored historical cell identifiers, namely historical cell identifier 1, historical cell identifier 2, and historical cell identifier 3. The first time point corresponding to historical cell identifier 1 is 1.05s, the first time point corresponding to historical cell identifier 2 is 1.09s, and the first time point corresponding to historical cell identifier 3 is 1.08s. The satellite communication module does not obtain the first target time point, and further, it does not obtain the first cell identifier of the electronic device.
[0443] Optionally, in this embodiment, step S141 can be replaced by the satellite communication module failing to obtain the second cell identifier of the electronic device.
[0444] In step S142, the satellite communication module sends a request to the display service to display the first interface.
[0445] The request to display the first interface includes a prompt text box and a confirmation control. The prompt text box includes text prompting the user to change the orientation of the electronic device.
[0446] Step S143: The display service sends a request to the display HAL module to display the first interface.
[0447] Step S144: The HAL module sends a request to the display driver module to display the first interface.
[0448] Step S145: The display driver module drives the display to generate the first interface and retrieves the generated first interface from the display.
[0449] Step S146: The display sends the first interface to the display driver module.
[0450] Step S147: The display driver module sends the first interface to the display HAL module.
[0451] Step S148: The HAL module sends the first interface to the display service.
[0452] Step S149: The display service sends the first interface to the satellite communication SDK.
[0453] In step S150, the satellite communication application calls the satellite communication SDK and displays the first interface.
[0454] In step S151, if the orientation of the electronic device is changed based on the prompt text box, the satellite communication module reacquires the satellite signal.
[0455] For example, Figure 15 This is a schematic diagram of the first interface for satellite positioning provided in an embodiment of this application.
[0456] Combination Figure 15 As shown, when the satellite communication module cannot obtain the first cell identifier of the electronic device, it displays a first interface 15. The first interface 15 may include a prompt text box 600 and a confirmation control 700. The prompt text box 600 contains text prompting the user to change the location of the electronic device. The confirmation control 700 is used to detect whether the user has received the prompt to change the location of the electronic device.
[0457] For example, in response to a user's click on the confirmation control 700 on the first interface 15, the satellite communication module detects that the user has received a prompt indicating that the electronic device's orientation has been changed. Further, the satellite communication module reacquires satellite signals.
[0458] Optionally, the first interface may only include a prompt text box, which contains text prompting the user to change the orientation of the electronic device. The satellite communication module continuously detects whether the orientation of the electronic device has changed. If it has changed, the satellite communication module reacquires the satellite signal from the electronic device.
[0459] In summary, due to timer malfunction, if the electronic device is unable to obtain its first and second locations, or its first or second cell location, the device's orientation can be changed based on the first interface to reacquire satellite signals, thereby locating the electronic device, ensuring the normal operation of subsequent satellite services, and improving the user experience.
[0460] Figure 16 This is the eighth flowchart of a satellite positioning method provided in the embodiments of this application.
[0461] Combination Figure 16 As shown, in this embodiment, the satellite positioning method includes steps S161-S179.
[0462] Step S161: The electronic device acquires the first click operation and determines whether the first position has been successfully acquired.
[0463] The specific content of step S161 can be referred to in steps S5001-S5015 and steps S9001-S9015 above, and will not be repeated here.
[0464] Step S162: If the first location is successfully acquired, the electronic device stores the first location as a historical location and proceeds to step S163.
[0465] The specific details of step S162 can be found in steps S9016-S9019 above, and will not be repeated here.
[0466] Step S163: The electronic device acquires the user's selected location and determines whether the third location has been successfully acquired.
[0467] The specific details of step S163 can be found in step S9020 above, and will not be repeated here.
[0468] If the third position is successfully obtained, proceed to step S164.
[0469] In step S164, the electronic device stores the third location as a historical location.
[0470] The specific details of step S164 can be found in steps S9021-S9024 above, and will not be repeated here.
[0471] Step S165: If the first position is not successfully acquired, the electronic device performs a second click operation to determine whether the first and second positions are successfully acquired.
[0472] Step S166: If the first position and the second position are obtained, the electronic device determines the first position as the target position.
[0473] Step S167: If the first position and the second position are not obtained, the electronic device determines whether the first position has not been obtained and whether the second position has been obtained.
[0474] In step S168, if the first position is not obtained, the second position is obtained, and the electronic device determines the second position as the target position.
[0475] Step S169: If the first position is obtained but the second position is not obtained, the electronic device determines the first position as the target position.
[0476] In step S170, the electronic device determines whether it has obtained the first cell identifier / second cell identifier of the electronic device.
[0477] Step S171: If the first cell identifier / second cell identifier of the electronic device is obtained, the electronic device determines the target location of the electronic device based on the first cell identifier.
[0478] Step S172: If the first cell identifier / second cell identifier of the electronic device is not obtained, the electronic device displays a first interface prompting the user to change the orientation of the electronic device, and then proceeds to step S173.
[0479] In step S173, when the orientation of the electronic device is changed based on the prompt text box, the electronic device reacquires satellite signals and then obtains the target position of the electronic device.
[0480] Step S174: If the first position is not successfully acquired, or if neither the first nor the second position is acquired, the electronic device performs a second click operation to determine whether the second position is successfully acquired.
[0481] Step S175: If the second position is successfully acquired, the electronic device determines the second position as the target position.
[0482] Step S176: If the second location acquisition fails, the electronic device determines whether it has acquired the first cell identifier / second cell identifier of the electronic device.
[0483] Step S177: If the first cell identifier / second cell identifier of the electronic device is obtained, the electronic device determines the target location of the electronic device based on the first cell identifier.
[0484] Step S178: If the first cell identifier / second cell identifier of the electronic device is not obtained, the electronic device displays a first interface to prompt the user to change the orientation of the electronic device, and then proceeds to step S179.
[0485] In step S179, when the orientation of the electronic device is changed based on the prompt text box, the electronic device reacquires satellite signals and then obtains the target position of the electronic device.
[0486] In summary, due to timer malfunction, when the electronic device cannot obtain its first location, it can determine its target location based on its second location; when the electronic device cannot obtain its second location, it can determine its target location based on either its first or second cell location; when the electronic device cannot obtain its first or second cell location, it can prompt the user to change the device's orientation on the first interface, and further reacquire satellite signals to locate the electronic device, ensuring the normal operation of subsequent satellite services and improving the user experience.
[0487] Figure 17 This is the ninth flowchart of a satellite positioning method provided in the embodiments of this application.
[0488] Combination Figure 17 As shown, the satellite positioning method provided in this application embodiment may include the following steps:
[0489] In step S071, the electronic device, in response to receiving a satellite signal, determines whether it has acquired the first position of the electronic device.
[0490] The first position is the current position of the electronic device.
[0491] Step S072: If the electronic device has not acquired the first position, determine whether the electronic device has acquired the second position.
[0492] The second position is the target historical position pre-stored by the electronic device.
[0493] In step S073, the electronic device determines the second location as the target location after acquiring the second location.
[0494] In this embodiment, the above method further includes:
[0495] After determining whether the second location of the electronic device has been obtained, the following steps are also included:
[0496] If the second location is not obtained, determine whether the first cell identifier / second cell identifier of the electronic device has been obtained. The first cell identifier is the target historical cell identifier pre-stored by the electronic device; the second cell identifier is the current cell identifier obtained by the electronic device.
[0497] Once the first cell identifier is obtained, the target location of the electronic device is determined based on the first cell identifier.
[0498] After determining whether the first cell identifier of the electronic device has been obtained, the process also includes:
[0499] If the first cell identifier is not obtained, the first interface is displayed. The first interface includes a prompt text box, which is used to prompt the user to change the location of the electronic device.
[0500] Reacquire satellite signals if the orientation of the electronic device is changed based on the prompt text box.
[0501] In summary, due to timer malfunction, when the electronic device cannot obtain its first location, it can determine its target location based on its second location; when the electronic device cannot obtain its second location, it can determine its target location based on either its first or second cell location; when the electronic device cannot obtain its first or second cell location, it can prompt the user to change the device's orientation on the first interface, and further reacquire satellite signals to locate the electronic device, ensuring the normal operation of subsequent satellite services and improving the user experience.
[0502] This application provides an electronic device that may include a display screen (such as a touchscreen or a non-touchscreen), a memory, and one or more processors. The display screen, memory, and processors are coupled. The memory stores computer program code, which includes computer instructions. When the processor executes the computer instructions, the electronic device can perform various functions or steps performed by the electronic device in the above method embodiments. The structure of the electronic device can be referred to... Figure 2 The structure of the electronic device shown.
[0503] Figure 18 This application provides a structural block diagram of a chip system.
[0504] This application also provides a chip system 1800, such as... Figure 18 As shown, the chip system includes at least one processor 1801 and at least one interface circuit 1802. The processor 1801 and the interface circuit 1802 are interconnected via lines. For example, the interface circuit 1802 can be used to receive signals from other devices (e.g., the memory of an electronic device). As another example, the interface circuit 1802 can be used to send signals to other devices (e.g., the processor 1801 or the touchscreen of an electronic device). Exemplarily, the interface circuit 1802 can read instructions stored in the memory and send those instructions to the processor 1801. When the instructions are executed by the processor 1801, the electronic device can perform the steps described in the above embodiments. Of course, the chip system may also include other discrete components, which are not specifically limited in this application embodiment.
[0505] This application also provides a computer storage medium that includes computer instructions. When the computer instructions are executed on the electronic device, the electronic device performs various functions or steps performed by the electronic device in the above method embodiments.
[0506] This application also provides a computer program product that, when run on a computer, causes the computer to perform various functions or steps performed by the electronic device in the above method embodiments.
[0507] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0508] It is readily understood that, based on the several embodiments provided in this application, those skilled in the art can combine, split, or reorganize the embodiments of this application to obtain other embodiments, none of which exceed the protection scope of this application.
[0509] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0510] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0511] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0512] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks. It should be noted that those skilled in the art, after considering the specification and practicing the application disclosed herein, will readily conceive of other embodiments of this application. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary technical means in the art not disclosed in this application. The description and examples are to be considered exemplary only, and the true scope of this application is indicated by the claims.
[0513] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A satellite positioning method, characterized by, The method is applied to an electronic device, and comprises: In response to the electronic device receiving a satellite signal, determining whether a first position of the electronic device is acquired, the first position being a current position of the electronic device; In a case where the first position is not acquired, determining whether a second position of the electronic device is acquired, the second position being a target historical position of the electronic device pre-stored; In a case where the second position is acquired, determining that the second position is a target position.
2. The positioning method according to claim 1, characterized in that, After the determination whether the second position of the electronic device is acquired, the method further comprises: In a case where the second position is not acquired, determining whether a first cell identifier of the electronic device is acquired, the first cell identifier being a target historical cell identifier pre-stored by the electronic device; In a case where the first cell identifier is acquired, determining the target position of the electronic device based on the first cell identifier.
3. The positioning method of claim 1, wherein, After the determination whether the second position of the electronic device is acquired, the method further comprises: In a case where the second position is not acquired, determining whether a second cell identifier of the electronic device is acquired, the second cell identifier being a current cell identifier acquired by the electronic device; In a case where the second cell identifier is acquired, determining the target position of the electronic device based on the second cell identifier.
4. The positioning method of claim 1, wherein, After the determination that the second position is the target position in a case where the second position is acquired, the method further comprises: In a first preset frequency, in response to the electronic device receiving a satellite signal, determining whether the first position of the electronic device is re-acquired; In a case where the first position is acquired, determining that the first position is the target position.
5. The positioning method of claim 2, wherein, The acquisition of the first cell identifier of the electronic device in a case where the second position is not acquired comprises: In a case where the second position is not acquired, acquiring at least one historical cell identifier pre-stored by the electronic device, each of the historical cell identifiers having a corresponding first time point; Determining a first target time point from the first time points, the first target time point being greater than the first time point of a first preset threshold and smaller than the first time point of a second preset threshold; Determining the historical cell identifier corresponding to the first target time point as the first cell identifier.
6. The positioning method of claim 2, wherein, The determination of the target position of the electronic device based on the first cell identifier in a case where the first cell identifier is acquired comprises: Acquiring a first cell position corresponding to the first cell identifier based on a relationship table stored on the electronic device, the relationship table comprising at least one cell identifier and at least one cell position, wherein each of the cell identifiers has a corresponding cell position; and the cell identifiers comprise the first cell identifier; Determining the target position of the electronic device based on the first cell position.
7. The positioning method of claim 2, wherein, After the determination whether the first cell identifier of the electronic device is acquired, the method further comprises: In the case where the first cell identifier is not acquired, a first interface is displayed, the first interface comprising a prompt text box for prompting a user to change an orientation of the electronic device; In the case where the orientation of the electronic device is changed based on the prompt text box, the satellite signal is re-acquired.
8. The positioning method of claim 1, wherein, The method further comprises, after determining whether the first position of the electronic device is acquired in response to the electronic device receiving the satellite signal: In the case where the first position is acquired, storing the first position as a historical position.
9. The positioning method according to claim 8, characterized in that, The method further comprises, in the case where the first position is not acquired: In the case where the first position is not acquired, acquiring at least one historical position of the electronic device that is stored in advance, each of the historical positions having a corresponding second time point; Determining a second target time point from the second time points, the second target time point being greater than a third preset threshold of the second time points and being less than a fourth preset threshold of the second time points; Determining the historical position corresponding to the second target time point as the second position.
10. The positioning method according to claim 9, characterized in that, The method further comprises, in response to the electronic device receiving the satellite signal, determining that the first position of the electronic device is acquired: Receiving the satellite signal transmitted by a satellite; Based on the satellite signal, determining a pseudo-range from the satellite to the electronic device and ephemeris data of the satellite; Based on the ephemeris data and the pseudo-range, determining the first position of the electronic device.
11. The method of claim 8, wherein, The method further comprises, after storing the first position as a historical position in the case where the first position is acquired: Based on a first trigger condition, acquiring a third position of the electronic device, the third position being an updated current position of the electronic device; the first trigger condition being determined based on an operation of the user to update the position; In the case where the third position of the electronic device is acquired, storing the third position as the historical position.
12. The method of claim 11, wherein, The first trigger condition further comprises at least one of a second preset frequency and a preset satellite signal strength.
13. The method of claim 1, wherein, The method further comprises, in response to the electronic device receiving the satellite signal, acquiring the first position of the electronic device: A satellite application software development kit (SDK) in an application layer of the electronic device responds to a first click operation of a user on a satellite communication application, the satellite communication application software development kit (SDK) sending a request to locate the electronic device to a satellite communication service in an application framework layer of the electronic device; The satellite communication service sends a request to locate the electronic device to a satellite communication module in a hardware abstraction (HAL) layer of the electronic device; In response to the request to locate the electronic device, the satellite communication module sends a first data request to a satellite antenna service in the application framework layer, the first data request being used to request to acquire the satellite signal transmitted by a satellite; The satellite antenna service invokes a satellite antenna HAL in the HAL layer to send the first data request to a satellite antenna driving module in a driving layer of the electronic device; In response to the first data request, the satellite antenna driving module drives a satellite antenna of a hardware layer of the electronic device to acquire the satellite signal transmitted by a satellite; The satellite antenna sends the satellite signal to a satellite communication receiver of the hardware layer; A satellite communication receiving driving module in a kernel layer of the electronic device acquires the satellite signal from the satellite communication receiver; The satellite communication receiving driving module sends the satellite signal to the satellite communication module; The satellite communication module determines the first position of the electronic device based on the satellite signal.
14. The method of claim 13, wherein, in the case that the first position is not acquired, a second position of the electronic device is acquired, comprising: In the case that the first position is not acquired, the satellite communication module sends a second data request to a storage service in the application framework layer, the second data request being used to request the second position of the electronic device; The storage service invokes a storage HAL in the HAL layer to send the second data request to a storage driving module in a kernel layer; In response to the second data request, the storage driving module acquires the second position of the electronic device from a storage in a hardware layer; The driving module sends the second position of the electronic device to the storage HAL; The storage HAL sends the second position of the electronic device to the storage service; and the satellite communication module acquires the second position of the electronic device from the storage service. An electronic device, comprising:
15. An electronic device, comprising: a display screen, a storage, and one or more processors; the display screen, the storage, and the processors are coupled; wherein the storage has computer program code stored therein, the computer program code comprising computer instructions, when the computer instructions are executed by the processors, causing the electronic device to perform the satellite positioning method according to any one of claims 1-14. computer instructions, when the computer instructions are run on an electronic device, causing the electronic device to perform the satellite positioning method according to any one of claims 1-14.
16. A computer-readable storage medium, characterized in that, computer instructions, when the computer program product is run on a computer, causing the computer to perform the satellite positioning method according to any one of claims 1-14.
17. A computer program product, characterised in that,