| 106 | } |
| 107 | |
| 108 | double Route::GetCurrentTimeToNearestTurnSec() const |
| 109 | { |
| 110 | double distance; |
| 111 | TurnItem turn; |
| 112 | GetNearestTurn(distance, turn); |
| 113 | |
| 114 | // |turn.m_index| - 1 is the index of |turn| segment. |
| 115 | CHECK_LESS_OR_EQUAL(turn.m_index, m_routeSegments.size(), ()); |
| 116 | CHECK_GREATER(turn.m_index, 0, ()); |
| 117 | |
| 118 | return GetCurrentTimeToSegmentSec(turn.m_index - 1); |
| 119 | } |
| 120 | |
| 121 | // | curSegLenMeters | |
| 122 | // | | |