Changeset 33078 in osm for applications/editors/josm/plugins/livegps/src/livegps/LiveGpsLayer.java
- Timestamp:
- 2016-11-20T12:38:12+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/livegps/src/livegps/LiveGpsLayer.java
r33045 r33078 32 32 public static final String C_LIVEGPS_COLOR_POSITION_ESTIMATE = "color.livegps.position_estimate"; 33 33 34 private static final CachingProperty<Color> COLOR_POSITION = new ColorProperty(C_LIVEGPS_COLOR_POSITION_ESTIMATE, Color.RED).cached(); 35 private static final CachingProperty<Color> COLOR_POSITION_ESTIMATE = new ColorProperty(C_LIVEGPS_COLOR_POSITION_ESTIMATE, Color.CYAN).cached(); 34 private static final CachingProperty<Color> COLOR_POSITION = 35 new ColorProperty(C_LIVEGPS_COLOR_POSITION_ESTIMATE, Color.RED).cached(); 36 private static final CachingProperty<Color> COLOR_POSITION_ESTIMATE = 37 new ColorProperty(C_LIVEGPS_COLOR_POSITION_ESTIMATE, Color.CYAN).cached(); 36 38 37 39 private static final int DEFAULT_REFRESH_INTERVAL = 250; … … 98 100 long current = date.getTime(); 99 101 100 rv.grow(-(int)(rv.getHeight() * centerFactor), -(int)(rv.getWidth() * centerFactor)); 102 rv.grow(-(int) (rv.getHeight() * centerFactor), -(int) (rv.getWidth() * centerFactor)); 101 103 102 104 if (!rv.contains(P) || (centerInterval > 0 && current - lastCenter >= centerInterval)) { … … 132 134 double ppm = 100 / mv.getDist100Pixel(); /* pixels per metre */ 133 135 134 w = (int )Math.round(lastData.getEpx() * ppm);135 h = (int )Math.round(lastData.getEpy() * ppm);136 w = (int) Math.round(lastData.getEpx() * ppm); 137 h = (int) Math.round(lastData.getEpy() * ppm); 136 138 137 139 if (w > TriaWidth || h > TriaWidth) { … … 147 149 int[] y = new int[4]; 148 150 float course = lastData.getCourse(); 149 float csin = (float )Math.sin(Math.toRadians(course));150 float ccos = (float )Math.cos(Math.toRadians(course));151 float csin120 = (float )Math.sin(Math.toRadians(course + 120));152 float ccos120 = (float )Math.cos(Math.toRadians(course + 120));153 float csin240 = (float )Math.sin(Math.toRadians(course + 240));154 float ccos240 = (float )Math.cos(Math.toRadians(course + 240));151 float csin = (float) Math.sin(Math.toRadians(course)); 152 float ccos = (float) Math.cos(Math.toRadians(course)); 153 float csin120 = (float) Math.sin(Math.toRadians(course + 120)); 154 float ccos120 = (float) Math.cos(Math.toRadians(course + 120)); 155 float csin240 = (float) Math.sin(Math.toRadians(course + 240)); 156 float ccos240 = (float) Math.cos(Math.toRadians(course + 240)); 155 157 156 158 g.setColor(COLOR_POSITION.get()); … … 223 225 Main.pref.putInteger(C_REFRESH_INTERVAL, refreshInterval); 224 226 Main.pref.putInteger(C_CENTER_INTERVAL, centerInterval); 225 Main.pref.putInteger(C_CENTER_FACTOR, (int )centerFactor);227 Main.pref.putInteger(C_CENTER_FACTOR, (int) centerFactor); 226 228 227 229 /*
Note:
See TracChangeset
for help on using the changeset viewer.