Problema al unir el codigo para sim900 y neo6m

Buenos dias amigos que tal necesito ayuda con arduino uno, tengo un codigo que uso el neo6m y el sim900 con arduino uno. el problema es que cuando ejecuto solo el del gps me sale ok si ejecuto para llamada o sms me sale ok. pero cuando los junto y pongo primero el codigo del llamada y sms y luego el del gps , solo me reconoce el del llamada y sms. pero cuando pongo primero el del gps y luego el del llamada y sms me envia el no me envia el mensaje ami celular pero si me muestra en el monitor serial y no me reconoce el gps la latitud y longitud. espero que me hayan entendido grupo. gracias

// Aqui les dejo mi codigo

// -- falta desactivar comentario para que envie sms
#include <TinyGPS++.h>
#include <SoftwareSerial.h>

// -- VARIABLES NECESARIOS
String num_cel_sim900 = "xxxxxxxxx";
String num_cel_alerta = "xxxxxxxxx";
double latitud = 0.0;
double longitud = 0.0;
// --

char inchar; // Will hold the incoming character from the GSM shield
SoftwareSerial mySerial(7, 8);

int numring = 0;
int comring = 1;
int onoff = 0; // 0 = off, 1 = on

// -- GPS
static const int RXPin = 4, TXPin = 3;
static const uint32_t GPSBaud = 9600;
// The TinyGPS++ object
TinyGPSPlus gps;
// The serial connection to the GPS device
SoftwareSerial ss(RXPin, TXPin);
// --

void setup()
{
Serial.begin(9600);

// -- LLAMADAS
// set up the digital pins to control
pinMode(12, OUTPUT);
pinMode(13, OUTPUT); // LEDs - off = red, on = green
digitalWrite(12, HIGH);
digitalWrite(13, LOW);
// wake up the GSM shield
mySerial.begin(9600);
mySerial.print("AT+CLIP=1\r"); // turn on caller ID notification
delay(1000);
// --

// -- PARA SMS
Serial.println("Tu GPS esta listo para usarse.");
delay (1000);
mySerial.println("AT+CPIN="1234""); //Comando AT para introducir el PIN de la tarjeta

// -- GPS
ss.begin(GPSBaud);
// --
delay(1000); //Tiempo para que encuentre una RED
// --

}

String mensaje = "Llamada Entrante";

void loop()
{
mySerial.listen(); // Select Ser2 for receiving
if (mySerial.available() > 0)
{
inchar = mySerial.read();
if (inchar == 'R')
{
delay(1000);
inchar = mySerial.read();
if (inchar == 'I')
{
delay(1000);
inchar = mySerial.read();
if (inchar == 'N')
{
delay(1000);
inchar = mySerial.read();
if (inchar == 'G')
{
delay(1000);
// So the phone (our GSM shield) has 'rung' once, i.e. if it were a real phone
// it would have sounded 'ring-ring' or 'blurrrrr' or whatever one cycle of your ring tone is
numring++;

// -- Serial.println(mensaje + numring);
Serial.println(mensaje);

if (numring == comring)
{
numring = 0; // reset ring counter
link();
//mensaje_sms(); //Envia SMS
}
}
}
}
}
}

// ss.listen(); // Select Ser2 for receiving
// while (ss.available() > 0) {
// gps.encode(ss.read());
// if (gps.location.isUpdated()) {
// // Latitude in degrees (double)
// Serial.print("Latitude : ");
// Serial.println(gps.location.lat(), 6);
// // Longitude in degrees (double)
// Serial.print("Longitude : ");
// Serial.println(gps.location.lng(), 6);
// }
// }

}

// -- prueba de link
void link() {
//String url = "Google Maps";
//String separador = ",";
//Serial.println(url + latitud + separador + longitud); // Texto del SMS
Serial.println();
Serial.println("Google Maps");//Colocamos la url de google maps
Serial.print(gps.location.lat(), 6); //Obtemos los datos de latitud del módulo gps y se lo enviamos al módulo gsm
Serial.print(",");
Serial.print(gps.location.lng(), 6);
delay(100);
}
// --
//void EnvioTexto()
//{
// Serial.println("Enviando SMS...");
// mySerial.print("AT+CMGF=1\r"); //El envío del SMS en modo texto
// delay(100);
// mySerial.println("AT+CMGS="xxxxxxxxx"");//Número de teléfono de destino
// delay(100);
// mySerial.print("Google Maps");//Colocamos la url de google maps
// mySerial.print(gps.location.lat(),6);//Obtemos los datos de latitud del módulo gps y se lo enviamos al módulo gsm
// mySerial.print("+");
// mySerial.print(gps.location.lng(),6);//Obtemos los datos de longitud del módulo gps y se lo enviamos al módulo gsm
// delay(100);
// mySerial.println((char)26);//El código ASCII del ctrl + z es 26
// delay(100);
// mySerial.println();
// delay(5000);//Esperamos 5 segundos
// Serial.println("Mensaje enviado");
// }
// -- Funcion para Enviar SMS
void mensaje_sms()
{
Serial.println("Enviando SMS...");
mySerial.print("AT+CMGF=1\r"); //Comando AT para mandar un SMS
delay(1000);
mySerial.println("AT+CMGS="xxxxxxxxx""); //Numero al que vamos a enviar el mensaje
delay(1000);

// -- Codigo Antiguo
//String url = "Google Maps";
//String separador = ",";
//mySerial.println(url + latitud + separador + longitud); // Texto del SMS
//delay(100);
// --

mySerial.println("Google Maps");//Colocamos la url de google maps
mySerial.print(gps.location.lat(), 6); //Obtemos los datos de latitud del módulo gps y se lo enviamos al módulo gsm
mySerial.print(",");
mySerial.print(gps.location.lng(), 6);
delay(100);

mySerial.println((char)26);//Comando de finalizacion ^Z
delay(100);
mySerial.println();
delay(10000); // Esperamos un tiempo para que envíe el SMS - 10 segundos
Serial.println("SMS enviado exitosamente.");
}
// --

Lee las normas del foro y edita tu post. Van instrucciones x privado.
Editar significa que ese post debe modificarse no hacer uno nuevo con lo que te estoy reclamando.