tomojitakasu / RTKLIB

2.43k stars 1.56k forks source link

Post-processing DGPS #458

Open farbro opened 5 years ago

farbro commented 5 years ago

In order to evaluate a DGPS implementation in Android I need to post-process the raw data.

I have the following log files:

I need to be able to post-process this but have not succeeded. I have tried two different methods:

Option 1: convbin and rnx2rtkp.

I am able to convert the receiver data to RINEX through convbin, but the correction data yields no output. Is correction data not supported in RINEX? Running it in single mode with only the observation data and ephemeris data in gives me a valid solution, but is there another way to include the corrections?

Option 2: rtkrcv with file input

I can run rtkrcv and input the raw observation data and the raw RTCM2 correction data, but this time it does not support the RINEX navigation data. I have tried implementing my own command in rtkrcv that reads the RINEX file using readrnxt, and I got it working, but as soon as the server is started all data is wiped out. Is there a smarter way around this?

Thanks.

tomojitakasu commented 5 years ago

RTKLIB supports MT 1/9, 3, 14, 16, 17, 18, 19 and 22 for RTCM2. However, the current version (2.4.2 or 2.4.3) does not support MT 1/9 PRC/RRC DGPS corrections for both PP (post-processing) and RT (real-time) modes. These MT were just for expansion and may not be used even in future versions. (RTCM2 is older and legacy messages which are going to be replaced by newer RTCM3) Anyway, RINEX also does not support PRC/RRC DGPS corrections.

DavidKelleySCSC commented 5 years ago

To be just a bit nit-picky, RTCM2 is not dead just yet, What will become 2.4 when issued is still in development and will have new message extending 1/9 to provide code corrections for other GNSS types not yet covered. Some folks operating in the marine environment are keen to get that and for various reasons cannot use RTK forms.

farbro commented 5 years ago

I see. The Swedish mapping agency recently made their DGNSS service available for free to the public, and they are using RTCM2 so that is out of my control. How much work is it to implement this? I would be happy to try. Is it already supported for RTCM3? Is it a good idea to look at how it's done there? Any hints on where to start?

qxang commented 4 years ago

@farbro how do you convert android gnss measurement log to rinex format?

farbro commented 4 years ago

@farbro how do you convert android gnss measurement log to rinex format?

I implemented a custom format for Android in a fork of RtkGps+ and RTKLIB. Then I used convbin to convert it to RINEX.

anumerico commented 4 years ago

@farbro Custom format? Will your modified RTKLIB convbin work with gnsslogger app logs? Or does the logging have to be done with your modified RTKGps+?

farbro commented 4 years ago

@anumerico It's been a long time since I worked with this, but I'll try to remember. The custom format is a data structure with raw data fetched from the Android API and streamed from RtkGps+ to a socket. See InternalReceiverToRtklib.java#L75 . An identical data structure is implemented in RTKLIB in android.h which then listens to the socket, parses the data and calculates the pseudoranges.

I did not use gnsslogger at all. My modified convbin will work with the logs created by my fork of RtkGps+.

anumerico commented 4 years ago

@farbro What would it take for it to be able to process gnsslogger logs? That format seems to be the standard for Gnss raw logs in android. Im trying to use convbin for converting android raw gnss logs to Rinex, and trying to figure out how to extend convbin to support that. Will just changing android.h and android.c to that structure:

(#Raw,ElapsedRealtimeMillis,TimeNanos,LeapSecond,TimeUncertaintyNanos,FullBiasNanos,BiasNanos,BiasUncertaintyNanos,DriftNanosPerSecond,DriftUncertaintyNanosPerSecond,HardwareClockDiscontinuityCount,Svid,TimeOffsetNanos,State,ReceivedSvTimeNanos,ReceivedSvTimeUncertaintyNanos,Cn0DbHz,PseudorangeRateMetersPerSecond,PseudorangeRateUncertaintyMetersPerSecond,AccumulatedDeltaRangeState,AccumulatedDeltaRangeMeters,AccumulatedDeltaRangeUncertaintyMeters,CarrierFrequencyHz,CarrierCycles,CarrierPhase,CarrierPhaseUncertainty,MultipathIndicator,SnrInDb,ConstellationType,AgcDb,CarrierFrequency)

,make it work?

Otherwise, is your custom format better optimized for feeding it to RTKLIB somehow? Also see your program has 40 fields vs 30 from the raw gnsslogger..

farbro commented 4 years ago

@anumerico I focused on realtime processing with RTKLIB and the post-processing this thread is about would just make it easier for me to debug and analyze.

I know nothing about the structure of GnssLogger logs, but it is probably not that easy. For starters, I was dealing with binary data while you probably need to parse ASCII. Second, I adapted the format in RtkGps+ to fit well the internal structures of RTKLIB. For example, each measurement block comes with an arbritary number of observations. so the data structure is not flat. My custom format is definitely better optimized for RTKLIB - it is tailored for it.

Most of the fields were not implemented, at least not on the Nexus 5 I was developing for.

I pointed you to the wrong branch of RTKLIB before, here is the most recent one: https://github.com/farbro/RTKLIB/blob/mats/src/rcv/android.c I will try to find time to clean up among the branches soon.

watch4thesky commented 3 years ago

@farbro Hi, did you ever implement this feature (or find another solution)? I'm also interested in making some tests with the DGNSS RTCM2 from the Swedish mapping agency!

farbro commented 3 years ago

@watch4thesky Unfortunately not, I ran out of time with this and I didn't look for another solution. But it's still very interesting, please notify me if you make any progress yourself.

yxw027 commented 3 years ago

@farbro would you like to provide the the APP of the rtkgps with InternalReceiverSupport, can it work now?