Modify

Opened 15 years ago

Closed 15 years ago

#2780 closed enhancement (fixed)

[PATCH] make hdop color more configurable

Reported by: sbrunner Owned by: team
Priority: major Milestone:
Component: Core Version: tested
Keywords: Cc:

Description

Hello !

With my gps the color of trace using the hdop is almost green, than I purpose to make it more configurable with this patch:

Index: src/org/openstreetmap/josm/gui/layer/GpxLayer.java
===================================================================
--- src/org/openstreetmap/josm/gui/layer/GpxLayer.java (révision 1669)
+++ src/org/openstreetmap/josm/gui/layer/GpxLayer.java (copie de travail)
@@ -466,7 +466,7 @@

if (hdop < 0) {

hdop = 0;

}

  • int hdoplvl = Math.round(hdop * 25);

+ int hdoplvl = Math.round(hdop * Main.pref.getInteger("hdop.factor", 25));

High hdop is bad, but high values in colors are green.
Therefore inverse the logic
int hdopcolor = 255 - (hdoplvl > 255 ? 255 : hdoplvl);

Attachments (1)

patch (907 bytes ) - added by sbrunner 15 years ago.
patch

Download all attachments as: .zip

Change History (3)

by sbrunner, 15 years ago

Attachment: patch added

patch

comment:1 by stoecker, 15 years ago

Summary: make hdop color more configurable[PATCH] make hdop color more configurable

Maybe a better default would also be useful.

comment:2 by stoecker, 15 years ago

Resolution: fixed
Status: newclosed

In r1734.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.