Android platform Beidou high-precision positioning control system
By designing a combination of data exchange layer, system framework layer, hardware adaptation layer and Beidou module on the Android platform, the problem of the Beidou positioning system on the Android platform being incompatible with multiple differential service providers and being unable to effectively transmit differential data has been solved, achieving high-level Accurate, low-cost Beidou positioning service.
Patent Information
- Application Number
- CN202210410955.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-19
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-04-19
AI Technical Summary
The existing Beidou positioning system on the Android platform is not compatible with multiple high-precision differential data providers, and cannot effectively utilize existing data channels to transmit the differential correction information required by external Beidou modules, making it unable to meet the high-precision positioning needs of industry users.
A Beidou high-precision positioning control system for the Android platform is designed, including a data exchange layer, a system framework layer, a hardware adaptation layer and a Beidou module. Differential data is exchanged with the server through the data exchange layer, and the system framework layer parses and delivers the differential data. The hardware adaptation layer implements serial communication of differential data, and the driver layer is connected to the Beidou module to achieve high-precision positioning.
It is compatible with the access of multiple high-precision differential service providers, provides a wider range of service options, and can use system-level Beidou high-precision location services without secondary development. It has high positioning accuracy, low cost, and high processing efficiency.
Smart Images

Figure CN114814913B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of navigation and positioning technology, and in particular to an Android platform Beidou high-precision positioning control system. Background Art
[0002] Android is a free and open operating system based on Linux, mainly used in mobile devices such as smartphones and tablets. It has become the largest mobile software platform. In recent years, industry terminals based on the Android system have increasingly served government departments and important areas of the national economy such as petrochemicals, coal, water conservancy, electricity, railways, highways, and aviation. With the construction and development of my country's Beidou satellite navigation system, the Beidou system is increasingly used for positioning and navigation in agriculture, transportation, marine fisheries, hydrological monitoring, weather forecasting, surveying and mapping geographic information, forest fire prevention, communication systems, power dispatching, disaster relief and mitigation, emergency search and rescue, and other fields, and the accuracy requirements for location services are also getting higher and higher. Affected by factors such as the atmosphere, multipath effects, the number and geometric distribution of visible satellites, satellite clock errors, satellite orbit errors, and human interference, the accuracy of ordinary civilian positioning services can only reach about 10 meters, which cannot meet the requirements of industry users. The ground-based augmentation system uses differential technology to achieve high-precision positioning, uses multiple receivers for synchronous observation, uses the known precise position of the reference station, and eliminates the influence of some interference factors by making single or double differences between the observation values, thereby achieving the purpose of improving positioning accuracy.
[0003] In order to obtain differential data in a timely and accurate manner, the mobile terminal needs to send its own location information data to the data center of the differential service provider through the wireless network in real time. The data center generates the user's differential correction information based on the user's request and sends the differential correction information to the mobile terminal. The service provider needs to authenticate the user's identity before providing business data, and the authentication method of each service provider is different. In addition, there are different requirements in terms of the format of receiving user location information. As a general industry terminal, it needs to be compatible with and support the services provided by multiple high-precision differential service providers to provide industry users with a variety of choices. This is a technical problem that needs to be solved.
[0004] The mobile terminal receives the differential data from the service provider, which needs to be forwarded by the system architecture layer, hardware adaptation layer and driver layer, and finally sent to the Beidou module through serial communication. There is already a native GPS data transmission mechanism in the Android platform. How to use the existing data channel to transmit the differential correction information required by the external Beidou module to improve the utilization rate is a key technical problem that mobile terminals need to solve. Summary of the invention
[0005] The object of the present invention is to solve at least one of the technical drawbacks.
[0006] To this end, an object of the present invention is to propose an Android platform Beidou high-precision positioning control system to solve the problems mentioned in the background technology and overcome the deficiencies in the prior art.
[0007] In order to achieve the above-mentioned purpose, an embodiment of one aspect of the present invention provides a Beidou high-precision positioning control system for an Android platform, including a data exchange layer, a system framework layer, a hardware adaptation layer, a driver layer and a Beidou module; the data exchange layer is connected to the system framework layer, the system framework layer is connected to the hardware adaptation layer, the hardware adaptation layer is connected to the driver layer, and the driver layer is connected to the Beidou module.
[0008] The data exchange layer is used to exchange differential data with the server. The system framework layer is used to receive the broadcast from the data exchange layer, parse the differential data, and send it to the hardware adaptation layer. The hardware adaptation layer is used to receive the differential data from the system framework layer and send the data down. The driver layer is used to send and receive data between the system and the Beidou module.
[0009] The data exchange layer includes an account configuration module, a server interaction module, a location information collection module and a differential data sending module; the account configuration module is used to configure the information in the management server; the location information collection module is used to collect the current location information; the server interaction module is used to control the information interaction between the system and the server; the differential data sending module is used to receive the differential data received by the server interaction module and send the differential data to the system framework layer.
[0010] Preferably, the account configuration module is used to configure the server's IP address, management port information, mount point information, user account and password information.
[0011] In any of the above solutions, preferably, the server interaction module is used to control the connection and disconnection between the system and the server and the account information authentication, regularly send local positioning information to the server, and receive the differential data responded by the server in real time.
[0012] In any of the above solutions, preferably, the server interaction module includes a system service unit, a task management unit and an Ntrip component.
[0013] In any of the above solutions, preferably, the system service unit is used to receive system broadcasts and instantiate task management to perform process control.
[0014] In any of the above schemes, it is preferred that the task management unit is used to control the business process, detect the system location service switch, external Beidou switch, high-precision setting switch and network connection status, apply for and release the system wake-up lock, register and unregister the location update listener, Nmea listener and location service status change listener through the system location service manager, manage the receiving account of differential data and send GGA location information data to the server through the NTrip component.
[0015] In any of the above solutions, preferably, the Ntrip component includes a NTrip management unit 14, a NTrip setting unit and a Ntrip interaction unit.
[0016] The NTrip management unit 14 is used to manage the differential data receiving account, run the NTrip interaction unit through the asynchronous task mechanism, and regularly send the GGA location information to the server.
[0017] The NTrip setting unit is used to manage data of different service providers and differentiate account and authentication information.
[0018] The NTrip interaction unit is used for data interaction with the server and controls the business process through the state machine.
[0019] In any of the above solutions, preferably, the NTrip interaction unit includes the following process:
[0020] First, connect to the server and use the server IP address and port of the account configuration module. At this time, the status is connecting to the server. When the server is connected successfully, the status changes to successfully connected to the server.
[0021] Secondly, use the account, password and mount point information of the account configuration module to generate different authentication information according to different service provider account settings and send it to the server. At this time, the status is unauthenticated. If the server returns data containing authentication success information, it means that the authentication is successful. At this time, the status changes to authentication success.
[0022] Secondly, send the GGA position information to the server, and finally, receive the differential data.
[0023] In any of the above schemes, preferably, when the NTrip interaction unit sends GGA position information to the server, it removes blank characters and line breaks from the head and tail of the collected NMEA sentences, adds a line break and sends it to the server, and controls the frequency of sending data to the server to be at least one second.
[0024] In any of the above schemes, it is preferred that the hardware adaptation layer includes an abstract interface, a service interface and a module interface, the abstract interface is used to define the differential data interface, the service interface is used for data conversion and calling the module interface, and the module interface is used for serial port writing to realize the differential data sending task.
[0025] In any of the above schemes, preferably, the differential data sending module includes: first, defining the system broadcast, second, setting the differential data carried by the broadcast, third, setting the length of the differential data carried by the broadcast, and finally, sending the system broadcast.
[0026] In any of the above solutions, preferably, the system framework layer includes: first receiving the differential data, secondly extracting the differential data length, and finally sending the differential data to the hardware adaptation layer.
[0027] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0028] 1. The present invention provides an Android platform Beidou high-precision positioning control system that is compatible with and supports access by multiple high-precision differential data providers, providing customers with more service provider options. There is no need to integrate a high-precision service provider SDK, and third-party applications can use the system-level Beidou high-precision location service without secondary development, with good compatibility and high positioning accuracy.
[0029] 2. In the present invention, an Android platform Beidou high-precision positioning control system, the server interaction module runs in the data exchange layer service, and the background startup is triggered by system startup, mobile data network changes, system time changes, etc. After single-point positioning, it automatically connects to the server for user authentication and data transmission and reception, with high processing efficiency.
[0030] 3. Based on the original positioning data transmission mechanism of the Android platform, an interface for sending differential data of the external Beidou module is added to the system framework layer and hardware adaptation layer, which is low-cost.
[0031] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0033] Figure 1 A flowchart of a Beidou high-precision positioning control system on an Android platform according to an embodiment of the present invention;
[0034] Figure 2According to an embodiment of the present invention, an Android platform Beidou high-precision positioning control system data Figure 1 The data exchange layer structure diagram shown in;
[0035] Figure 3 A Beidou high-precision positioning control system for an Android platform according to an embodiment of the present invention Figure 2 The server interaction module structure diagram shown in;
[0036] Figure 4 It is a structural diagram of the interaction between the NTrip component and the server in a Beidou high-precision positioning control system on an Android platform according to an embodiment of the present invention;
[0037] Figure 5 A satellite image of a driving trajectory of a winding bridge on a highway according to an embodiment of the present invention;
[0038] Figure 6 A satellite image of a driving trajectory on a highway ramp according to an embodiment of the present invention;
[0039] Figure 7 A satellite image of the driving trajectory of Jianting Bridge on the highway according to an embodiment of the present invention;
[0040] Figure 8 A satellite image of the driving trajectory of driving out of the expressway from Xiaoniufang Bridge according to an embodiment of the present invention;
[0041] Fig. 9 A satellite image of the driving trajectory of Xiaoniufang Bridge entering the expressway according to an embodiment of the present invention;
[0042] Fig.10 A satellite image of the driving trajectory of the auxiliary road entrance and exit according to an embodiment of the present invention;
[0043] Fig.11 A satellite image of the driving trajectory of the right-turn lane according to an embodiment of the present invention;
[0044] Fig.12 A satellite image of the driving trajectory of the left-turn lane according to an embodiment of the present invention;
[0045] Fig.13 A satellite image of a driving trajectory into a gate according to an embodiment of the present invention;
[0046] Fig.14 A satellite image of a driving trajectory on a severely congested road section according to an embodiment of the present invention;
[0047] Fig.15 A satellite image of a narrow road comparison driving trajectory according to an embodiment of the present invention;
[0048] Fig.16A satellite image of the driving trajectory of Beiqing Road according to an embodiment of the present invention;
[0049] Fig.17 A satellite image of the U-turn trajectory of the G7 Expressway south of Jianting Bridge on the North Fifth Ring Road according to an embodiment of the present invention;
[0050] Fig.18 This is a satellite image of the driving trajectory of Minzuyuan West Road according to an embodiment of the present invention. DETAILED DESCRIPTION
[0051] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0052] like Figure 1 , Figure 2 As shown, an Android platform Beidou high-precision positioning control system according to an embodiment of the present invention includes a data exchange layer 1, a system framework layer 2, a hardware adaptation layer 3, a driver layer 4 and a Beidou module 5; the data exchange layer 1 is connected to the system framework layer 2, the system framework layer 2 is connected to the hardware adaptation layer 3, the hardware adaptation layer 3 is connected to the driver layer 4, and the driver layer 4 is connected to the Beidou module 5;
[0053] The data exchange layer 1 is used to exchange differential data with the server 6, the system framework layer 2 is used to receive the broadcast issued by the data exchange layer 1, parse the differential data, and send it to the hardware adaptation layer 3; the hardware adaptation layer 3 is used to receive the differential data of the system framework layer 2 and send the data down; the driver layer 4 is used to send and receive data between the system and the Beidou module 5.
[0054] The data exchange layer 1 includes an account configuration module 10, a server interaction module 8, a location information collection module 7 and a differential data sending module 9; the account configuration module 10 is used to configure the information in the management server 6; the location information collection module 7 is used to collect current location information; the server interaction module 8 is used to control the information interaction between the system and the server 6; the differential data sending module 9 is used to receive the differential data received by the server interaction module 8 and send the differential data to the system framework layer 2.
[0055] The server interaction module 8 is respectively connected with the location information acquisition module 7, the differential data sending module 9 and the account configuration module 10. The location information acquisition module 7 sends the location information to the server interaction module 8, the server interaction module 8 then sends the location information to the server 6, the server 6 sends the differential data to the server interaction module 8, and the server interaction module 8 then sends the differential data to the differential data sending module 9.
[0056] An Android platform Beidou high-precision positioning control system according to an embodiment of the present invention implements Beidou high-precision positioning services on the Android platform, integrates all functions such as account management, location information collection, server 6 authentication and data transmission, and differential data is sent to an external Beidou positioning module, has good compatibility and high positioning accuracy, and can meet the needs of different users.
[0057] Specifically, the account configuration module 10 is used to configure the IP address of the server 6, manage the port information, mount point information, personal user account and password information, and provide information input, modification and storage functions. The results are saved in the user space and used for the server interaction module 8 to connect to the server 6 and account authentication.
[0058] Specifically, the server interaction module 8 is used to provide key functions such as server 6 connection, user authentication, location information transmission and differential data reception. When the system is turned on, the network connection status changes, the system time changes, etc., the business process is automatically completed according to the status of the location information service switch and the external Beidou module 5 switch and the current positioning information. The location information acquisition module 7 is used to obtain the current positioning information, and the differential data sending module 9 sends the differential data received from the server 6 to the system framework layer 2. After the Beidou module 5 solves the high-precision result, it automatically updates the reported result.
[0059] The location information collection module 7 is responsible for collecting local location information. By registering Nmea monitoring, Nmea sentence information can be obtained, and specific beginning sentences can be filtered out. Specifically, the sentences starting with $GNGGA, "$BDGGA or $GPGGA are filtered out, and the sentence content is analyzed. It is determined whether the positioning has been successful based on the positioning quality value. If the positioning quality is 0, it means that the positioning is not successful and GGA data is not sent; if the positioning quality is greater than 0, it means that the positioning is successful, and the business process is started through NTrip management. The collected GGA data must be frequency-limited, and it is controlled not to be collected within one second, that is, the frequency is at intervals of one second.
[0060] Furthermore, the server interaction module 8 is used to control the connection and disconnection between the terminal and the server, account information authentication, regularly send local positioning information to the server 6, and receive differential data responded by the server 6 in real time.
[0061] like Figure 3 As shown, the server interaction module 8 includes a system service unit 11, a task management unit 12 and an Ntrip component 13;
[0062] The system service unit 11 is used to perform process control of task management; the system service unit 11 is the basis of the entire server interaction module 8, keeps the background running, and instantiates task management to perform process control.
[0063] The system service unit 11 receives the system broadcast and starts the system service; when the system is turned on, the network connection status changes, the system date and time changes, the location information service switch is turned on / off, the external Beidou module 5 is turned on / off, etc., the system service unit 11 will receive the system broadcast.
[0064] The task management unit 12 is used to control the business process, including detecting the system location service switch, external Beidou switch, high-precision setting switch and network connection status, applying for and releasing the system wake-up lock, registering and canceling the location update listener, Nmea listener and location service status change listener through the system location service manager, managing the differential data receiving account through the NTrip component 13, registering and canceling the differential data receiving account, and sending GGA location information data to the server.
[0065] Specifically, the Ntrip component 13 includes an NTrip management unit 14, an NTrip setting unit 15, and an Ntrip interaction unit 16;
[0066] The NTrip management unit 14 is used to manage the differential data receiving account, register and cancel the differential data receiving account, run the NTrip unit through the asynchronous task mechanism, and regularly send the GGA location information to the server;
[0067] The NTrip setting unit 15 is used to manage data of different service providers and differentiate the management accounts and authentication information.
[0068] For StarCart server, User-Agent needs to include: NTRIP StarCart Android-SDK / 1.0.
[0069] For Qianxun location server, User-Agent needs to include: NTRIP_QX TRACK_random number, and the SDK type must be set to ANDROID_RTCM_SDK and the SDK version number must be 2.1.5.
[0070] Further, such as Figure 4 As shown, the NTrip interaction unit 16 is used for data interaction with the server and controls the business process through a state machine. The specific states are as follows:
[0071] NTRIP_STATUS_NONE: Indicates no status, that is, in idle state.
[0072] NTRIP_AUTHORIZED: indicates that the account authentication is passed and GGA location information can be sent to the server.
[0073] NTRIP_UNAUTHORIZED: indicates that the user is not authenticated or authentication failed, the account has expired, or the account or password is incorrect.
[0074] NTRIP_CONNECTING: Indicates that the device is connecting to the server, has initiated a connection request to the server, and is waiting for the server to respond.
[0075] NTRIP_CONNECTED: Indicates that the device is connected to the server and can send authentication information to the server.
[0076] NTRIP_DISCONNECTED: Indicates that the connection has been disconnected and needs to be reconnected.
[0077] The specific data interaction process includes: first, connecting to the server, using the server IP address and port of the account configuration module 10, the state is now connecting to the server (NTRIP_CONNECTING), when the server connection is successful, the state becomes successfully connected to the server (NTRIP_CONNECTED).
[0078] Secondly, user authentication is performed, and the account, password and mount point information of the account configuration module 10 are used to generate different authentication information according to different service provider account settings and send it to the server. At this time, the status is unauthenticated (NTRIP_UNAUTHORIZED). If the server return data contains information about successful authentication, the successful authentication information is marked as "200OK". When it contains "200OK" information, it means that the authentication is successful. At this time, the status is changed to successful authentication (NTRIP_AUTHORIZED).
[0079] Secondly, send GGA position information to the server. Finally, receive differential data. After receiving the differential data from the server, directly call the onRtcmDatachanged interface function.
[0080] Specifically, when sending the GGA position information to the server, the blank characters and line breaks are removed from the head and tail of the collected NMEA sentences, and a line break is added and sent to the server, and the frequency of sending data to the server is controlled to be at least one second.
[0081] Send GGA location information to the server. Different Android platforms handle the end character of NMEA sentences differently. To ensure that the sentence sent to the server contains only one line break, it is necessary to remove the blank characters and line breaks at the head and tail of the collected NMEA sentences, and then add a line break before sending it to the server. This can avoid the problem of not being able to receive the server differential data. In addition, it is necessary to control the frequency of sending data to the server. Generally, it is controlled not to send within one second, that is, the frequency of sending data to the server is controlled to be at least one second interval. The server is specifically a differential server. The optional Beidou module 5 adopts the model MXT906A positioning module or the MXT906B positioning module. For Android7 and above platforms, according to the needs of new functions, add SELinux system permission configuration.
[0082] The differential data sending module is responsible for receiving the differential data received by the server interaction module and sending the differential data to the system framework layer (Framework) through system broadcast. The specific steps are as follows:
[0083] First, define the system broadcast, the action name is ACTION_SET_DGNSS, and the specific definition is as follows:
[0084] Intent intent=new Intent(Constants.ACTION_SET_DGNSS);
[0085] Secondly, set the differential data carried by the broadcast. The specific format is as follows:
[0086] intent.putExtra("dgnss-data",rtcmData.getBuffer());
[0087] Secondly, set the length of the differential data carried by the broadcast. The specific format is as follows:
[0088] intent.putExtra("dgnss-len",rtcmData.getBuffer().length);
[0089] Finally, send a system broadcast. The specific format is as follows:
[0090] mContext.sendBroadcast(intent).
[0091] The system framework layer (Framework) receives the broadcast in the Android system's location service provider (GnssLocationProvider), parses the differential data, and if the differential data is not empty, calls the local function SendBeiDouDgnss and sends it to the Java local interface, that is, the implementation of the JNI function. The specific steps are as follows:
[0092] First, differential data is received.
[0093] Next, extract the length of the differential data.
[0094] Secondly, determine whether the differential data is a null value. If it is not a null value, call the SendBeiDouDgnss function in the Android system to send the differential data to the Java local interface, that is, the JIN function implementation.
[0095] The function of sending the differential data to the Java native interface (JNI) includes: determining whether the differential data is a null value, or whether the differential data length is less than zero; if the split data is not a null value, or the differential data length is greater than zero, calling the native function native_set_dgnss to send the differential data to the Java native interface, i.e., the JIN function implementation; if the differential data is a null value, or the differential data is less than zero, executing the function and returning.
[0096] Specifically, the Java and C++ interface function conversion processing is performed in the system framework layer to facilitate function processing within the Android system, specifically:
[0097] First, add the differential data interface function android_location_GnssLocationProvider_set_dgnss in the com_android_server_location_GnssLocationProvider.cpp file of the Android system.
[0098] Finally, the native function native_set_dgnss is mapped as:
[0099] android_location_GnssLocationProvider_set_dgnss, the specific format is as follows:
[0100] {"native_set_dgnss","([BI)I",reinterpret_cast<void*> (android_location_Gnss LocationProvider_set_dgnss)}.
[0101] Specifically, the specific implementation process of the JNI function is: First, define the function in the following format:
[0102] static jint android_location_GnssLocationProvider_set_dgnss(JNIEnv*env,jobject obj,jbyteArray dgnss,jint length).
[0103] Secondly, determine whether the mGnssDttSetDgnss function pointer definition is a null value. If it is not null, execute the next step. If it is null, return.
[0104] Secondly, perform differential data pointer conversion to convert Java type data into JNI data type jbyte.
[0105] Secondly, execute the setDgnssData function in the Android system to send the differential data to the hardware adaptation layer:
[0106] Finally, the memory is released.
[0107] Furthermore, the hardware adaptation layer implements the differential data delivery task by a three-layer structure of abstract interface, service interface and module interface.
[0108] The abstract interface is used to define the function of sending differential data interface setDgnssData. A new interface file IGnssDttSetDgnss.hal is added, which is specifically used to define the function of sending differential data interface setDgnssData, including:
[0109] First, define the setDgnssData function. One parameter is a string type for passing differential data, and the other is a 32-bit integer type for passing the differential data length.
[0110] Secondly, in the IMtkGnss interface in the existing IMtkGnss.hal file in the Android system, add a get function getExtensionGnssDttSetDgnss.
[0111] Finally, perform software compilation configuration. In the Android.bp file, add IGnssDttSetDgnss.hal to the srcs field of hidl_interface, so that the newly added differential data interface file IGnssDttSetDgnss.hal can participate in system compilation.
[0112] Specifically, the service interface is used for data conversion and calling module interfaces, including:
[0113] First, add the class definition file GnssDttSetDgnss.h, define the GnssDttSetDgnss class, which inherits the IGnssDttSetDgnss interface. In the class definition, declare the function setDgnssData for sending differential data and declare a private interface pointer mGnssDgnssIface.
[0114] Secondly, add the class implementation file GnssDttSetDgnss.cpp to implement the setDgnssData function, with the input parameters being the differential data and the differential data length.
[0115] Secondly, determine whether the interface pointer is null. If it is not null, create a new memory with the same length as the differential data.
[0116] Secondly, obtain the differential data memory address.
[0117] Second, copy the differential data to the new memory.
[0118] Secondly, call the set_dgnss function to send the differential data to the module interface.
[0119] Finally, the memory is released.
[0120] In the existing MtkGnss.cpp file of the Android system, the get function of the interface is provided
[0121] getExtensionGnssDttSetDgnss, implements data transmission, including:
[0122] First, determine whether the Beidou interface function pointer is a null value. If it is not null, execute the next step. If it is null, execute and return.
[0123] Secondly, determine whether the differential data sending function interface is a null value. If it is null, specify the parameter DTT_BEIDOU_DGNSS_INTERFACE through the get_extension function to obtain the differential data sending function interface.
[0124] Finally, determine whether the differential data sending function interface is a null value. If it is null, return; otherwise, generate a differential data sending function object through the differential data sending function interface.
[0125] Furthermore, the module interface is used for serial port writing to implement the differential data sending task, including:
[0126] First, in locBD.c of the Android system, initialize the differential data sending interface structure sDttSetDgnssInterface, including the structure size, initialization function loc_dgnss_init and differential data sending function pointer loc_set_dgnss_data.
[0127] Secondly, send differential data to the module through the functions loc_set_dgnss_data and send_dgnss_command:
[0128] Secondly, the differential data delivery implementation function loc_set_dgnss_data has two input parameters, the differential data of unsigned character pointer and the differential data length of integer type.
[0129] Secondly, determine whether the differential data is a null value, and at the same time determine whether the differential data length is less than the specified length. If it meets the requirements, execute the next step, and if it does not meet the requirements, return directly.
[0130] Secondly, determine whether the differential data length is greater than the specified size. If it exceeds the specified data length, modify the length to the specified data length.
[0131] Secondly, initialize the local differential data structure variable and clear all its member data to zero.
[0132] Secondly, the differential data is copied to the data member variable of the local differential data structure, whose length is the differential data length.
[0133] Secondly, fill the end of the differential data with the terminators '\r' and '\n'.
[0134] Secondly, increase the local differential data structure length variable value by 2.
[0135] Secondly, the local difference structure new data flag variable is set to 1.
[0136] Finally, the differential data command function send_dgnss_command is called to send the differential data to the driver layer.
[0137] The function for sending differential data command is defined as static void send_dgnss_command(void), which includes:
[0138] First, determine whether the local differential data new flag is "1". If it is "1", execute the next step; if not, return. Finally, write the differential data to the driver layer through the socket write function, specifying the timeout and retry conditions.
[0139] Furthermore, the driver layer uses the predefined serial port ttyS1 to realize the sending and receiving of serial port data between the Android system and the Beidou module. The specific definition is as follows:
[0140] #define BD_TTY_DEVICE_NAME "ttyS1"
[0141] #define GPS_POWER_NAME " / sys / aeon_mode / aeon_mode"
[0142] #define MODULE_MODE_PARA "persist.sys.outside_mode"
[0143] The working principle of the present invention is as follows: a differential server is arranged within an environment range for implementing positioning, a data exchange layer performs connection authentication with the differential server, after the connection authentication is successful, the data exchange layer receives differential data from the server, and then sends it to the system framework layer, the system framework layer parses the differential data and sends it to the hardware adaptation layer, the hardware adaptation layer implements serial port conversion and writing of the differential data, sends the differential data to the driver layer, the driver layer sends the differential data to the Beidou module, the Beidou module calculates the position information after correction, and then sends the information to the driver layer, the driver layer feeds back the information to the hardware adaptation layer, the hardware adaptation layer reports the information to the system framework layer, the system framework layer sends the position information to the data exchange layer, the data exchange layer sends the position information to the server, the server sends the differential data again, and so on and so forth, the Beidou module continuously corrects the position information, and thus more accurate positioning information can be obtained.
[0144] As an application of the embodiment of the present invention, tests and comparisons will be performed in combination with specific real-life applications.
[0145] 1. High-precision testing: multiple rounds of road tests were conducted on various complex road conditions such as turning on a winding bridge, entering and exiting a ramp, and narrow roads during driving. By capturing the system log, extracting NMEA location information data, and drawing lines point by point on Google's high-definition satellite map, detailed information points were marked every 10 seconds.
[0146] 1. Driving on a winding bridge, such as Figure 5 As shown, at Shangqing Bridge, the driving trajectory from the G6 Expressway to the North Fifth Ring Road is highly consistent with the ring road shown on the map.
[0147] 2. Take the ramp to Madian Bridge, and take the G6 Expressway from the North Third Ring Road. The driving track is as follows Figure 6 shown.
[0148] 3. Drive from Jianting Bridge and take the North Fifth Ring Road to G7 Expressway. The driving track is as follows Figure 7shown.
[0149] 4. Drive through Xiaoniufang Bridge, exit G7 Expressway, turn left under the bridge and drive onto Beiqing Road. The driving track is as follows Figure 8 shown.
[0150] 5. Drive through Xiaoniufang Bridge, turn right at Beiqing Road and drive onto G7 Expressway. The driving track is as follows Fig. 9 shown.
[0151] 6. Driving at the entrance and exit of the auxiliary road: Drive from the east to the west on Beiqing Road, exit the main road and enter the auxiliary road. Immediately drive from the auxiliary road back to the main road of Beiqing Road. The driving trajectory is as follows: Fig.10 shown.
[0152] 7. Drive in the right-turn lane: At the intersection of Beiqing Road and Yongze North Road, turn right from east to north, and turn right from the Beiqing Road right-turn lane to Beize Road. The driving trajectory is shown in 11.
[0153] 8. Drive in the left-turn lane: At the intersection of Beiqing Road and Yongze North Road, turn left from north to east, and turn left from the left-turn lane of Beize Road to enter Beiqing Road. The driving trajectory is shown in 12.
[0154] 9. Enter the gate: No. 6 Yongjia North Road, keep to the right and follow the path as follows Fig.13 shown.
[0155] 10. Driving on seriously congested roads: Jianting Bridge on the North Fifth Ring Road, the ramp connecting the G7 Expressway and the North Fifth Ring Road, which are seriously congested during the off-get off work hours. The test vehicle drove from north to south in the first lane on the left. The driving trajectory is as follows: Fig.14 shown.
[0156] 2. Use G70 as a comparison machine, place it at the same level as the test machine's onboard antenna, and do not enable the high-precision positioning function on the comparison machine. The red track is the high-precision track of the test machine, and the blue track is not enabled for high-precision.
[0157] 1. Comparison of narrow roads: Fenghui East Road, the test vehicle travels from west to east, and the driving trajectory is as follows Fig.15 As shown, the trajectory of the comparison machine is reversed, where "P" is the positioning trajectory of the common positioning software, and "i" is the positioning trajectory of the present invention. Fig.15 It can be seen that the trajectory marked with “i” has higher positioning accuracy.
[0158] 2. Comparison of entrances and exits of auxiliary roads: Beiqing Road, drive out of the main road from east to west and enter the auxiliary road, and then immediately enter the main road of Beiqing Road from the auxiliary road. The test vehicle always drives to the right. The high-precision results are highly consistent with the route. The driving trajectory is as follows Fig.16 shown.
[0159] 3. Comparison of U-turns on highways: At the U-turn on G7 Highway south of Jianting Bridge on the North Fifth Ring Road, drive in the right lane from north to south, and drive in the first lane on the left after the U-turn. The high-precision results are highly consistent with the route. The driving trajectory is as follows Fig.17 As shown, "P" indicates the positioning track of common positioning software, and "i" indicates the positioning track of the present invention. Fig.17 It can be seen that the trajectory marked with “i” has higher positioning accuracy.
[0160] 4. High-rise building occlusion comparison: Minzuyuan West Road, driving in the first lane from west to east, the high-precision result is highly consistent with the route, the driving trajectory is as follows Fig.18 As shown, the trajectory of the comparison machine is reversed, where "P" is the positioning trajectory of the common positioning software, and "i" is the positioning trajectory of the present invention. Fig.18 It can be seen that the trajectory marked with “i” has higher positioning accuracy.
[0161] Compared with the prior art, the present invention has the following beneficial effects:
[0162] Based on the existing GPS data transmission channel of the Android system, data exchange services are added to the system application layer; corresponding data interfaces are added to the system framework layer, hardware adaptation layer and driver layer for sending differential data to the Beidou positioning module. This saves more space resources and thus saves more costs, with high utilization and high positioning accuracy. It is compatible with services provided by multiple high-precision differential service providers, providing a variety of options for industry users.
[0163] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0164] It is not difficult for those skilled in the art to understand that the present invention includes any combination of the invention content and specific implementation methods of the above specification and the various parts shown in the drawings. Due to the limited space and to make the specification concise, the various schemes composed of these combinations are not described one by one. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
[0165] Although the embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. Those skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention without departing from the principles and purpose of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. An Android platform Beidou high-precision positioning control system, characterized in that: It includes a data exchange layer, a system framework layer, a hardware adaptation layer, a driver layer and a Beidou module; the data exchange layer is connected to the system framework layer, the system framework layer is connected to the hardware adaptation layer, the hardware adaptation layer is connected to the driver layer, and the driver layer is connected to the Beidou module; The data exchange layer is used to exchange differential data with the server, the system framework layer is used to receive the broadcast sent by the data exchange layer, parse the differential data, and send it to the hardware adaptation layer; the hardware adaptation layer is used to receive the differential data of the system framework layer and send the data; the driver layer is used to send and receive data between the system and the Beidou module; The data exchange layer includes an account configuration module, a server interaction module, a location information acquisition module and a differential data delivery module; the account configuration module is used to configure the information in the management server; The location information collection module is used to collect current location information; The server interaction module is used to control the information interaction between the system and the server; the differential data sending module is used to receive the differential data received by the server interaction module and send the differential data to the system framework layer; The server interaction module includes a system service unit, a task management unit and an Ntrip component; The system service unit is used to receive system broadcasts and instantiate task management to perform process control; The task management unit is used to control business processes, detect the system location service switch, external Beidou switch, high-precision setting switch and network connection status, apply for and release the system wake-up lock, register and unregister the location update listener, Nmea listener and location service status change listener through the system location service manager, manage the receiving account of differential data and send GGA location information data to the server through the NTrip component.
2. An Android platform Beidou high-precision positioning control system as claimed in claim 1, characterized in that, The account configuration module is used to configure the server's IP address, management port information, mount point information, user account and password information.
3. An Android platform Beidou high-precision positioning control system as claimed in claim 1, characterized in that, The server interaction module is used to control the connection and disconnection between the system and the server and the account information authentication, regularly send local positioning information to the server, and receive the differential data responded by the server in real time.
4. An Android platform Beidou high-precision positioning control system as claimed in claim 1, characterized in that: The Ntrip component includes an NTrip management unit, an NTrip setting unit and an Ntrip interaction unit; The NTrip management unit is used to manage the differential data receiving account, run the NTrip interaction unit through the asynchronous task mechanism, and regularly send GGA location information to the server; The NTrip setting unit is used to manage data of different service providers and differentiate account and authentication information; The NTrip interaction unit is used for data interaction with the server and controls the business process through the state machine.
5. An Android platform Beidou high-precision positioning control system as claimed in claim 4, characterized in that: The NTrip interaction unit includes the following processes: First, connect to the server, use the server IP address and port of the account configuration module, and the status is now connecting to the server. When the server is successfully connected, the status changes to successfully connected to the server. Secondly, use the account, password and mount point information of the account configuration module to generate different authentication information according to different service provider account settings and send it to the server. At this time, the status is unauthenticated. If the server returns data containing authentication success information, it means that the authentication is successful. At this time, the status changes to authentication success; send GGA location information to the server, and finally, receive differential data.
6. An Android platform Beidou high-precision positioning control system as claimed in claim 5, characterized in that: When the NTrip interaction unit sends the GGA position information to the server, it removes blank characters and line breaks from the head and tail of the collected NMEA sentences, adds a line break and sends it to the server, and controls the frequency of sending data to the server to be at least one second.
7. An Android platform Beidou high-precision positioning control system as claimed in claim 1, characterized in that: The hardware adaptation layer includes an abstract interface, a service interface and a module interface. The abstract interface is used to define a differential data interface, the service interface is used for data conversion and calling a module interface, and the module interface is used for serial port writing to implement differential data sending tasks.
8. An Android platform Beidou high-precision positioning control system as claimed in claim 1, characterized in that: The differential data sending module includes: first, defining the system broadcast, second, setting the differential data carried by the broadcast, setting the length of the differential data carried by the broadcast, and finally, sending the system broadcast.
9. An Android platform Beidou high-precision positioning control system as claimed in claim 1, characterized in that: The system framework layer includes: first receiving differential data, secondly extracting the length of the differential data, and finally sending the differential data to the hardware adaptation layer.
Citation Information
Patent Citations
High-precision satellite navigation implementing method based on Android kernel layer
CN104236579A
Intelligence framework of Beidou satellite communication and navigation based on Android system and application
CN106357889A
Android system intelligent terminal-based high-precision solution
CN107704276A
Beidou data communication system and method based on Android operating system
CN108152839A
Method for realizing sub-meter-level positioning at smart phone and sub-meter-level positioning type smart phone
CN108318905A
