POSITIONING SYSTEM AND CONTROL METHOD THEREOF

Information

  • Patent Application
  • 20080059066
  • Publication Number
    20080059066
  • Date Filed
    August 30, 2007
    17 years ago
  • Date Published
    March 06, 2008
    16 years ago
Abstract
A positioning system includes a positioning module, an application program, a control program, a first transmission interface, a second transmission interface and a switch module. The positioning module is for providing positioning information. The application program is for controlling the positioning module to receive the positioning information from the positioning module. The control program is for controlling the positioning module to receive the positioning information from the positioning module when the application program is shutdown. The application program receives the positioning information through the first transmission interface. the control program receives the positioning information through the second transmission interface. The switch module can be selectively switched to decide whether the positioning module is controlled by the application program or the control program to receive the positioning information.
Description

BRIEF DESCRIPTION OF THE DRAWINGS


FIG. 1 is a block diagram of a positioning system in accordance with the present invention;



FIG. 2 is a block diagram of a positioning system in accordance with a preferred embodiment of the present invention;



FIG. 3 is a flow chart of a control method of a positioning system i n accordance with the present invention;



FIG. 4 is a flow chart of a control method of a positioning system i n accordance with a preferred embodiment of the present invention;



FIG. 5 is a block diagram of a positioning system software in accordance with a preferred embodiment of the present invention; and



FIG. 6 is a block diagram of a positioning system software in accordance with another preferred embodiment of the present invention.





DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

In the following related figures, same reference numerals are used for the same elements of a positioning system and a control method in accordance with a preferred embodiment of the present invention.


Referring to FIG. 1 for a block diagram of a positioning system in accordance with the present invention, the positioning system comprises a positioning module 16, an application program 11, a control program 12, a first transmission interface 13, a second transmission interface 14 and a switch module 15. The positioning module 16 is for providing positioning information 161. The application program 11 is for receiving the positioning information 161 from the positioning module 16. The control program 12 is for receiving the positioning information 161 from the positioning module 16 when the application program 11 is terminated. The first transmission interface 13 is provided for the application program 11 to receive the positioning information 161, and the second transmission interface 14 is provided for the control program 12 to receive the positioning information 161. The switch module 15 selectively switches to a first state or a second state, such that if the switch module 15 is situated at the first state, the application program 11 uses the first transmission interface 13 to receive the positioning information 161 from the positioning module 16 through the switch module 15 so that the application program 11 can receive the positioning information 161, or if the switch module 15 is at the second state, the control program 12 uses the second transmission interface 14 to receive the positioning information 161 from the positioning module 16 through the switch module 15 so that the control program 12 can receive the positioning information 161.


Preferably, the application program is a navigation program, and the positioning module is a GPS module, and the first transmission interface and the second transmission interface are universal asynchronous receiver transmitters (UART). The control program can be set into an inactive mode when the application program is executed. The switch module switches to a first state or a second state based on the priority settings of the application program and the control program. Besides, the switch module also can switch to a first state or a second state based on a general-purpose I/O (GPIO) port of the central processor. The control program drives the positioning module to enter into an inactive mode when the intensity of a satellite signal received by the positioning module is lower than a predetermined value. Besides, the control program enters into an inactive mode, if the power supply of the positioning system is low, or the positioning module has received sufficient positioning information, or the intensity of the satellite signal received by the positioning module is lower than a predetermined value.


Referring to FIG. 2 for a block diagram of a positioning system in accordance with a preferred embodiment of the present invention, the positioning system comprises a central processor 21, a first UART interface 22, a second UART interface 23, a complex programmable logic device (CPLD) 24 and a global positioning system module 25. The CPLD 24 is used as a switch circuit for switching between the first UART interface 22 and the second UART interface 23 of the central processor 21, and receiving the positioning information from the global positioning system module 25. The switching states of CPLD 24 can be controlled by a GPIO port of the central processor 21.


Referring to FIG. 3 for a flow chart of a control method of a positioning system in accordance with the present invention, the control method comprises the steps of:


Step S31: starting a control program;


Step S32: using the control program to control a positioning module for receiving a positioning information from the positioning module; and


Step S33: terminating the control program, if an application program is executed.


Referring to FIG. 4 for a flow chart of a control method of a positioning system in accordance with a preferred embodiment of the present invention, the control method comprises the steps of:


Step S41: starting a control program;


Step S42: detecting whether or not the first serial port is in use; if yes, indicating that an application program is being executed, then go to Step S48, or else go to Step S43;


Step S43: detecting whether or not there is sufficient power supply; if no, indicating that the power supply is too low, then go to Step S48, or else go to Step S44;


Step S44: turning on a second serial port provided for the control program to access the positioning module for receiving positioning information;


Step S45: detecting whether or not sufficient ephemeris data is received; if yes, then execute Steps S47 and Step S48, or else go to Step 46;


Step S46: detecting whether or not the intensity of a satellite signal received by the positioning module is lower than a predetermined value; if yes, then executes Steps S47 and S48, or else repeat Step S42;


Step S47: turning off the second serial port; and


Step S48: setting the control program into an inactive mode.


Please referring to FIG. 5 for a block diagram of a positioning system software in accordance with a preferred embodiment of the present invention, the positioning system comprises a positioning module 16, an application program 11, a control program 12, a first serial port 51 and a second serial port 52. The application program 11 is for controlling the positioning module 16, and the control program 12 is for controlling the positioning module 16 when the application program 11 is terminated. The application program 11 accesses the positioning module 16 through the first serial port 51, and the control program 12 accesses the positioning module 16 through the second serial port 52.


Since the application program and the control program adopt different serial ports, these two programs do not affect each other. Even if the control program turns on the second serial port, the first serial port can be turned on successfully without any interference when the application program tries to turn on the first serial port.


Please referring to FIG. 6 for a block diagram of a positioning system software in accordance with another preferred embodiment of the present invention, the position system comprises a positioning module 16, an application program 11, a control program 12 and a first serial port 51. The application program 11 is for controlling the positioning module 16, and the control program 12 is for controlling the positioning module 16 when the application program 11 is terminated, and both application program 11 and control program 12 can simply use a multi-threading architecture 61 to control the positioning module 16 through the first serial port 51.


While the invention has been described by way of example and in terms of a preferred embodiment, it is to be understood that the invention is not limited thereto. To the contrary, it is intended to cover various modifications and similar arrangements and procedures, and the scope of the appended claims therefore should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements and procedures.

Claims
  • 1. A positioning system, comprising: a positioning module, for providing a positioning information;an application program, for controlling said positioning module, and receiving said positioning information from said positioning module;a control program, for controlling said positioning module, if said application program is terminated, and receiving said positioning information from said positioning module;a first transmission interface, for providing said application program to receive said positioning information;a second transmission interface, for providing said control program to receive said positioning information; anda switch module, for selectively switching to a first state or a second state, such that if said switch module is situated at said first state, said application program uses said first transmission interface to receive said positioning information from said positioning module through said switch module, and if said switch module is situated at said second state, said control program uses said second transmission interface to receive said positioning information from said positioning module through said switch module.
  • 2. The positioning system of claim 1, wherein said application program is a navigation program.
  • 3. The positioning system of claim 1, wherein said positioning module is a global positioning system (GPS) module.
  • 4. The positioning system of claim 1, wherein said first transmission interface and said second transmission interface are universal asynchronous receiver transmitter (UART) interfaces.
  • 5. The positioning system of claim 1, wherein said control program is set into an inactive mode when said application program is started.
  • 6. The positioning system of claim 1, wherein said switch module switches to said first state or said second state based on priority settings of said application program and said control program.
  • 7. The positioning system of claim 1, wherein said switch module switches to said first state or said second state based on a signal from a general-purpose I/O (GPIO) port of said central processor.
  • 8. The positioning system of claim 1, wherein said control program drives said positioning module into an inactive mode, if the intensity of a satellite signal received by said positioning module is lower than a predetermined value.
  • 9. The positioning system of claim 1, wherein said control program is set into an inactive mode, if the power of said positioning system is low.
  • 10. The positioning system of claim 1, wherein said control program is set into an inactive mode, if said positioning module has received sufficient positioning information.
  • 11. The positioning system of claim 1, wherein said control program is set into an inactive mode, if the intensity of a satellite signal received by said positioning module is lower than a predetermined value.
  • 12. A control method for a positioning system, applicable when an application program is terminated, comprising the steps of: starting a control program;using said control program to control a positioning module for receiving positioning information from said positioning module; andsetting said control program into an inactive mode, if said application program is started.
  • 13. The control method for a positioning system of claim 12, wherein said control program is executed according to a procedure comprising the steps of: (a) detecting whether or not a first serial port is in use, wherein said first serial port is provided for said application program to access a positioning module; if yes, then said control program is set into an inactive mode, or else go to Step (b);(b) detecting whether or not there is sufficient power supply; if yes, go to Step (c), or else said control program is set into an inactive mode;(c) opening a second serial port which is provided for said control program to access said positioning module to receive said positioning information;(d) detecting whether or not sufficient ephemeris data is received; if yes, then close said second serial port to set said control program into an inactive mode, or else go to Step (e); and(e) detecting whether or not the intensity of a satellite signal received by said positioning module is lower than a predetermined value; if yes, then close said second serial port to set said control program into an inactive mode.
  • 14. The control method for a positioning system of claim 12, wherein said application program is a navigation program.
  • 15. A positioning system, comprising: a positioning module;an application program, for controlling said positioning module;a control program, for controlling said positioning module when said application program is terminated; anda serial port, coupled to said positioning module;wherein, said application program and said control program control said positioning module through the serial port by using a multi-threading architecture.
  • 16. The positioning system of claim 15, wherein said application program is a navigation program.
Priority Claims (1)
Number Date Country Kind
095132222 Aug 2006 TW national