1. Technical Field
Embodiments of the present disclosure relate to vehicle management technology, and more particularly to an electronic device and a method for vehicle navigation.
2. Description of Related Art
A global positioning navigation system (GPS) is convenient for helping a user navigate unfamiliar roads or reach unfamiliar destination. However, if there are errors in the GPS information, a vehicle may take the wrong road or not get to the correct destination. Thus, the user may miss an important appointment and could even become lost.
The present disclosure, including the accompanying drawings, is illustrated by way of examples and not by way of limitation. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean “at least one.”
In general, the word “module”, as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language. One or more software instructions in the modules may be embedded in firmware, such as in an erasable programmable read only memory (EPROM). The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of non-transitory computer-readable medium or other storage system. Some non-limiting examples of non-transitory computer-readable media include CDs, DVDs, BLU-RAY, flash memory, and hard disk drives.
As shown in
In step S30, the receiving module 100 receives a start position and a destination position of a vehicle set by a user of the electronic device 1. In one embodiment, the receiving module 100 can receive the start position and the destination position of the vehicle by receiving a voice of a user.
In step S31, the detecting module 101 detects whether a distance between the start position and the destination position is within a predefined distance. When the distance between the start position and the destination position is in the predefined distance, the start position and the destination position are considered to be in a same area. In one embodiment, the predefined distance is 2 km. If the distance between the start position and the destination position is in the predefined distance, step S32 is implemented. If the distance between the start position and the destination position is not in the predefined distance, step S33 is implemented.
In step S32, the first calculation module 102 calculates a shortest path from the start position to the destination position, then step S37 is implemented directly. In one embodiment, the shortest path can be calculated by using a Dijkstra method.
In step S33, the reading module 103 reads a system time of the electronic device 1, and determines which period that the system time falls within. Then the reading module 103 reads an estimate time corresponding to the determined period of all the roads from the start position to the destination position. For example, as shown in {circle around (1)}{circle around (6)}{circle around (4)}{circle around (5)}
{circle around (1)}{circle around (7)}{circle around (8)}{circle around (9)}{circle around (5)}. The path {circle around (1)}{circle around (2)}{circle around (3)}{circle around (4)}{circle around (5)} includes a road A-a, a road a-d, a road d-e, a road e-f, and a road f-B. The path {circle around (1)}{circle around (6)}{circle around (4)}{circle around (5)} includes a road A-a, a road a-b, a road b-c, a road c-f, and a road f-B. The path {circle around (1)}{circle around (7)}{circle around (8)}{circle around (9)}{circle around (5)} includes a road A-a, a road a-b, a road b-c, a road c-f, and a road f-B. The estimate time corresponding to the determined period of all the roads from the point “A” to the point “B” is shown in
In step S34, the second calculation module 104 calculates a time that the vehicle will spend on each path from the start position to the destination position according to the read estimate time of each road. The time that the vehicle will spend on a path from the start position to the destination position is a sum of the estimate times for passing through all the roads of the path. As shown in
In step S35, the selecting module 105 selects a path that the vehicle will travel the least amount of time from the start position to the destination position according to the calculated time of each path. As shown in
In step S36, the selecting module 105 displays the selected path on the electronic device 1.
In step S37, when the vehicle has arrived at the destination position, the storing module 106 uploads the selected path, a time that the vehicle spent on each road of the selected path, and the shortest path from the start position to the destination position to the cloud server 2.
Although certain disclosed embodiments of the present disclosure have been specifically described, the present disclosure is not to be construed as being limited thereto. Various changes or modifications may be made to the present disclosure without departing from the scope and spirit of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
101135200 | Sep 2012 | TW | national |