how do i send string variable through nrf24 nodule using struct data

i received gps location for a smart phone through bluetooth i am stored thes data in a string using following way
/*
void getGPSLocation(){
while (bluetooth.available()) {
delay(10); //small delay to allow input buffer to fill

char c = bluetooth.read(); //gets one byte from serial buffer
if (c == ‘,’) {
break;
} //breaks out of capture loop to print readstring
readString += c;
} //makes the string readString

if (readString.length() >0) {
sensorData.mylat = readString;
readString=""; //clears variable for new input
}
while (bluetooth.available()) {
delay(10); //small delay to allow input buffer to fill

char c = bluetooth.read(); //gets one byte from serial buffer
if (c == ‘,’) {
break;
} //breaks out of capture loop to print readstring
readString += c;
} //makes the string readString

if (readString.length() >0) {
sensorData.mylon = readString;
readString=""; //clears variable for new input
}

}
*/
now i need to send this data through nrf24 module
but the string type data in the struct is not receiving correctly
please any one can correct my program

my transmitter and receiver code is given below

collition_Detection.ino (3.92 KB)

collition_Detectionnewslave.ino (3.9 KB)

how do i send

struct SensorData{ double myAngle; double myrpm; String mylat; String mylon; };

through nrf 24 module

and receive correct data

There is no way to send and receive structs with embedded Strings, or any other entity containing pointers.

Making a second thread for the same question does not help.

@Jishnukkakkodi, please do not cross-post. Threads merged.

It is not a good idea to use the String (capital S) class on an Arduino as it can cause memory corruption in the small memory on an Arduino. This can happen after the program has been running perfectly for some time. Just use cstrings - char arrays terminated with '\0' (NULL).

Put the required text in a char array within your struct

...R Simple nRF24L01+ Tutorial