eltorio / RtkGps

Playing with rtklib on android
Other
214 stars 102 forks source link

App crashes after FLOAT #19

Open geomoes opened 6 years ago

geomoes commented 6 years ago

Hi, I actually started with the u-blox NEO M8T chip from Drotek. I use the M8T as rover and get precise positioning using Rtklib with officially provided RTCM (2.0) data as base. My device uses a Bluetooth modul (HC-05) to connect wireless to a PC or tablet. On a PC (Win 10) I've installed the customized version of Rtklib (demo5 version from www.rtkexplorer.com), which is a adapted version of the 2.4.3 b29. This works fine with the M8T and I get a FIX and precision down to 2cm.

On my Android tablets I use the same configuration (with identical start/stop commands) with RTKGps+ (vers. 1.0 alpha 26). After pairing with the M8T, the app shows the satellites from the rover. As long as there is no FLOAT, the satellite columns are displayed only outlined, but not filled with colours. When the app changes to FLOAT, the satellite columns are colored, but the app crashes after a few seconds.

I'm using the app on a HUAWEI M3, Android 7.0 the chip is a u-blox NEO M8T I'm sending the following start / stop (provided by rtkexplorer.com):

# Set sample rate low while configuring receiver
!UBX CFG-RATE 1000 1 1

# turn on UBX RXM-RAWX messages on UART
!UBX CFG-MSG 2 21 0 1 0 0 0 0

# turn on UBX RXM-SFRBX messages on UART
!UBX CFG-MSG 2 19 0 1 0 0 0 0

# turn on UBX TIM TM2 messages on UART
!UBX CFG-MSG 13 3 0 1 0 0 0 0

# GNSS system settings
# set GPS 8-16 channels on
!UBX CFG-GNSS 0 32 32 1 0 8 16 0 65537
# set SBAS 1-3 channels on
!UBX CFG-GNSS 0 32 32 1 1 1 3 0 65537
# set Galileo 4-8 channels on
!UBX CFG-GNSS 0 32 32 1 2 4 8 0 65537
# set BeiDou 8-16 channels off
!UBX CFG-GNSS 0 32 32 1 3 8 16 0 0
# set IMES 0-8 channels off
!UBX CFG-GNSS 0 32 32 1 4 0 8 0 0
# set QZSS 0-3 channels off
!UBX CFG-GNSS 0 32 32 1 5 0 3 0 0
# set GLONASS 8-14 channels on
!UBX CFG-GNSS 0 32 32 1 6 8 14 0 65537

# change NAV5 stationary mode to pedestrian
!UBX CFG-NAV5 1 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

# turn off extra messages default messages
# NMEA GGA
!UBX CFG-MSG 240 0 0 0 0 0 0 0
# NMEA GLL
!UBX CFG-MSG 240 1 0 0 0 0 0 0
# NMEA GSA
!UBX CFG-MSG 240 2 0 0 0 0 0 0
# NMEA GSV
!UBX CFG-MSG 240 3 0 0 0 0 0 0
# NMEA RMC
!UBX CFG-MSG 240 4 0 0 0 0 0 0
# NMEA VTG
!UBX CFG-MSG 240 5 0 0 0 0 0 0
# NMEA ZDA
!UBX CFG-MSG 240 8 0 0 0 0 0 0
!UBX CFG-MSG 1 3 0 0 0 0 0 0
!UBX CFG-MSG 1 3 0 0 0 0 0 0
!UBX CFG-MSG 1 6 0 0 0 0 0 0
!UBX CFG-MSG 1 18 0 0 0 0 0 0
!UBX CFG-MSG 1 34 0 0 0 0 0 0
!UBX CFG-MSG 1 48 0 0 0 0 0 0
!UBX CFG-MSG 3 15 0 0 0 0 0 0
!UBX CFG-MSG 3 16 0 0 0 0 0 0
!UBX CFG-MSG 12 16 0 0 0 0 0 0
!UBX CFG-MSG 12 49 0 0 0 0 0 0
!UBX CFG-MSG 12 52 0 0 0 0 0 0
!UBX CFG-MSG 04 02 0 0 0 0 0 0
!UBX CFG-MSG 10 38 0 0 0 0 0 0

@
!UBX CFG-RATE 1000 1 1

In the RtkGps folder on my tablet I have a rtkgps_...trace file with the following errors:

1     0.006: setsock: setsockopt error 3 sock=49 err=95
1     1.849: setsock: setsockopt error 3 sock=56 err=9
eltorio commented 6 years ago

Dear Geomoes, First usually when sat are not filled with colors, it is because you do not have the current ephemeris. Try to use precise and download ESA ephemeris from the tool menu while running. Second before using RTK with base and rover, try only with Rover and PPP static algorithm.

Next could you provide the crash log?

geomoes commented 6 years ago

Dear eltorio, i've tried the configuration above. The satellites stay outlined even with 'ESU Precise ephemeris from ESA' checked (Before I used Broadcast-Ephemerids). The app keeps running without crashing.

eltorio commented 6 years ago

ESU Precise… is not enough While running you need to inject the ephemeris with the small menu on the top right , next tools and download and inject … ephemeris. If you already download them and no new exist they are automatically injected, but you can still do it manually

eltorio commented 6 years ago

For the crash you are speaking 1st, I think when you get the ephemeris downloaded OK (via broadcast). You get a FLOAT lock, and it crash could you retrieve the android crash log?

geomoes commented 6 years ago

OK, in the menu I only see the option to load and use the IGS ultra-rapid ephemeris (500 kB). I downloaded them and now a few satellites are colored (my M8T is configured to use GPS, GLONASS and GALILEO). Still looking where to find the android device log. The app now crashes when more than 5 satellites are colored (I suppose these are the satellites with a good signal, that can be used by thhe app?).

eltorio commented 6 years ago

Obviously I don't have the same crash! Colorored sat means OK for use (good elevation/ good snr / ephemeris OK) ESU ephemeris does not include predicted ephemeris for other constellations than GPS (I think) so probably you have some Galileo and Glonass SV without ephemeris.

geomoes commented 6 years ago

I don't know if that helps, but here is the last .trace file related to the crash reported above.

1     0.010: setsock: setsockopt error 3 sock=79 err=95
1     2.273: setsock: setsockopt error 3 sock=85 err=95

It's strange, but I use the same configuration with MapGis - NTRIP-client, which is also based mainly on Rtklib (version 2.4.3 b29) without any issues.

geomoes commented 5 years ago

Hi, finally I got it to work properly. The problem was, that I had to choose rtkgps+ as mock location service provider in developer option before run rtkgps+.

kolesar-andras commented 4 years ago

Same issue here. App crashes when mock location reporting fails. It happens on the first solution, no matter if it is float, static, whatever.