gps module and gsm modem sim900a

Hey guys... I m doing a project on vehicle tracking system.. I want code for arduino without using #GSM Library File. And to send gps coordinates using my GSM sim 900a.

I want code for arduino without using #GSM Library File.

So, write some.

And to send gps coordinates using my GSM sim 900a.

We can let you do that.

I have written A code… But all I get is just the message and but not actual coordinates.
Here is the code I used

#include<Softwareserial.h>
#include <Tinygps.h>
long lat,lon;//Create variable for latitude and longitude object SoftwareSerial gpsSerial(4, 5);//create gps sensor connection TinyGPS gps;//create GPS object
int EP=9;
void setup()
{ pinMode(EP, INPUT);
Serial.begin(9600);
Serial.print("\r");
delay(1000);
gpsSerial.begin(9600); }
void loop() { while(gpsSerial.available())
{ if(gps.encode(gpsSerial.read()))//encode gps data
{ gps.get_position(&lat,&lon);//get latitude and longitude Serial.print(“Position:”);
Serial.print(“lat:”);
Serial.print(lat);
Serial.print("");
Serial.print(“lon:”);
Serial.println(lon); }
}
long measurement= TP_init();
delay(50);
Serial.print(“measurment= “);
Serial.println(measurement);
if(measurement> 50000)
{ SendTextMessage(); }
else { Serial.print(“AT\r”); } }
long TP_init()
{ delay(10);
long measurement=pulseIn (EP, HIGH);
return measurement; }
void SendTextMessage()
{ Serial.print(“AT+CMGF=1\r”);
delay(1000);
Serial.print(“AT+CMGS=”+9**********”\r”);
delay(1000);
Serial.print(“Accident Detected At Location:”&lat,&lon); delay(1000);
Serial.write(0x1A);
delay(1000); }

Please help me with this… Thank you

I have written A code..

Which looks like sh*t.

NOTHING follows the { on the same line.

White space should be used between functions.

Tools + Auto Format, to properly indent code.

But all I get is just the message

I'm sure that you know what "the message" means, but I haven't a clue. What message are you talking about?

if(measurement> 50000)

Do you honestly expect pulseIn() to return a value that high?

Bro.. M doing a project on vehicle accident alert notification.. So I am using a vibrtion sensor... So when the value is greater than what is set in the program i.e in this case 50000. So after it is greater than 50000 than the gps will get location.. Which than via Gsm sim900a will send a SMS to the number in the program.