tomojitakasu / RTKLIB

2.58k stars 1.63k forks source link

Speed computation with RTKPost #425

Open alelotti96 opened 6 years ago

alelotti96 commented 6 years ago

Hi, I'm new to RTKLib and I'm trying to compute the speed of a rover from data that has been collected through a Novatel OEM6 receiver. I've converted the logs to a RINEX file with Novatel Convert and I've been able to compute the rover position with RTKPost but I can't find the way to compute also the speed of the rover. Do you have any suggestions?

DavidKelleySCSC commented 6 years ago

When RTKLIB runs the navigation filter it is already determining (estimating) those products for you. Just look at the "Soution 1" (for a csv list) or "Solution 2" (for NMEA sentences) in the RTK Monitor panel, perhaps that has for format you are looking for. Press that little tiny rectangle in the bottom left of the RTKNAVI and a whole word for various reports will appear to you. You can pipe this data to a file or to a port and get at it that way.

alelotti96 commented 6 years ago

Thank you for your answer. I've been unable to setup and use correctly RTKNAVI, is there the possibility to access speed information from RTKPOST that is currently working well for what concern the position?

DavidKelleySCSC commented 6 years ago

I am not sure what you really want there, and there do seem to be a lot of formats (which I have not tried)

But I presume you now get an output like this:

% (lat/lon/height=WGS84/ellipsoidal,Q=1:fix,2:float,3:sbas,4:dgps,5:single,6:ppp,ns=# of satellites)
%  GPST                  latitude(deg) longitude(deg)  height(m)   Q  ns   sdn(m)   sde(m)   sdu(m)  sdne(m)  sdeu(m)  sdun(m) age(s)  ratio
2018/02/02 16:27:11.000   42.275846465   27.735134153    73.4772   5   7   4.2478   2.6131   9.6670  -2.4867   3.8336  -5.7200   0.00    0.0
2018/02/02 16:27:12.000   42.275846243   27.735133847    73.5246   5   7   4.2475   2.6133   9.6662  -2.4869   3.8340  -5.7196   0.00    0.0
2018/02/02 16:28:40.000   42.275843205   27.735130789    72.8379   5   7   4.2218   2.6361   9.5897  -2.5095   3.8627  -5.6775   0.00    0.0
2018/02/02 16:28:42.000   42.275843575   27.735130605    72.7578   5   7   4.2212   2.6366   9.5877  -2.5100   3.8632  -5.6764   0.00    0.0

But want something more like NMEA as in be below (this is a base station so movement is all zero)

$GPRMC,162653.00,A,4216.5507879,N,02744.1080492,E,0.00,0.00,020218,0.0,E,A*3A
$GPGGA,162653.00,4216.5507879,N,02744.1080492,E,1,07,1.0,35.398,M,38.079,M,0.0,*73
$GPRMC,162654.00,A,4216.5507746,N,02744.1080308,E,0.00,0.00,020218,0.0,E,A*3A
$GPGGA,162654.00,4216.5507746,N,02744.1080308,E,1,07,1.0,35.445,M,38.079,M,0.0,*74
$GPRMC,162822.00,A,4216.5505923,N,02744.1078473,E,0.00,0.00,020218,0.0,E,A*36
$GPGGA,162822.00,4216.5505923,N,02744.1078473,E,1,07,1.0,34.759,M,38.079,M,0.0,*77
$GPRMC,162824.00,A,4216.5506145,N,02744.1078363,E,0.00,0.00,020218,0.0,E,A*3D
$GPGGA,162824.00,4216.5506145,N,02744.1078363,E,1,07,1.0,34.679,M,38.079,M,0.0,*7F
$GPRMC,162827.00,A,4216.5506332,N,02744.1078693,E,0.00,0.00,020218,0.0,E,A*36

If that is the case, go to the setup dialog and make sure you have selected a nmea file.

image

Then go to the Options dialog and Make to select solution format nmea as well. To repeat, there seem to be a lot of patterns here I have never used.

image

alelotti96 commented 6 years ago

Hi, sorry for my delay and thank you for your support. However I still have the same problem. I'll try to explain it better. When I run RTKPOST I obtain an output log that is very similar at yours. What I can't see here are the components of the velocity of the rover. When I hit the plot button and the choose "velocity" in the top left corner, i get this graph: image But I can't see those information in the log, is there a way to get them?

DavidKelleySCSC commented 6 years ago

Okay, try this then. Perhaps the format "Solution Status" will serve your needs? It outputs the following string with this data.

> * $VELACC,week,tow,stat,vele,veln,velu,acce,accn,accu,velef,velnf,veluf,accef,accnf,accuf
> *          week/tow : gps week no/time of week (s)
> *          stat     : solution status
> *          vele/veln/velu    : velocity e/n/u (m/s) float
> *          acce/accn/accu    : acceleration e/n/u (m/s^2) float
> *          velef/velnf/veluf : velocity e/n/u (m/s) fixed
> *          accef/accnf/accuf : acceleration e/n/u (m/s^2) fixed
> *

Look at the file rtkpos.c for more detail. This is the same data as was used to create your plot, I believe. But the plot begs the question of how did you create data with a 5k m/s speeds in a circle? This is more than the Doppler of the SVs. Is this a Novatel test tool?

UPDATE: I just noticed this option is not available on POST, only on Navi. Does anyone know how to enable the same output in the post processing side?

DavidKelleySCSC commented 6 years ago

Duh on me! In the POST tool, Under Options, under the Output tab, enable the Output Solution Status combo box to be 'State" and you will get a text output file called xxx.pos.stat with the data mentioned in my post above. [Below fragment is for a fixed base]

$VELACC,2012,259219.000,5,0.0000,0.0000,0.0000,0.00000,0.00000,0.00000,0.0000,0.0000,0.0000,0.00000,0.00000,0.00000
$CLK,2012,259219.000,5,1,7.973,7.881,0.000,0.000,0.00
$POS,2012,259220.000,5,4309022.7298,1967620.9335,4257026.0855,0.0000,0.0000,0.0000
alelotti96 commented 6 years ago

I've been able to get the data, the only bad luck is that also setting the solution format in ECEF the velocity is computed in ENU. I'll try to make the conversion through a MATLAB function.

The values are so high because the data I'm working on come from a simulation for a university nanosatellite project. Thank you very much for your support!

alelotti96 commented 6 years ago

I tried to make the conversion but the results that I get mismatch with the one that I get with a quite accurate MATLAB model... This is the log:

$POS,1959,173400.000,5,-4255826.8077,-563386.7294,5498917.8955,0.0000,0.0000,0.0000 $VELACC,1959,173400.000,5,-1969.9180,-7379.9449,-6.1468,0.00000,0.00000,0.00000,0.0000,0.0000,0.0000,0.00000,0.00000,0.00000

The position is excellent. Is there a method to get the velocity directly in ECEF? So that I can exclude for sure any error in the conversion script.

goamberg commented 5 years ago

@alelotti96 I have also a similar problem with needing ECEF velocity (Vx,Vy,Vz) Did you solve the problem for you in the end?