help with split gps response

Hello ,
I'm using the SIM808 arduino zero
I'm getting the GPS reaply
but I want to "cut" it and get just 3 items ut of it not the all 21

how can I split it ?
the save string is :

UGNSINF: 1,1,20200709150851.000,45.098578,5.861625,16.100,0.06,345.9,1,,0.9,1.7,1.5,,11,11,,,43,,

and I want to get the
lat= 45.098578
long = 5.861625
speed = 0.06
sat = 11

is there any way to cut it according to "," and place?

Thanks ,

I recommend using either the TinyGPS++ or the neoGPS library.

However, if you just want to process C-strings (zero terminated character arrays), the strtok() function works as advertised.

I have try ,
but I think that this is not for the SIM808 breakboard
becaue when I get a replay , I get it directly from the modem
maybe I miisng something ?

this is what I have now (without tinygps \ NeoGPS) :

#include<stdio.h>
#include<string.h>
#define DEBUG false

int POWER_KEY = 9;
bool SIM808_ON = false;

String answer = "";
int answer_size = 0;
String CIPSEND = "";

void setup()
{

  pinMode(POWER_KEY, OUTPUT);
  //********Turn on SIM808 when power up*********
  digitalWrite(POWER_KEY, HIGH);
  delay(1000);
  digitalWrite(POWER_KEY, LOW);

  SerialUSB.begin(115200);
  delay(2000);

  //  while (!SerialUSB) {
  //    delay(50); // wait for Arduino Serial Monitor to connect the port
  //  }


  SerialUSB.println("Start to run! V1 ");
  Serial1.begin(115200);

  //********check open************
  sendData("AT", 1000, DEBUG);
  delay(1000);
  //******************************

  //********if SIM808 off, turn on it*********
  if (!SIM808_ON)
  {
    digitalWrite(POWER_KEY, LOW);
    delay(3000);
    digitalWrite(POWER_KEY, HIGH);
    SerialUSB.println("Turn on SIM808");
    delay(10000);
  }

  //GPS test

  sendData("AT+CGNSPWR=1", 1000, DEBUG);//GNSS POWER CONTROL ON
  delay(1000);
  sendData("AT+CGNSSEQ=\"RMC\"", 1000, DEBUG);//
  delay(1000);

  //GSM/GPRS test

  sendData("AT+CCID", 1000, DEBUG);//get SIM number
  delay(1000);
  sendData("AT+CSTT=internet", 1000, DEBUG);// Setup APN
  delay(1000);
  sendData("AT+CGATT=1", 1000, DEBUG);// connected to the GPRS network
  delay(1000);
  sendData("AT+CIICR", 1000, DEBUG);// connected to the GPRS network
  delay(1000);
  sendData("AT+CIFSR", 1000, DEBUG);// Show IP address
  delay(1000);
  sendData("AT+CIPSTART=UDP,1.2.3.4,5678", 1000, DEBUG);//
  delay(1000);
  sendData("AT+CIPSEND=3", 1000, DEBUG);//
  delay(1000);
  sendData("ON!\n\r", 1000, DEBUG);
  delay(1000);
  sendData("AT+CIPCLOSE", 1000, DEBUG);//
  delay(1000);
  answer  = sendData("AT+CGNSINF", 1000, DEBUG);//
  delay(1000);
  SerialUSB.println(answer); 

}

the startup is working
I can see it get a IP , and show me the GPS location
but how do I use tinygps \ NeoGPS?

what do I need to change \ save in another way ?

I have try may ways - all of them didn't pass the compiler

I have try to run even sometime more easy\simple
and run substing according to the start of the answer which is ":"
and save only this

answer = sendData("AT+CGNSINF", 1000, DEBUG);// get GPS data
  delay(1000);
  int GPS_Data_Start = answer.indexOf(':');
  answer = answer.substring(GPS_Data_Start);
  answer_size = answer.length();
  SerialUSB.println("the replay from the modem was - \n\r");
  SerialUSB.println(answer);
  SerialUSB.println("the size is - \n\r");
  SerialUSB.println(answer_size);

but it print me the same thing

the replay from the modem was - 


AT+CGNSINF

+CGNSINF: 0,,,,,,,,,,,,,,,,,,,,

OK

the size is - 


52

can you see what I did wrong ?

I thought and I will send the all answer and run the gps analysis in my server

Thanks ,

Tiny GPS supports these sentences as standard;

#define _GPRMCterm "GPRMC"
#define _GPGGAterm "GPGGA"
#define _GNRMCterm "GNRMC"
#define _GNGGAterm "GNGGA"

It can read other sentences but you would need to define a custom extraction. The sentence would need to start with a '$' I expect.

I have found the problem
the SIM808 didn't reset and uplaod the code.....

now it's working

thank you