(GPS transplantation trilogy) Analysis and Solution to common problems of porting GPS applications in Linux

Source: Internet
Author: User

 

Analysis and Solution to common problems of porting GPS applications in Linux

OS: Linux 1. directly provide functions for third parties

Cause: the design of the main chip and the change of the GPS chip often make the GPS driver updated.

Evolution:Provide the. So Dynamic Link Library and. h header file to third parties

2. Write the GPS parameter to the program.

GPS parameters include: path of the serial port device, the port number of the gpio device, the baud rate, the gpio port number, the gpio Port Number of the reset, the path of the power management tool, and the file path saved by the Quick Start GPS (cold start and hot start) points );

The development boards include Lily, Bali, Apollo 1. 0, and Apollo 1. 1;

Evolution:Provides configuration files for GPS parameters, such as atgps. CNF and navione. CNF.

3. directly provide the software interface for driver development to a third party

Cause:

1. software interfaces for driver development will change frequently and the interfaces are unstable;

2. The software interface for driver development is not the interface that the third party really needs, and cannot fully meet the user's needs;

3. software interfaces developed based on drivers should be further expanded and improved to meet the needs of third parties;

Evolution:It is encapsulated based on the interfaces provided by developers to meet customers' needs.

4. The third party did not call the at_close_gps function, and the standby time was significantly shortened.

Consequence: The current is too large, the current cannot fall down, and the standby time is too short;

Solution:Make sure that the third party calls the at_close_gps function to disable the gps device.

5. The program and data are not separated, resulting in a directory that often cannot store all programs and data

Data: map data and sound data

Linux partitioned directories are usually 400-500 m, while GPS requires 900 m of storage space.

Evolution: program and data separation

 

6. The current directory is confused with the running program path

The current directory is often changed. The current directory is not necessarily the path of the running program.

Therefore, be sure to differentiate clearly.

7. Use the C ++ class to encapsulate data and hide information

1. Data and information are associated with specific operations;

2. Provide operations to third parties;

3. Information and property hiding;

8. Two sets of GPS codes are required for different versions of a Development Board, namely, Apollo and Apollo.

Development Board: the Apollo Development Board has at least two hardware versions: Apollo and Apollo. After all, the hardware remains a little different;

Solution:A set of codes can be suitable for multiple development boards. A single development board can have multiple different versions.

9. Write a third-party interface to verify its correctness. The tool is gpstool.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.