RAK5010 GPS format

I can’t change the GPS format.
Of the 3 formats, I want to use the (format: (-) dd.ddddd, (-) ddd.ddddd) display.
You can’t switch from the AT command, or at least I don’t know about it.
I saw that the RAK5205 has an AT command for this.
at + set_config = device: gps_format: X
Is there a solution for this from the AT command on the RAK5010?
Or can you change the firmware so that the query is in (2) format?

The current format, (1) can be interpreted by few sources.
(Lat: 4517.112343, Lon: 1823.707123)
Much more manageable and better known (2)
Lat: 45.237612, Lon: 18.224563

Does anyone know a solution for this?

Thanks in advance.

Hi, RAK5010 just do not support this AT. It supports Quectel AT transparent transmission with all types of GPS.

Hi Nero,

Yes I saw this, but if I create my own firmware, I could change the query format there. Of course, in the sources I do not achieve this, unfortunately.
The BG96 Acquire Positioning Information that the API actually uses can be retrieved in 3 different formats.
If you want to download it on the BG96 port, please also specify the decimal format.
This is AT + QGPSLOC = 2
The base program is likely to retrieve format 1.
I should add a change or change it in the appropriate source.
I don’t know if there is any other option to change this in the BG96 settings. Nor is it guaranteed that the base program will not restore this. :slight_smile:

The solution would be to overwrite the format in the source.
Could this be solved? For example, in gps.c or BG96.c it should be rewritten where this definition can be found.
That would solve my problem with conversions.
Or do you have a better idea?
Could you help with this?


Oh, understand. Actually this is just about upper application. You just need to add below arithmetic in your code after getting gps data.

Longitude and latitude format and conversion of GPS

There are three formats of longitude and latitude: degree, degree minute and degree minute second

  1. ddd. Ddddd ° [degree. Degree format] decimal part (5 digits)

  2. ddd°mm. Mmm '[degree, minute and minute format] decimal part (3 digits)

  3. DDD ° mm ‘Ss’ [format of degrees, minutes and seconds]

Google uses the third format. Minute ‘second’

Degree Minute Conversion:

Convert degree sub unit data to degree unit data

Degree = degree + minute / 60

For example:

Longitude = 116 ° 20.12 ’

Latitude = 39 ° 12.34 ’

Longitude = 116 + 20.12 / 60 = 116.33533 °

Latitude = 39 + 12.34 / 60 = 39.20567 °

Degree minute second conversion:

Convert degree, minute and second unit data to degree unit data

Degrees = degrees + minutes / 60 + seconds / 60 / 60

For example:

Longitude = 116 ° 20’43 "

Latitude = 39 ° 12’37 "

Longitude = 116 + 20 / 60 + 43 / 60 / 60 = 116.34528 °

Latitude = 39 + 12 / 60 + 37 / 60 / 60 = 39.21028 °

Hi Nero,

Sorry, you misunderstand. :slight_smile:
I understand the mechanism of the switch, but I would make it easier to transfer the data.
Why convert coordinates if the device can send in the correct format? It’s just a matter of setup and no need to convert data.
I understand that it can be converted by calculations, but then you need to include a converter when analyzing the data. :slight_smile:
This could be omitted if the device is already sending good data by default, as it is suitable for it.
That would be the simplest solution. :wink:

Or would you have a simple code for this that I can put into sending data definitions?

Sample code:

#include “stdio.h”
#include “string.h”

int ddmm2dd(const char *ddmm, char *dd)


if (NULL == ddmm || NULL == dd)


return -1;


int lenSrc = strlen(ddmm)+1;

int lenMm = 0;

int flag = 1;


char *pcMm;

double dMm;

int iMm;

/* Position PCMM to the decimal point */

pcMm = strstr(dd,".");

if (pcMm == NULL) /* Case without decimal point */


pcMm = dd+strlen(dd)-2;

iMm = atoi(pcMm);

dMm = iMm /60.0;


else /* Case with decimal point */


/* degree */

if (pcMm - dd > 2)


pcMm = pcMm - 2;


else /* just min */


pcMm = dd;

flag = 0;


/* Convert string to floating point number */

dMm = atof(pcMm);

/* Convert minutes to degrees*/

dMm /= 60.0;


/* Converts the converted floating-point number to a string */


if ( flag )


/* Remove the 0 before the decimal point */



/* Retain 6 decimal places*/

pcMm = strstr(dd,".");

lenMm = strlen(pcMm);

if ( lenMm > (6+2))




return 1;


int main()


char ddmm[32];

char dd[32];



if ( ddmm2dd(ddmm,dd) >=0 )

printf("%s \n",dd);


return 0;


1 Like

oo thanks, can you give me some more instructions on where to insert this line of code?
if it can be solved, can you send the file or upload it to github?
I would try right away. :slight_smile:

When you get thee gps data format 1, use this api to transfer the format and then send it. It is based on your app_user code.

i did this, pasted it into user_app but the RUI complier encountered an error.

there may again be a misunderstanding.
I want to use the code so that the data set sent with the at + send = hologram: sensor command already sends the (dd) format.
I can format the data sent in at.c, but I can’t include calculations, or if so, I don’t know how.
I have no separate code for retrieving and translating data in other ways. Can this be solved from the program?

or would there be a way to support the at + set_config = device: gps_format: X command with an update? :slight_smile:

Hi, acctually RUIV2 will not update for now. We are migrating 5010 to RUIV3. I will add your request to RUI team.

Hi Nero,
Thanks in advance.
when is RUI 3 expected?