I want to use GPS to get the speed of movement.

Asked 2 years ago, Updated 2 years ago, 124 views

I would like to use the GPS function of the SPRESENSE main board to obtain the moving speed.
The variables that you might be able to get have a target, but the value remains zero and does not change.
Could you please check if there are any problems with the following methods of acquisition?

 if (Gnss.waitUpdate(-1))
  {
    SpNavDataNavData;
    Gnss.getNavData(&NavData);
    snprintf(StringBuffer, STRING_BUFFER_SIZE, "Sp: %.2f", NavData.velocity/60/60);
    Serial.print (StringBuffer);
  }

The above NavData.velocity value remains 0.

*Other setup etc. are still used as sample sketches
時刻 Information such as time has been obtained
*We have acquired more than 5 satellites

spresense gps

2022-09-30 18:01

2 Answers

I am writing to inform you that I was able to solve myself to some extent.
I also made Michibiki a target, and although it is unstable, I was able to get it
Radio reception may be low

Thank you for your reply.


2022-09-30 18:01

Velocity is in m/s.
Not km/h
Spresense Arduino Library:SpNavData Class Reference

The data in m/s is divided by 3600, so it seems to be quite small


2022-09-30 18:01

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.