- Timestamp:
- 2019-07-14T02:26:22+02:00 (5 years ago)
- Location:
- trunk
- Files:
-
- 7 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java
r14668 r15247 27 27 import org.openstreetmap.josm.gui.io.importexport.OsmChangeImporter; 28 28 import org.openstreetmap.josm.gui.io.importexport.OsmImporter; 29 import org.openstreetmap.josm.gui.io.importexport.RtkLibImporter; 29 30 import org.openstreetmap.josm.gui.io.importexport.WMSLayerImporter; 30 31 import org.openstreetmap.josm.gui.widgets.AbstractFileChooser; … … 65 66 GpxImporter.class, 66 67 NMEAImporter.class, 68 RtkLibImporter.class, 67 69 NoteImporter.class, 68 70 JpgImporter.class, -
trunk/src/org/openstreetmap/josm/data/gpx/GpxConstants.java
r15020 r15247 165 165 Collection<String> FIX_VALUES = Collections.unmodifiableList( 166 166 Arrays.asList("none", "2d", "3d", "dgps", "pps", "rtk", "float rtk", "estimated", "manual", "simulated")); 167 168 /** 169 * The flag which indicates the solution quality.<ul> 170 * <li>1 : Fixed, solution by carrier‐based relative positioning and the integer ambiguity is properly resolved.</li> 171 * <li>2 : Float, solution by carrier‐based relative positioning but the integer ambiguity is not resolved.</li> 172 * <li>3 : Reserved</li> 173 * <li>4 : DGPS, solution by code‐based DGPS solutions or single point positioning with SBAS corrections</li> 174 * <li>5 : Single, solution by single point positioning</li></ul> 175 * @since 15247 176 */ 177 String RTKLIB_Q = "Q"; 178 /** N (north) component of the standard deviations in m. */ 179 String RTKLIB_SDN = "sdn"; 180 /** E (east) component of the standard deviations in m. */ 181 String RTKLIB_SDE = "sde"; 182 /** U (up) component of the standard deviations in m. */ 183 String RTKLIB_SDU = "sdu"; 184 /** 185 * The absolute value of sdne means square root of the absolute value of NE component of the estimated covariance matrix. 186 * The sign represents the sign of the covariance. */ 187 String RTKLIB_SDNE = "sdne"; 188 /** 189 * The absolute value of sdeu means square root of the absolute value of EU component of the estimated covariance matrix. 190 * The sign represents the sign of the covariance. */ 191 String RTKLIB_SDEU = "sdeu"; 192 /** 193 * The absolute value of sdun means square root of the absolute value of UN component of the estimated covariance matrix. 194 * The sign represents the sign of the covariance. */ 195 String RTKLIB_SDUN = "sdun"; 196 /** The time difference between the observation data epochs of the rover receiver and the base station in second. */ 197 String RTKLIB_AGE = "age"; 198 /** 199 * The ratio factor of ʺratio‐testʺ for standard integer ambiguity validation strategy. 200 * The value means the ratio of the squared sum of the residuals with the second best integer vector to with the best integer vector. */ 201 String RTKLIB_RATIO = "ration"; 167 202 } -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
r15045 r15247 79 79 import org.openstreetmap.josm.gui.io.importexport.JpgImporter; 80 80 import org.openstreetmap.josm.gui.io.importexport.NMEAImporter; 81 import org.openstreetmap.josm.gui.io.importexport.RtkLibImporter; 81 82 import org.openstreetmap.josm.gui.layer.GpxLayer; 82 83 import org.openstreetmap.josm.gui.layer.Layer; … … 267 268 ExtensionFileFilter gpxFilter = GpxImporter.getFileFilter(); 268 269 AbstractFileChooser fc = new FileChooserManager(true, null).createFileChooser(false, null, 269 Arrays.asList(gpxFilter, NMEAImporter.FILE_FILTER), gpxFilter, JFileChooser.FILES_ONLY).openFileChooser(); 270 Arrays.asList(gpxFilter, NMEAImporter.FILE_FILTER, RtkLibImporter.FILE_FILTER), gpxFilter, JFileChooser.FILES_ONLY) 271 .openFileChooser(); 270 272 if (fc == null) 271 273 return; -
trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java
r15001 r15247 126 126 /** Colors (without custom alpha channel, if given) for HDOP painting. **/ 127 127 private ColorScale hdopScale; 128 private ColorScale qualityScale; 128 129 private ColorScale dateScale; 129 130 private ColorScale directionScale; … … 177 178 private static Color[] heatMapLutColorJosmRed2Blue = createColorFromResource("red2blue"); 178 179 180 private static Color[] rtkLibQualityColors = new Color[] { 181 Color.GREEN, // Fixed, solution by carrier‐based relative positioning and the integer ambiguity is properly resolved. 182 Color.ORANGE, // Float, solution by carrier‐based relative positioning but the integer ambiguity is not resolved. 183 Color.PINK, // Reserved 184 Color.BLUE, // DGPS, solution by code‐based DGPS solutions or single point positioning with SBAS corrections 185 Color.RED, // Single, solution by single point positioning 186 Color.CYAN // PPP 187 }; 188 179 189 // user defined heatmap color 180 190 private Color[] heatMapLutColor = createColorLut(0, Color.BLACK, Color.WHITE); … … 188 198 /** Colors (without custom alpha channel, if given) for HDOP painting. **/ 189 199 hdopScale = ColorScale.createHSBScale(256).makeReversed().addTitle(tr("HDOP")); 200 qualityScale = ColorScale.createFixedScale(rtkLibQualityColors).addTitle(tr("Quality")); 190 201 dateScale = ColorScale.createHSBScale(256).addTitle(tr("Time")); 191 202 directionScale = ColorScale.createCyclicScale(256).setIntervalCount(4).addTitle(tr("Direction")); … … 228 239 * Color using a heatmap instead of normal lines 229 240 */ 230 HEATMAP; 241 HEATMAP, 242 /** 243 * Color by quality (RTKLib) 244 */ 245 QUALITY; 231 246 232 247 static ColorMode fromIndex(final int index) { … … 343 358 dateScale.setNoDataColor(neutralColor); 344 359 hdopScale.setNoDataColor(neutralColor); 360 qualityScale.setNoDataColor(neutralColor); 345 361 directionScale.setNoDataColor(neutralColor); 346 362 … … 557 573 velocityScale.setRange(0, colorTracksTune); 558 574 hdopScale.setRange(0, hdoprange); 575 qualityScale.setRange(1, rtkLibQualityColors.length); 559 576 } 560 577 double now = System.currentTimeMillis()/1000.0; … … 586 603 587 604 if (colored == ColorMode.HDOP) { 588 Float hdop = (Float) trkPnt.get(GpxConstants.PT_HDOP); 589 color = hdopScale.getColor(hdop); 605 color = hdopScale.getColor((Float) trkPnt.get(GpxConstants.PT_HDOP)); 606 } else if (colored == ColorMode.QUALITY) { 607 color = qualityScale.getColor((Integer) trkPnt.get(GpxConstants.RTKLIB_Q)); 590 608 } 591 609 if (oldWp != null) { // other coloring modes need segment for calcuation … … 1506 1524 if (colored == ColorMode.HDOP) { 1507 1525 hdopScale.drawColorBar(g, w-30, 50, 20, 100, 1.0); 1526 } else if (colored == ColorMode.QUALITY) { 1527 qualityScale.drawColorBar(g, w-30, 50, 20, 100, 1.0); 1508 1528 } else if (colored == ColorMode.VELOCITY) { 1509 1529 SystemOfMeasurement som = SystemOfMeasurement.getSystemOfMeasurement(); -
trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java
r14153 r15247 65 65 private final JRadioButton colorTypeDirection = new JRadioButton(tr("Direction (red = west, yellow = north, green = east, blue = south)")); 66 66 private final JRadioButton colorTypeDilution = new JRadioButton(tr("Dilution of Position (red = high, green = low, if available)")); 67 private final JRadioButton colorTypeQuality = new JRadioButton(tr("Quality (RTKLib only, if available)")); 67 68 private final JRadioButton colorTypeTime = new JRadioButton(tr("Track date")); 68 69 private final JRadioButton colorTypeHeatMap = new JRadioButton(tr("Heat Map (dark = few, bright = many)")); … … 249 250 colorGroup.add(colorTypeDirection); 250 251 colorGroup.add(colorTypeDilution); 252 colorGroup.add(colorTypeQuality); 251 253 colorGroup.add(colorTypeTime); 252 254 colorGroup.add(colorTypeHeatMap); … … 257 259 colorTypeDilution.setToolTipText( 258 260 tr("Colors points and track segments by dilution of position (HDOP). Your capture device needs to log that information.")); 261 colorTypeQuality.setToolTipText( 262 tr("Colors points and track segments by RTKLib quality flag (Q). Your capture device needs to log that information.")); 259 263 colorTypeTime.setToolTipText(tr("Colors points and track segments by its timestamp.")); 260 264 colorTypeHeatMap.setToolTipText(tr("Collected points and track segments for a position and displayed as heat map.")); … … 277 281 add(colorTypeDirection, GBC.eol().insets(40, 0, 0, 0)); 278 282 add(colorTypeDilution, GBC.eol().insets(40, 0, 0, 0)); 283 add(colorTypeQuality, GBC.eol().insets(40, 0, 0, 0)); 279 284 add(colorTypeTime, GBC.eol().insets(40, 0, 0, 0)); 280 285 add(colorTypeHeatMap, GBC.std().insets(40, 0, 0, 0)); … … 341 346 ExpertToggleAction.addVisibilitySwitcher(colorTypeDirection); 342 347 ExpertToggleAction.addVisibilitySwitcher(colorTypeDilution); 348 ExpertToggleAction.addVisibilitySwitcher(colorTypeQuality); 343 349 ExpertToggleAction.addVisibilitySwitcher(colorTypeHeatMapLowerLimit); 344 350 ExpertToggleAction.addVisibilitySwitcher(colorTypeHeatMapLowerLimitLabel); … … 445 451 case 4: colorTypeTime.setSelected(true); break; 446 452 case 5: colorTypeHeatMap.setSelected(true); break; 453 case 6: colorTypeQuality.setSelected(true); break; 447 454 default: Logging.warn("Unknown color type: " + colorType); 448 455 } … … 525 532 } else if (colorTypeHeatMap.isSelected()) { 526 533 Config.getPref().putInt("draw.rawgps.colors"+layerNameDot, 5); 534 } else if (colorTypeQuality.isSelected()) { 535 Config.getPref().putInt("draw.rawgps.colors"+layerNameDot, 6); 527 536 } else { 528 537 Config.getPref().putInt("draw.rawgps.colors"+layerNameDot, 0); -
trunk/src/org/openstreetmap/josm/io/OsmServerLocationReader.java
r14687 r15247 62 62 TASKING_MANAGER("https?://.*/api/v\\p{Digit}+/project/\\p{Digit}+/tasks_as_gpx?.*"), 63 63 64 /** External GPX script */ 64 65 EXTERNAL_GPX_SCRIPT("https?://.*exportgpx.*"), 66 /** External GPX file */ 65 67 EXTERNAL_GPX_FILE ("https?://.*/(.*\\.gpx)"); 66 68 … … 116 118 public OsmServerLocationReader(String url) { 117 119 this.url = url; 120 } 121 122 /** 123 * Returns the URL to fetch 124 * @return the URL to fetch 125 * @since 15247 126 */ 127 public final String getUrl() { 128 return url; 118 129 } 119 130 -
trunk/src/org/openstreetmap/josm/io/nmea/NmeaReader.java
r15018 r15247 213 213 } 214 214 215 /** 216 * Returns the number of coordinates that have been successfuly read. 217 * @return the number of coordinates that have been successfuly read 218 */ 215 219 public int getNumberOfCoordinates() { 216 220 return ps.success; -
trunk/src/org/openstreetmap/josm/io/session/GpxTracksSessionImporter.java
r12671 r15247 15 15 import org.openstreetmap.josm.gui.io.importexport.GpxImporter; 16 16 import org.openstreetmap.josm.gui.io.importexport.NMEAImporter; 17 import org.openstreetmap.josm.gui.io.importexport.RtkLibImporter; 17 18 import org.openstreetmap.josm.gui.layer.GpxLayer; 18 19 import org.openstreetmap.josm.gui.layer.Layer; … … 48 49 if (NMEAImporter.FILE_FILTER.acceptName(fileStr)) { 49 50 importData = NMEAImporter.loadLayers(in, support.getFile(fileStr), support.getLayerName(), null); 51 } else if (RtkLibImporter.FILE_FILTER.acceptName(fileStr)) { 52 importData = RtkLibImporter.loadLayers(in, support.getFile(fileStr), support.getLayerName(), null); 50 53 } else { 51 54 importData = GpxImporter.loadLayers(in, support.getFile(fileStr), support.getLayerName(), null, progressMonitor); -
trunk/src/org/openstreetmap/josm/tools/ColorScale.java
r12538 r15247 22 22 private ColorScale() { 23 23 24 } 25 26 /** 27 * Gets a fixed color range. 28 * @param colors the fixed colors list 29 * @return The scale 30 * @since 15247 31 */ 32 public static ColorScale createFixedScale(Color[] colors) { 33 ColorScale sc = new ColorScale(); 34 sc.colors = Utils.copyArray(colors); 35 sc.setRange(0, colors.length - 1); 36 sc.addBounds(); 37 return sc; 24 38 } 25 39
Note:
See TracChangeset
for help on using the changeset viewer.