send location data using rf transmitter

hai, can anyone help me to check this source code. this source code are for accident detection and location report for vehicle unit. the sensor that will use is vibration sensor. when the sensor vibrate morethan 500 value, then it will make gps detect location and display at LCD 16x2. after that the gps data that contain longitude and latitude will send using rf transmitter.

#include <SoftwareSerial.h>
#include <LiquidCrystal.h>
#include <VirtualWire.h>

LiquidCrystal lcd (2,3,4,5,6,7);
SoftwareSerial gps (1,0);  // software serial pins for gps

const int ledpin = 11;
const int transmit_pin = 12;
const int receive_pin = 2;
const int transmit_en_pin = 3;
int vib_pin= 7;
int led_pin=13;
char str[70];
char *test= "$GPGGA";
char longitude[10];
char latitude [10];

void setup()

 Serial.begin (9600);
 lcd.begin (16,2);
 lcd.print("ADLR System ");
 pinMode(vib_pin, INPUT);


byte count = 1;

void loop()
long measurement = VibrateSense();
float gpsdata =  ReadGPS();
float gpsdisplay = DisplayLCD ();
float transferdata =  TransmitData();

 delay (50);
 Serial.println (measurement);
 if (measurement > 500)
   else {
     digitalWrite(led_pin, LOW);

long VibrateSense()
 long measurement =  pulseIn (vib_pin, HIGH);
 return measurement;

float ReadGPS()
  if (gps.available())
   Serial.write (;
  if (Serial.available())
   gps.write (;

float DisplayLCD()
 lcd.print("Lat (N):");
 lcd.print (latitude);
 lcd.print("LON (E): ");

float TransmitData ()
char msg [7] =  {'N', 'E','#'};

 msg[6] = count;
 digitalWrite (ledpin,HIGH);
 vw_send((uint8_t *)msg, 7);
 digitalWrite (ledpin, LOW);
 count = count +1;

Please edit your post and add code tags ("</>" button). See “How to use this forum”.

SoftwareSerial gps (1,0);  // software serial pins for gps

void setup()

  Serial.begin (9600);

It is physically impossible to do software serial on the hardware serial pins while also doing hardware serial on those pins. Get over it.