CN102340567A - Mobile phone and method for automatically setting time according to positioning of global positioning system (GPS) - Google Patents

Mobile phone and method for automatically setting time according to positioning of global positioning system (GPS) Download PDF

Info

Publication number
CN102340567A
CN102340567A CN201110043148XA CN201110043148A CN102340567A CN 102340567 A CN102340567 A CN 102340567A CN 201110043148X A CN201110043148X A CN 201110043148XA CN 201110043148 A CN201110043148 A CN 201110043148A CN 102340567 A CN102340567 A CN 102340567A
Authority
CN
China
Prior art keywords
information
time
gps
mobile phone
longitude
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201110043148XA
Other languages
Chinese (zh)
Inventor
丁莹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Wingtech Electronic Technology Co Ltd
Original Assignee
Shanghai Wingtech Electronic Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Wingtech Electronic Technology Co Ltd filed Critical Shanghai Wingtech Electronic Technology Co Ltd
Priority to CN201110043148XA priority Critical patent/CN102340567A/en
Publication of CN102340567A publication Critical patent/CN102340567A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a mobile phone and a method for automatically setting time according to the positioning of a global positioning system (GPS). The method comprises the following steps of: setting a GPS information receiving module on the mobile phone to receive GPS information data; resolving the GPS information data to obtain position information and time information in the GPS information data; calculating the local standard time of the mobile phone according to the position information, the time information and preset rules; and setting the display time of the mobile phone according to the local standard time by using a mobile phone system. By the mobile phone and the method, the time information of a position at which a mobile phone user is can be comprehensively and accurately acquired in real time according to the positioning information of the GPS, and the acquired time information can be automatically set to be the time of the mobile phone for the user to view conveniently.

Description

A kind of mobile phone and method that the time is set according to the GPS location automatically
Technical field
The present invention relates to field of mobile phones, particularly a kind of mobile phone and method that the time is set according to the GPS location automatically.
Background technology
Along with popularizing of mobile phone, the time on the mobile phone is important to People more and more.For frequent various countries, dead boundary go on business, study, commercial negotiation and travel abroad, especially concerning the people of hobby self-driving travel, after arriving certain place or destination, can not feel very inconvenience because of knowing the local time.And at present function zebra time on the cell phone platform is to supply user inquiring pairing zebra time through the countries and regions that are preset on the mobile phone flash memory; But also can only inquire about fixing countries and regions; Do not contain the inquiry of the time of world's all regions, it lacks real-time and the mobile phone time need manually be set.If the user do not knowing under the own on-site situation, just can't be through the functional inquiry and the local time is set zebra time in the present mobile phone.
Application number is 200510079691, and the patent that name is called " time setting method of dual-mode handset " discloses a kind of dual-mode handset time method is set.This method has been described through the improvement of dual-mode handset and has been carried out the technical scheme that the time is provided with, and does not utilize the GPS location to carry out the time set of mobile phone but relate to.
Summary of the invention
The purpose of this invention is to provide and a kind ofly mobile phone and the method for time are set automatically, make mobile phone is set the time easily through the GPS location technology according to GPS location.
The present invention provides a kind of and according to the GPS location mobile phone time method is set automatically, may further comprise the steps:
1.1, the GPS information receiving module is set on said mobile phone;
1.2, receive gps data and resolve its positional information that comprises and temporal information through said GPS information receiving module;
1.3, through pre-defined rule, the local standard time of calculating said mobile phone according to the said positional information that parses and temporal information;
1.4, call the said standard time that calculates and it is set to the time of said mobile phone.
Positional information and temporal information in the gps data that said step 1.2 is resolved comprise longitude information, UTC temporal information, date information.
Said step 1.3 may further comprise the steps: judge when said longitude information is east longitude; The UTC time and the time zone value addition that obtain are obtained local standard time; If judge when said longitude information is west longitude, then the UTC time that obtains and time zone value are subtracted each other and obtain local standard time.
Said method specifically may further comprise the steps:
4.1, the GPS information receiving module is set on said mobile phone and receives GPS information;
4.2, read east longitude or west longitude information and deposit buffering area in from said GPS information data field;
4.3, from said GPS information data field read year, month, day information and deposit buffering area in;
4.4, read longitude information from said GPS information data field and obtain longitude and deposit buffering area in;
4.5, from said GPS information data field read the UTC temporal information when obtaining, branch, second temporal information and deposit buffering area in;
4.6, judge and when said longitude information is east longitude the UTC time and the time zone value addition that obtain to be obtained local standard time, if when the said longitude information of judgement is west longitude, then UTC time of acquisition and time zone value is subtracted each other and obtain local standard time;
4.7, read said local standard time and carry out the mobile phone time and be provided with.
On the other hand, the present invention also provides a kind of and locatees the mobile phone that the time is set automatically according to GPS, comprising:
The GPS information receiving module is in order to receive the GPS information data;
Parsing module connects said GPS information receiving module, in order to resolve positional information and the temporal information in the said GPS information data;
Computing module connects said parsing module, through pre-defined rule and local standard time of calculating said mobile phone according to the said positional information that parses and temporal information;
Module is set, connects said computing module, call the said standard time that calculates and it is set to the time of said mobile phone.
Positional information and temporal information in the gps data that said parsing module is resolved comprise longitude information, UTC temporal information, date information.
Pre-defined rule in the said computing module is: when said longitude information is east longitude, the UTC time and the time zone value addition that obtain are obtained local standard time; When said longitude information is west longitude, then the UTC time that obtains and time zone value is subtracted each other and obtain local standard time.
Adopt a kind of mobile phone and method that the time is set according to the GPS location automatically of the present invention; Through the GPS information receiving module is set on mobile phone in order to receive the GPS information data; Then said GPS information data is resolved; Parse its positional information and temporal information, calculate the local standard time of mobile phone again according to said positional information and temporal information and with pre-defined rule.Cell phone system utilizes the demonstration time that mobile phone is set said local standard time again.The present invention according to the GPS locating information can be real-time, obtain the temporal information of cellie position comprehensively, accurately, and then be arranged to the mobile phone time automatically and check to make things convenient for the user.
Description of drawings
Fig. 1 is a method flow diagram of the present invention;
Fig. 2 is the flow chart that receives the GPS information data among the present invention;
Fig. 3 reads the flow chart of resolving the GPS information data and the mobile phone time being set among the present invention.
Embodiment
Further specify technical scheme of the present invention below in conjunction with accompanying drawing and embodiment.
As an embodiment, the present invention is useful on the Linux cell phone platform.Introduce earlier below in the present embodiment the vocabulary of using: GPS (Global Positioning System), global positioning system; NMEA (National Marine Electronics Association), GPS serial ports host-host protocol; UTC (Universal Time Coordinated), world unified time; Buffer, buffering area; GPRMC, GPGGA, GPGSV, GPGSA are four kinds of NMEA data formats.
In addition, in the present embodiment be with using De $GPRMC statement meaning and span:
< 1>UTC time: hhmmss.ss-(000000.00-235959.99); < 2>state, validity-A represent that effectively V representes invalid; < 3>latitude form: ddmm.mmmm-(0000.00000-8959.9999); < 4>southern hemisphere and northern hemisphere-N north latitude, the S south latitude; < 5>longitude format: dddmm.mmmm-(00000.0000-17959.9999); < 6>thing hemisphere-E representes east longitude, and W representes west longitude; < 7>ground speed-(000.00-999.999); < 8>velocity attitude-(000.00-359.99); < 9>date format, month day year-(010100-123199); < 10>magnetic declination, unit: degree-(00.00-99.99); < ll>magnetic declination direction-E representes east, and W representes the west; < 12>pattern indication and verification and-A=autonomous positioning, the D=difference, the E=estimation, the N=data are invalid.
Referring to Fig. 1, Fig. 1 has shown that a kind of the location according to GPS is provided with mobile phone time method 100 automatically, may further comprise the steps:
101, the GPS information receiving module is set on said mobile phone;
102, receive gps data and resolve its positional information that comprises and temporal information through said GPS information receiving module; Said positional information and temporal information comprise longitude information, UTC temporal information, date information.
103, through pre-defined rule, the local standard time of calculating said mobile phone according to the said positional information that parses and temporal information.Specifically, if judge and when said longitude information is east longitude the UTC time and the time zone value addition that obtain to be obtained local standard time,, then UTC time of acquisition and time zone value are subtracted each other and obtain local standard time if when the said longitude information of judgement is west longitude.
104, call the said standard time that calculates and it is set to the time of said mobile phone.
Referring to Fig. 2, Fig. 2 has shown that the present invention receives the flow chart of GPS information data, and the GPS chip among the figure is the GPS information receiving module, and the NMEA data are gps data.
At first carry out the hardware abstraction layer initialization, promptly open serial ports and newly-built daily record output directory; Next carries out the GPS initialization, comprises successively: the driving initialization of GPS chip, and open and send a series of initialization commands to the A-GPS chip, prepare the receiving satellite certificate, device start pattern (cold start-up, warm start, the warm startup) is set, open navigation mode; Receive the initialization of NMEA data again, promptly open the NMEA data of the main termination receiving satellite of pseudo-terminal (virtual terminal); Last close port is accomplished the reception of data.
Under the situation of Linux as cell phone system, utilize pseudo terminal device to be mapped to the form of file, carry out interprocess communication through the mode of pseudo-terminal, read locating information and realize through the form that reads file.In addition; The NMEA data have four kinds of form: GPRMC, GPGGA, GPGSV, GPGSA; Wherein use for the ordinary GPS Kinematic Positioning; The GPRMC statement meets the demands fully, comprises fields such as longitude and latitude, speed, time and magnetic declination in the GPRMC statement, and these data are that the navigator fix application provides sufficient information.The present invention is exactly the local standard time that goes out mobile phone through the analytical Calculation to these data.
Referring to Fig. 3, Fig. 3 has shown the flow chart that reads parsing GPS information data and the mobile phone time is set:
S1, open the GPS navigation system, the GPS chip begins to receive satellite fix information, and the NMEA data are outputed to pseudo terminal device through serial ports;
S2, click keys or touch-screen judge that message event is for being provided with the mobile phone time;
S3, read the NMEA data from pseudo-terminal;
S4, parsing NMEA data, specifically as follows:
The NMEA data are the GPRMC formatted data, and it is divided into 12 field: $GPRMC, < 1 >, < 2 >, < 3 >, < 4 >, < 5 >, < 6 >, < 7 >, < 8 >, < 9 >, < 10 >, < ll >, < 12 >.
Whether effective, if effectively, (E representes east longitude then to read east longitude or west longitude information from < 6>field according to < 2>field if reading the GPRMC that receives; W representes west longitude), parsing deposits buffer (buffering area) , $GPRMC statement meaning in and has done narration above the span.
According to the NMEA data that read, resolve year, the moon, day information of GPRMC statement < 9>field, deposit the information that obtains in buffer respectively;
According to the NMEA data that read, resolve the longitude information of GPRMC statement < 5>field, obtain longitude and deposit buffer in;
According to the NMEA data that read, resolve the UTC time of GPRMC statement < 1>field, obtain temporal information and with the time, branch, second deposit buffer respectively in;
If longitude information is east longitude, with the UTC time that obtains add 1 obtain local standard time one hour value (this moment, the time zone value was 1); If otherwise west longitude, then with the UTC time that obtains subtract 1 obtain local standard time one hour value, finally obtain local time information.
In the above resolving; The time zone value can be provided with through the user; Also can read environmental variance TZ through the zoneinfo system file of Linux and obtain time-zone information, function time () is used for obtaining the described UTC time, and localtime () is used for obtaining local zone time.
The upper layer software (applications) of S5, cell phone system reads and is stored among the buffer corresponding year, month, day and time, calls explicit function and shows and be provided with.
As on the other hand, the present invention also provides a kind of and according to the GPS location mobile phone of time is set automatically, comprising:
The GPS information receiving module is in order to receive the GPS information data;
Parsing module connects said GPS information receiving module, in order to resolve positional information and the temporal information in the said GPS information data.As an embodiment, positional information and temporal information in the gps data that said parsing module is resolved comprise longitude information, UTC temporal information, date information.
Computing module connects said parsing module, through pre-defined rule and local standard time of calculating said mobile phone according to the said positional information that parses and temporal information; As an embodiment, the pre-defined rule in the said computing module is: when said longitude information is east longitude, the UTC time and the time zone value addition that obtain are obtained local standard time; When said longitude information is west longitude, then the UTC time that obtains and time zone value is subtracted each other and obtain local standard time.
Module is set, connects said computing module, call the said standard time that calculates and it is set to the time of said mobile phone.
It is to be noted; A kind of mobile phone that the time is set according to GPS location automatically of the present invention a kind ofly locatees according to GPS that the mobile phone time method is set automatically is identical and similar with of the present invention on principle and embodiment, so its repeating part repeats no more.
Those of ordinary skill in the art will be appreciated that; Above embodiment is used for explaining the present invention; And be not to be used as qualification of the present invention; As long as in connotation scope of the present invention, all will drop in claims scope of the present invention variation, the modification of above embodiment.

Claims (7)

1. one kind is provided with the mobile phone time method automatically according to GPS location, it is characterized in that, may further comprise the steps:
1.1, the GPS information receiving module is set on said mobile phone;
1.2, receive gps data and resolve its positional information that comprises and temporal information through said GPS information receiving module;
1.3, through pre-defined rule, the local standard time of calculating said mobile phone according to the said positional information that parses and temporal information;
1.4, call the said standard time that calculates and it is set to the time of said mobile phone.
2. the method for claim 1 is characterized in that, positional information and temporal information in the gps data that said step 1.2 is resolved comprise longitude information, UTC temporal information, date information.
3. method as claimed in claim 2; It is characterized in that; Said step 1.3 may further comprise the steps: judge when said longitude information is east longitude; The UTC time and the time zone value addition that obtain are obtained local standard time,, then UTC time of acquisition and time zone value are subtracted each other and obtain local standard time if when the said longitude information of judgement is west longitude.
4. like each described method of claim 2 to 3, it is characterized in that said method specifically may further comprise the steps:
4.1, the GPS information receiving module is set on said mobile phone and receives GPS information;
4.2, read east longitude or west longitude information and deposit buffering area in from said GPS information data field;
4.3, from said GPS information data field read year, month, day information and deposit buffering area in;
4.4, read longitude information from said GPS information data field and obtain longitude and deposit buffering area in;
4.5, from said GPS information data field read the UTC temporal information when obtaining, branch, second temporal information and deposit buffering area in;
4.6, judge and when said longitude information is east longitude the UTC time and the time zone value addition that obtain to be obtained local standard time, if when the said longitude information of judgement is west longitude, then UTC time of acquisition and time zone value is subtracted each other and obtain local standard time;
4.7, read said local standard time and carry out the mobile phone time and be provided with.
5. one kind is provided with the mobile phone of time automatically according to GPS location, it is characterized in that, comprising:
The GPS information receiving module is in order to receive the GPS information data;
Parsing module connects said GPS information receiving module, in order to resolve positional information and the temporal information in the said GPS information data;
Computing module connects said parsing module, through pre-defined rule and local standard time of calculating said mobile phone according to the said positional information that parses and temporal information;
Module is set, connects said computing module, call the said standard time that calculates and it is set to the time of said mobile phone.
6. mobile phone as claimed in claim 5 is characterized in that, positional information and temporal information in the gps data that said parsing module is resolved comprise longitude information, UTC temporal information, date information.
7. mobile phone as claimed in claim 6 is characterized in that, the pre-defined rule in the said computing module is: when said longitude information is east longitude, the UTC time and the time zone value addition that obtain are obtained local standard time; When said longitude information is west longitude, then the UTC time that obtains and time zone value is subtracted each other and obtain local standard time.
CN201110043148XA 2010-07-20 2011-02-23 Mobile phone and method for automatically setting time according to positioning of global positioning system (GPS) Pending CN102340567A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110043148XA CN102340567A (en) 2010-07-20 2011-02-23 Mobile phone and method for automatically setting time according to positioning of global positioning system (GPS)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN201010231918.9 2010-07-20
CN201010231918 2010-07-20
CN201110043148XA CN102340567A (en) 2010-07-20 2011-02-23 Mobile phone and method for automatically setting time according to positioning of global positioning system (GPS)

Publications (1)

Publication Number Publication Date
CN102340567A true CN102340567A (en) 2012-02-01

Family

ID=45516062

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110043148XA Pending CN102340567A (en) 2010-07-20 2011-02-23 Mobile phone and method for automatically setting time according to positioning of global positioning system (GPS)

Country Status (1)

Country Link
CN (1) CN102340567A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102685716A (en) * 2012-03-27 2012-09-19 华为技术有限公司 Time information obtaining method and mobile terminal
CN103399484A (en) * 2013-07-23 2013-11-20 深圳市元征科技股份有限公司 Local clock calibrating method and vehicle-mounted equipment
CN103699768A (en) * 2012-09-27 2014-04-02 联想(北京)有限公司 Data processing method, data processing device and electronic equipment
CN104471919A (en) * 2012-07-10 2015-03-25 丰田自动车株式会社 In-vehicle information processing device and in-vehicle information processing method
CN108897207A (en) * 2018-07-27 2018-11-27 惠州市德赛西威汽车电子股份有限公司 A kind of method that onboard navigation system sets the local time automatically
CN109104261A (en) * 2018-09-28 2018-12-28 深圳高新兴物联科技有限公司 Local zone time acquisition methods, terminal and storage medium based on LBS
CN112073143A (en) * 2020-09-02 2020-12-11 赵彦博 Clock synchronization test system of modular substation
CN114415492A (en) * 2021-12-08 2022-04-29 深圳优美创新科技有限公司 Method for acquiring time in offline state, terminal and storage medium
CN114488226A (en) * 2022-01-15 2022-05-13 重庆长安汽车股份有限公司 Method and system for automatically switching time zone and time of vehicle-mounted unit based on GNSS positioning

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001359141A (en) * 2000-04-12 2001-12-26 Trw Inc Method and device for imbedding global positioning system(gps) data to mobile phone call data
CN1854751A (en) * 2005-04-26 2006-11-01 佛山市顺德区顺达电脑厂有限公司 Time correcting method by satellite positioning

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001359141A (en) * 2000-04-12 2001-12-26 Trw Inc Method and device for imbedding global positioning system(gps) data to mobile phone call data
CN1854751A (en) * 2005-04-26 2006-11-01 佛山市顺德区顺达电脑厂有限公司 Time correcting method by satellite positioning

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102685716B (en) * 2012-03-27 2015-05-06 华为技术有限公司 Time information obtaining method and mobile terminal
CN102685716A (en) * 2012-03-27 2012-09-19 华为技术有限公司 Time information obtaining method and mobile terminal
CN104471919B (en) * 2012-07-10 2016-11-16 丰田自动车株式会社 Vehicle-borne information processor and on-vehicle information processing method
CN104471919A (en) * 2012-07-10 2015-03-25 丰田自动车株式会社 In-vehicle information processing device and in-vehicle information processing method
CN103699768A (en) * 2012-09-27 2014-04-02 联想(北京)有限公司 Data processing method, data processing device and electronic equipment
CN103399484B (en) * 2013-07-23 2016-06-22 深圳市元征科技股份有限公司 A kind of local clock calibration steps and mobile unit
CN103399484A (en) * 2013-07-23 2013-11-20 深圳市元征科技股份有限公司 Local clock calibrating method and vehicle-mounted equipment
CN108897207A (en) * 2018-07-27 2018-11-27 惠州市德赛西威汽车电子股份有限公司 A kind of method that onboard navigation system sets the local time automatically
CN109104261A (en) * 2018-09-28 2018-12-28 深圳高新兴物联科技有限公司 Local zone time acquisition methods, terminal and storage medium based on LBS
CN112073143A (en) * 2020-09-02 2020-12-11 赵彦博 Clock synchronization test system of modular substation
CN114415492A (en) * 2021-12-08 2022-04-29 深圳优美创新科技有限公司 Method for acquiring time in offline state, terminal and storage medium
CN114415492B (en) * 2021-12-08 2023-12-08 深圳优美创新科技有限公司 Method, terminal and storage medium for acquiring time in offline state
CN114488226A (en) * 2022-01-15 2022-05-13 重庆长安汽车股份有限公司 Method and system for automatically switching time zone and time of vehicle-mounted unit based on GNSS positioning

Similar Documents

Publication Publication Date Title
CN102340567A (en) Mobile phone and method for automatically setting time according to positioning of global positioning system (GPS)
US7528714B2 (en) Flexible position tracking system and tracking and research methods utilizing such systems
US10021669B2 (en) Techniques for tracking destinations on a mobile computing device
US8994851B2 (en) Displaying image data and geographic element data
EP2462779B1 (en) Displaying image data and geographic element data
US8169505B2 (en) Image management apparatus for displaying images based on geographical environment
CN102915310B (en) One map generalization method electronically, air navigation aid and device
US20100205242A1 (en) Friend-finding system
US20090240428A1 (en) Mobile phone having gps navigation system
US20100201567A1 (en) Communicating location information between a portable device and an accessory
CN102788982A (en) Assisted positioning-monitoring system
Parthasarathy Positioning and navigation system using GPS
CN102455186A (en) Action travel navigation and guide device and navigation and guide method therefor
US20080312828A1 (en) System and method for providing directions
CN101482421A (en) Photo navigation system and method of mobile equipment
TW200617416A (en) Global positioning system and method
CN202340254U (en) Cell phone capable of conducting live-action navigation
TW201440563A (en) Portable device with passing trace module and method of the same
CN101106423A (en) Method and system for capturing time information via mobile terminal
CN109996183A (en) A kind of air navigation aid, electronic equipment and navigation system
CN101115279A (en) Automatic dialing unit, system and method for global positioning system
US20180005277A1 (en) User interest estimation system and information delivery system
CN111417905B (en) Display method and display device for clock of intelligent equipment
JP2006153473A (en) Portable terminal
KR20050067806A (en) Digital display apparatus for indicating direction and methed for indicating direction

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20120201