Add id to raw data in an array I am working on an Arduino project, where I am transmitting GPS data between two Arduinos. This code can transmit the raw GPS data: 

int a = Serial1.available(); 
if(a){
    uint8_t hej[a]; 
    for(int i=0; i&lt;a; i++){
        hej[i] = Serial1.read(); 
    }

    rf95.send(hej, a);
}


I need to be able to identify the device that's transmitting the data. This can be in form of an integer value. I have tried to add a value to the array, but that messes up the data when I receive it. 
Is there a simple way to add an ID to the data I am transmitting?
I would suggest:


Use a library (TinyGPS++ for example) to read the GPS data and extract just what you want.
Use a struct to craft a packet that you can send over bluetooth, or send the data as a textual representation, depending on your needs.


For a struct you can:

struct packet {
    uint8_t id;
    float latitude;
    float longitude;
};

struct packet myPacket;
myPacket.id = 32; // Unique ID
myPacket.latitude = gps.getLatitude(); // Whatever function call here
myPacket.longitude = gps.getLongitude(); // or whatever
rf95.send((uint8_t *)&amp;myPacket, sizeof(struct packet));