mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-30 09:34:06 +00:00
[drape] Add FollowAndRotateRoute mode
This adds a new mode to rotate the camera towards the route while driving. This is done by looking ahead X number of seconds along the current route, up to the next turn, and calculating the angle between the current position and then. Squashed commits: [drape] Add bearing calculation via route lookahead while navigating [drape] Extract NavigationContext from OnLocationUpdate params [drape] Increase rotation animation duration during navigation [drape] Seperate route and compass rotation into two modes [drape] Reduce route lookahead maximum to 25 seconds [drape] Fix case where rotation was incorrectly considered invalid [drape] Make FollowAndRotateRoute mode only available during driving navigation [drape] Rewrite FollowedPolyline::GetLookaheadPoint [drape] Cleanup Signed-off-by: Leonardo Bishop <me@leonardobishop.net>
This commit is contained in:
committed by
Konstantin Pastbin
parent
0d01076c0f
commit
515cf98cef
@@ -308,7 +308,8 @@ string ToString<location::EMyPositionMode>(location::EMyPositionMode const & v)
|
||||
case location::NotFollow: return "NotFollow";
|
||||
case location::NotFollowNoPosition: return "NotFollowNoPosition";
|
||||
case location::Follow: return "Follow";
|
||||
case location::FollowAndRotate: return "FollowAndRotate";
|
||||
case location::FollowAndRotateCompass: return "FollowAndRotateCompass";
|
||||
case location::FollowAndRotateRoute: return "FollowAndRotateRoute";
|
||||
default: return "Pending";
|
||||
}
|
||||
}
|
||||
@@ -324,8 +325,10 @@ bool FromString<location::EMyPositionMode>(string const & s, location::EMyPositi
|
||||
v = location::NotFollowNoPosition;
|
||||
else if (s == "Follow")
|
||||
v = location::Follow;
|
||||
else if (s == "FollowAndRotate")
|
||||
v = location::FollowAndRotate;
|
||||
else if (s == "FollowAndRotateCompass")
|
||||
v = location::FollowAndRotateCompass;
|
||||
else if (s == "FollowAndRotateRoute")
|
||||
v = location::FollowAndRotateRoute;
|
||||
else
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user