Modify

Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#20600 closed enhancement (fixed)

[Patch] Color NMEA and GPX files by "fix" value

Reported by: pyrog Owned by: team
Priority: normal Milestone: 22.03
Component: Core Version: tested
Keywords: NMEA GPX Fix RTK color Cc:

Description

Hi,

NMEA tracks recorded by a RTK receiver already store the fix type (Single, RTK float, RTK fix).
This value is converted to text and stored in GpxConstants.PT_FIX field.

Unfortunately, this field is not used to set the colour of GPX track.
Doing this directly in JOSM would be great feature.

Both RTKLib and NMEA track could "share" the same quality field internally ?

RTK Lib NMEA Meaning
0 0 None ?
1 4 Fix RTK
2 5 Float RTK
3 ? SBAS
4 2 D-GPS
5 1 Single
6 3 PPK

Source: ticket #17829

When you look at a solution in rtkplot, the first thing you look is the points' colors.
The Q value set the color and the default one are:
Q=1 (fix) -> Green
Q=2 (float) -> Orange
Q=3 (sbas) -> Pink
Q=4 (dgps) -> Blue
Q=5 (single) -> Red
Q=6 (ppp) -> Light Blue

Source: NmeaReader.java#L396

// fix
accu = e[GGA.QUALITY.position];
if (!accu.isEmpty()) {
        int fixtype = Integer.parseInt(accu);
        switch(fixtype) {
        case 0:
                currentwp.put(GpxConstants.PT_FIX, "none");
                break;
        case 1:
                if (sat < 4) {
                        currentwp.put(GpxConstants.PT_FIX, "2d");
                } else {
                        currentwp.put(GpxConstants.PT_FIX, "3d");
                }
                break;
        case 2:
                currentwp.put(GpxConstants.PT_FIX, "dgps");
                break;
        case 3:
                currentwp.put(GpxConstants.PT_FIX, "pps");
                break;
        case 4:
                currentwp.put(GpxConstants.PT_FIX, "rtk");
                break;
        case 5:
                currentwp.put(GpxConstants.PT_FIX, "float rtk");
                break;
        case 6:
                currentwp.put(GpxConstants.PT_FIX, "estimated");
                break;
        case 7:
                currentwp.put(GpxConstants.PT_FIX, "manual");
                break;
        case 8:
                currentwp.put(GpxConstants.PT_FIX, "simulated");
                break;
        default:
                break;
        }
}


Attachments (6)

Chambéry - Grenoble.nmea (404.2 KB ) - added by pyrog 4 years ago.
20600.patch (11.8 KB ) - added by Bjoeni 3 years ago.
20600-options.png (2.8 KB ) - added by Bjoeni 3 years ago.
20600-gpsfix.png (2.0 KB ) - added by Bjoeni 3 years ago.
20600-rtklib.png (1.5 KB ) - added by Bjoeni 3 years ago.
20600-v1.1.patch (12.1 KB ) - added by Bjoeni 3 years ago.
fix translation issues and add comments

Download all attachments as: .zip

Change History (18)

by pyrog, 4 years ago

Attachment: Chambéry - Grenoble.nmea added

comment:1 by Don-vip, 4 years ago

Keywords: color added

comment:2 by anonymous, 4 years ago

I support this proposition. Indeed, this is my proposition.

I recorded the attached file using a F9P feed by centipede RTCM stream. NMEA was directly generated by the F9P.

comment:3 by stoecker, 4 years ago

Resolution: worksforme
Status: newclosed

There is already a style to color NMEA data accordingly: Styles/ColourGPSData.

comment:4 by pyrog, 3 years ago

Hi all,

Is it possible to reopen this ticket ?

The Styles/ColourGPSData is working but using it give several issues:

  • The NMEA track must be converted to data layer
  • This process is long with tracks of hundreds of kilometers
  • This layer could be inadvertently merged or uploaded to osm
  • When the data layer is not active, it's become black
  • This process is not homogeneous with the process to colorise a .pos track

Also, the track could be colorise by age, reference station ID, standard deviation of horizontal error (see #21007)

comment:5 by Eric_S, 3 years ago

I support the re-openning of this ticket, at least to have homogeneous behaviour with .pos files.

comment:6 by Bjoeni, 3 years ago

Milestone: 22.03
Resolution: worksforme
Status: closedreopened
Summary: Customise NMEA track drawing by Quality[Patch] Color NMEA and GPX files by "fix" value
Version: tested

Patch:

  • color option for "fix" value from *.nmea and from *.gpx files
  • read "fix" value from *.gpx files
  • display names for RTKLib quality values

I think it's been established in the various tickets why the "ColourGPSData" style is good for some use cases but can't replace a coloring option, that's why I wrote this patch.

This means that for now there would be two coloring options, one for GPS fix values and one for the RTKLib quality values:

GPS fixRTKLib quality

As suggested by pyrog, I too think it might actually make sense to put them together in one option at some point in the future (that probably means: converting RTKLib quality values to GPS fix values because there are more options) but I don't know enough about RTKLib values to say which ones are actually comparable/directly convertible.

The colors are pretty much random at this point, suggestions are welcome.

Followup tickets:

  • #21007 - Import more data from NMEA GNSS tracks
  • #21932 - Save NMEA / RTKLib values as extensions in .gpx files
  • #21933 - Customization of GPS drawing options

by Bjoeni, 3 years ago

Attachment: 20600.patch added

by Bjoeni, 3 years ago

Attachment: 20600-options.png added

by Bjoeni, 3 years ago

Attachment: 20600-gpsfix.png added

by Bjoeni, 3 years ago

Attachment: 20600-rtklib.png added

comment:7 by Bjoeni, 3 years ago

Ticket #13484 has been marked as a duplicate of this ticket.

comment:8 by Bjoeni, 3 years ago

Ticket #20601 has been marked as a duplicate of this ticket.

comment:9 by Bjoeni, 3 years ago

Ticket #21810 has been marked as a duplicate of this ticket.

comment:10 by Bjoeni, 3 years ago

Ticket #21928 has been marked as a duplicate of this ticket.

by Bjoeni, 3 years ago

Attachment: 20600-v1.1.patch added

fix translation issues and add comments

comment:11 by stoecker, 3 years ago

Resolution: fixed
Status: reopenedclosed

In 18396/josm:

fix #20600 - add Fix coloring for NMEA, patch by Bjoeni

comment:12 by Eric_S, 3 years ago

Successfully checked with April update.

Thanks.

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.