How to get GPS velocity NED?

Hello guys,

How to get GPS NED velocity,as follow?

float32 vel_n_m_s # GPS North velocity, (metres/sec)
float32 vel_e_m_s # GPS East velocity, (metres/sec)
float32 vel_d_m_s # GPS Down velocity, (metres/sec)

I know the float32 vel_m_s # GPS ground speed, (metres/sec) ;
but I can’t get NED velocity from GPS.


@1102sc What do you mean by “you can’t get it”? Is is always zero?
The gps message has exactly the fields you are looking for.

I want to get the gps NED velocity through NEMA Deal, but there are lattitude、longitude、altitude and time from GPS.
I know that the UBX Deal can do it , but I don’t get UBX Deal.

Does these parameter (vx, vy, vz) from GLOBAL_POSITION_INT is a velocity in GPS coordinate?, If yes, how to convert these value to NED coordinate and Is it accuracy better than velocity from HIGHRES_IMU (xacc, yacc, zacc)?.

The velocities in GLOBAL_POSITION_INT are in NED frame, as stated in your link.
xacc, yacc, zacc in HIGHRES_IMU are accelerations, not velocities.


Thank you so much @Nicolas, I have tried to convert the velocity from GPS to acceleration using formula a = Δv / Δt, the result is totally different from HIGHRES_IMU acceleration. Am I using a wrong formula?

I am searching for the way to get the most accurate acceleration. Is there any possible solution to obtain acceleration which more accurate than HIGHRES_IMU message.

Both the IMU data and the discrete derivative of the velocity estimate will be quite noisy.
Have you tried plotting the results? I’m assuming you’re using more data than you showed here, I would use several hundred samples.
Does this dataset contain significant accelerations? If so, I would expect that you see the two correlate.

1 Like

I have tried plotting the result for 600 samples, as in the graph below:

xacc is acceleration on x axis from HIGHRES_IMU message, and gpsxacc is acceleration converted from velocity(vx) from GLOBAL_POSITION_INT. In the graph, at some periods of time, the both data are contrast together. Is this because of noise? or is it relate to the coordination of both messages as I understand so far both are the same local NED. and Is there any possible solution for the discrete derivative of the velocity estimate with less noise than the simple one I’m using now.

Sorry for asking you so many questions, I’m not engineering, I still have some trouble to find and understand maths myself. Thank you for your kindly help. :slight_smile:

You don’t have a lot of excitement in these signals. Are you moving the vehicle around significantly?
Also remember that the IMU data is in the body frame (X pointing forward of the vehicle) while the GPS data is in NED frame, i.e. your computed X values will point north.

1 Like