Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve camera following position #2191

Closed
smichel17 opened this issue Oct 23, 2020 · 13 comments
Closed

Improve camera following position #2191

smichel17 opened this issue Oct 23, 2020 · 13 comments

Comments

@smichel17
Copy link
Member

smichel17 commented Oct 23, 2020

Use case

I usually want the position of the map to follow my movement. However, I usually do not want the map to be centered on my position, because I am mapping exclusively things in front of me — I would prefer to have my position fixed at about here:

3/4 of the way from the top of the screen, horizontally centered

In theory, this is what the compass mode is for. However, in practice, the direction of the compass changes far too erratically, making the map hard to read — there is some stabilization already that prevents the map from spinning around completely, but it still creates jitter. Also, your position is still in the center of the screen instead of closer to the bottom. So instead, I just keep the map unlocked and pan around as I walk down the street. (I am actually curious whether anybody finds compass mode useful.)

Proposed Solution

I do not have a particular solution I like enough to propose it. However, I have a couple partial ideas; maybe with a few more brains we can turn them into a solution.

  • Modify compass mode to add additional stabilization (eg, slower turning)
    • If needed, add a control for the user to quickly rotate the view 90°
  • Some way to unlock the camera from the exact center, but still move the map with your position.
    • One option, borrowed from some games have this and call it a "semi-locked" camera: allow panning, but only a little bit, so that your position always stays within a certain area (eg, the black rectangle):
      3/4 of the way from the top of the screen, horizontally centered
      Of course, right now, panning the map stops following your position, so there would need to be a way to toggle this. Maybe an additional state of the gps button, instead of making it disappear while following.
    • Another option: The gps button does not disappear when following location. Pressing it allows you to pan the view freely, but it still moves when you move (keeps the same position relative to your location). And the icon could change to either something like locked/unlocked, linked/unlinked, or arrows in/out (like this: image)
  • A mode that locks the camera in the position shown above (horizontally centered, 1/4 from bottom of screen), and changes the effect of dragging with one finger — horizontal movement would rotate, and vertical would tilt.
@RubenKelevra
Copy link
Contributor

Hey, this sounds pretty great.

I've noticed that I like to turn the camera a lot, since the compass function is completely unusable at the moment. But as soon as you start turning the view, it unlocks from following the movements of the GPS.

I think it should just start to unlock from the movement of the GPS after the dot left the screen and is shown with an arrow at the edge of the screen.

Any rotation, tilting, panning shouldn't decouple it from the GPS movements, and just keep the dot at the relative position in the screen.

And magnetic heading dampening would be nice, too.

@westnordost
Copy link
Member

I think this is not worth the effort.

I understand that it makes sense to see more of the map which is in front of you (in the direction you are walking/looking) than what's behind you, but we already have this feature. Just tilt the map. You will automatically see more of what is in front of you than what is behind you, due to the magic of perspective.

If the compass rotation is not working well, then rather the feature request would be to orient the map according to the movement direction rather than this.

@westnordost westnordost added the feedback required more info is needed, issue will be likely closed if it is not provided label Oct 28, 2020
@smichel17
Copy link
Member Author

If the compass rotation is not working well, then rather the feature request would be to orient the map according to the movement direction rather than this.

If this works* then I think this would help. This seems to me like it would be a bit more work than some of the options I proposed (adding a little more stabilization to the compass view, for example).

*OsmAnd's "Orient map to direction of movement" feature rotates back to north up when it can't determine which direction you're moving in, which consistently happens when stopping at red lights 😕

@westnordost
Copy link
Member

Hm well, one way or another, I do not plan to spend more time on tinkering about the camera following or not following stuff. I put way too much effort in this already.

@westnordost westnordost removed the feedback required more info is needed, issue will be likely closed if it is not provided label Oct 29, 2020
@smichel17
Copy link
Member Author

Okay. I may take a look at it myself. In the event that I do, would it be okay to remove (or significantly change) "compass mode"?

I'd be interested to know how many people find it useful, or even know it exists.

@westnordost
Copy link
Member

Well, it is at least ok to experiment with removing or significantly changing compass mode. I can not guarantee you that I'll merge it.

@westnordost
Copy link
Member

Related: #1040

@rouelibre1
Copy link

This would really improve the experience when using the app on a bicycle. I tried the compass mode and I'd love to use it more in the future but right now every little handlebar movement and road bump will make it shake. (Hope this describes it properly, I'm not completely clear on the impacts of "compass mode" and "GPS follow location" on/off on the experience for now)

@FloEdelmann
Copy link
Member

Since #2465 / 5df2040 I've used compass mode with the phone mounted to my bike multiple times, and it worked quite well.

@smichel17, @RubenKelevra, @rouelibre1 Have you already tested that change recently? Does that change work well enough for you, too?

@smichel17
Copy link
Member Author

I have not tested the change… I don't do very much mapping in the winter, it's too cold to use a touchscreen! (I have a pair of smartphone-compatible gloves, but they're thin and don't do much when it's below freezing out.)

@RubenKelevra
Copy link
Contributor

@FloEdelmann I've tested at least the beta for v30.

I got a OnePlus 5T, which has in general pretty good sensors.

While the motion is now smooth, I still get a rotation left and right for each step, basically.

So we need a frequency filter which removes everything below say 3 Hz.

@rouelibre1
Copy link

@FloEdelmann I tried again (mounted on my bike) and it's much better now.

@smichel17
Copy link
Member Author

I've gotten a chance to try this and I agree it's much better now. Not perfect, and especially I'd still be interested in a way to move the map as I move but without myself being centered on the screen… but it's good enough that I'm not going to be annoyed enough to experiment with adding that functionality for a long time. So, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants