Opened 13 years ago

Last modified 4 years ago

#442 reopened enhancement/feature request

Cursor centering offset should be speed dependent

Reported by: niccolo Owned by: KaZeR
Priority: major Milestone: version 0.6.0
Component: core Version: git master
Severity: Keywords:
Cc: niccolo@…


I use Navit with internal GUI and map orientation to the North.

Navit follows the cursor and recenters the map using a 30% screen offset to allow more map ahead of the cursor.

But if you are standing or moving very slow, the bearing is unreliable, so the 30% offset jumps in every direction, making the screen crazy.

I suggest to make the 30% offset dependent upon the speed, i.e. the offset is 30% at speed > 50 km/h and decreases to 0% (cursor centered into the screen) at speed <= 2 km/h.

I attach a patch for navit.c, it is against svn-2270, but should apply to current trunk too.

Attachments (2)

navit-variable-cursor-offset.patch (1.6 KB) - added by niccolo 13 years ago.
navit-variable-cursor-offset-configurable.patch (4.0 KB) - added by niccolo 13 years ago.

Download all attachments as: .zip

Change History (8)

Changed 13 years ago by niccolo

comment:1 Changed 13 years ago by kazer

  • Resolution set to fixed
  • Status changed from new to closed

Applied in r2488, thank you.

comment:2 Changed 13 years ago by niccolo

  • Cc niccolo@… added
  • Resolution fixed deleted
  • Status changed from closed to reopened

I noticed that martin-s undone change 2488, which solved this ticket.

Here it is the undone 2569 with the rationale.

What shuould be the best approach to satisfy both requirements?

I was thinking about making some values configurable in navit.xml: min_offset, max_offset, min_offset_speed and max_offset_speed. So you can set your prefferred behaviour just changing navit.xml.

Martin suggests also to modify track.c.

If we can get consensus I can try to implement it.

comment:3 Changed 13 years ago by niccolo

Hello, I propose a new patch.

The default behaviour is unchanged: the cursor has a fixed screen offset of 30%. But you can add in navit.xml an attribute to the vehicle tag, like this:

<vehicle ... min_offset="0">

So at lower speed the offset tends to zero.

You can define the following attributes: min_offset, max_offset, min_offset_speed and max_offset_speed.

You can define just the first, because the others have sensible defaults for a car vehicle.

comment:4 Changed 12 years ago by kazer

  • Milestone set to version 0.2.0

comment:5 Changed 9 years ago by usul

This patch had not been added, does such kind of errors still occure?

comment:6 Changed 4 years ago by

  • Milestone changed from version 0.5.1 to version 0.6.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.