Instruções de navegação: mudanças entre as edições Ver histórico

mSem resumo de edição
Linha 22: Linha 22:
== O algoritmo / lista de condições ==
== O algoritmo / lista de condições ==


The algorithm iterates over a list of conditions. As soon as a condition is met, the relevant instruction is determined, and the algorithm terminates.<br/>
O algoritmo itera sobre uma lista de condições. Logo que uma condição for satisfeita, a instrução relevante é determinada e o algoritmo termina.
The list of conditions:


1. if the junction has only 2 segments, the instruction is: 'CONTINUE'.<br/>
Lista de condições:
1.1. In some cases, T junctions could be considered as only 2 segments. See explanation on 'T junctions' below.
 
1. Se a junção tem apenas 2 segmentos, a instrução é: "CONTINUE".  
 
1.1. Em alguns casos, as junções em T podem ser consideradas como apenas 2 segmentos. Veja a explicação abaixo em "Junções em T".
 
2. Se o ângulo entre '''s-out''' e '''melhor continuação''' é maior do que 45 graus (e inferior a 180), a instrução é: "VIRE DIREITA"


2. if the angle between s-out and the best continuation is larger than 45 degrees (and less than 180), the instruction is: 'TURN RIGHT'
<br/>
2.1 One assumption is that on primary roads (minor highways, major highways and freeways), we won't have angles which are larger than 45 degrees.
2.1 One assumption is that on primary roads (minor highways, major highways and freeways), we won't have angles which are larger than 45 degrees.


3. if s-out is determined to be the best continuation of s-in (explanation on 'best continuation' below), the instruction is: 'CONTINUE'
3. Se '''s-out''' é determinado a ser a '''melhor continuação''' de '''s-in''', a instrução é: "CONTINUE"


4. if s-in is a primary road and s-out is not a primary road, the instruction is: 'EXIT RIGHT'
4. Se '''s-in''' é uma rodovia (''Highways'') '''e s-out''' não, a instrução é: "SAIA A DIREITA"


5. if s-in is a ramp/exit and s-out is neither primary nor ramp/exit, the instruction is: 'EXIT RIGHT'
5. Se s-in é uma rampa/saida (''Ramps'') e s-out não é nem rodovia ou rampa/saída, a instrução é: "SAIA A DIREITA"


6. if none of the above conditions is met, the instruction is: 'KEEP RIGHT'
6. Se nenhuma das condições acima for atendida, a instrução é: "MANTENHA A DIREITA"
<br/><br/>


== T junctions and one way roads ==
== T junctions and one way roads ==

Edição das 16h51min de 9 de agosto de 2012

Comentários gerais

A descrição abaixo é para curvas à direita. Como você pode imaginar, curva à esquerda são simétricas para curvas à direita.

Definições

a) s-in: o segmento que entra na interseção (junção)
b) s-out: o segmento que sai da interseção (junção)
c) s1, s2 … sN: todos os segmentos conectados a mesma interseção (junção)
d) "Melhor continuação" - veja explicação abaixo

Qual é a "Melhor continuação"?

Para determinar se s-out é a continuação "real" de s-in, fazemos o seguinte:

- Se s-out tem o mesmo tipo e nome da via, então é escolhido como "real";

- Senão, procure os outros segmentos: s3, s4 … sN. Um dele será escolhido como "melhor continuação" que s-out se ambas seguintes condições:

  • este segmento tem a melhor coincidência de nome e tipo da via que s-out (ex.: tem o mesmo nome da via e s-out não; tem o mesmo tipo de s-in e s-out não). O nome da via é mais importante que o tipo.
  • o ângulo entre esse segmento e s-in é menor que o ângulo entre s-out e s-in

O algoritmo / lista de condições

O algoritmo itera sobre uma lista de condições. Logo que uma condição for satisfeita, a instrução relevante é determinada e o algoritmo termina.

Lista de condições:

1. Se a junção tem apenas 2 segmentos, a instrução é: "CONTINUE".

1.1. Em alguns casos, as junções em T podem ser consideradas como apenas 2 segmentos. Veja a explicação abaixo em "Junções em T".

2. Se o ângulo entre s-out e melhor continuação é maior do que 45 graus (e inferior a 180), a instrução é: "VIRE DIREITA"

2.1 One assumption is that on primary roads (minor highways, major highways and freeways), we won't have angles which are larger than 45 degrees.

3. Se s-out é determinado a ser a melhor continuação de s-in, a instrução é: "CONTINUE"

4. Se s-in é uma rodovia (Highways) e s-out não, a instrução é: "SAIA A DIREITA"

5. Se s-in é uma rampa/saida (Ramps) e s-out não é nem rodovia ou rampa/saída, a instrução é: "SAIA A DIREITA"

6. Se nenhuma das condições acima for atendida, a instrução é: "MANTENHA A DIREITA"

T junctions and one way roads

In some cases, a node could have more than 2 segments, but the routing server will consider only 2 of them as valid and therefore, the maneuver will be 'Continue straight'.
Nodes can become locked on specific scenarios - see here Roundabouts for more information.

For example, in this case (image below) - assuming the node is locked - heading south, the right turn will be considered 'Continue straight' as the routing server has no other option and there's only one possible segment to be s-out.


If the node was not locked, most likely that waze would tell you to turn right. Driving against the direction is a high penalty, and so is a left turn where a turn is not allowed. However, it would still have been an option, which is why the routing server would have called it 'turn right'.

This could be confusing, especially since there's no external indication on whether or not a node is locked at the moment. We will add it to the Papyrus soon.