View Single Post
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#563
Originally Posted by skykooler View Post
Question about that: might it be possible to parse the beginning of the plain-text command such as to extract things such as "turn left", "slight right", "merge", etc. and show an arrow indicating what the next command will be? I would find this very handy when I can't remember the last instruction, but I don't want to take my eyes off the road for long enough to read the blue box.
Well, I have been considering a turn type icon once I can get some turn type metadata from some routing provider, but good point - it also looks doable this way, using the directions provided by Google.

Originally Posted by skykooler View Post
I believe you are using Python for modrana. Here is an example of what I mean:
Code:
def get_turn_direction(gmaps):
	#calling the google maps string "gmaps"
	gmaps_array = lower(gmaps).split(); #Convert to lowercase and split words
	if gmaps_array[1]=="left":
		if gmaps_array[0]=="turn":
			return "turn_left"
		elif gmaps_array[0]=="bear":
			return "bear_left"
		elif gmaps_array[0]=="exit":
			return "bear_left"
		else:
			return "turn_left"
	elif gmaps_array[1]=="right":
		if gmaps_array[0]=="turn":
			return "turn_right"
		elif gmaps_array[0]=="bear":
			return "bear_right"
		elif gmaps_array[0]=="exit":
			return "bear_right"
		else:
			return "turn_right"
	else:
		if gmaps_array[0]=="merge":
			return "merge"
		elif gmaps_array[2]=="left": #i.e. "Take first left"
			return "turn_left"
		elif gmaps_array[2]=="right":
			return "turn_right"
		elif gmaps_array[0]=="exit": #with no side specified, assume right exit
			return "bear_right"
		elif gmaps_array[0]=="continue":
			return "straight"
		else: #Catchall for other commands that I haven't anticipated
			return "don't_know"
Yeah, this should work - but I got an idea that scales better:
  • use a CSV file, just like abbreviation substitution list
  • the CSV contains trigger_word,icon_name pair, ordered by priority (once a trigger word is found in the message, rest is skipped)
  • use regexps to do the matching, probably match just the beginnings of the messages lowercase (as in your example)
  • there should be probably one file per language to keep things maintainable
Like this, support for more more languages can be added quite easily, without writing language specific code.
Also, the grammar used by Google seems looks quite simple after all: this is what a transcontinental route looks like

Originally Posted by skykooler View Post
My suggestion is that this be used to display an arrow, sort of like this:
Well, I am thinking about where to put there arrow (when there is one)
The flexible UI layout that modRana has complicates this quite a bit I think I'll implement per-mode position for the routing info box + place the "widget" wit the arrow somewhere where it does not collide with an UI element.


Originally Posted by petur View Post
Since the last update I find modRana feels slower, sometimes doesn't respond to taps or takes several seconds to do so. Already rebooted, no help. Rest of the device / progranms still feel ok

Anybody else experienced this or is this specific to my setup :/
Originally Posted by nordicnurse View Post
I have noticed the same.

(also added an idea to autozooming ticket)
It is quite possible there could be something wrong in the last version - the cause could be two-fold:
I could have broken something input related while adding support for long-clicks or when adding the new map dragging method. I have also noticed some exceptions while downloading a tile fails. I also have not yet done the sqlite related optimizations mentioned earlier.

If you can find some easily reproducible slowdown/UI unresponsiveness or send me logs of this happening, it would probably help me debugging this issue a lot

Originally Posted by nordicnurse View Post
(also added an idea to autozooming ticket)
Thanks !
__________________
modRana: a flexible GPS navigation system
Mieru: a flexible manga and comic book reader
Universal Components - a solution for native looking yet component set independent QML appliactions (QtQuick Controls 2 & Silica supported as backends)
 

The Following 3 Users Say Thank You to MartinK For This Useful Post: