Gps command error n Replace with Tinygps command

i have already try the tinygps command and it works for me, but when i compile with my command , the output just produce 0.000 , 0.0000 location , some can help me fix the command?

im using arduino uno , gsm 900a , gps neo 6m , accelerometer ,lcd

#include<SoftwareSerial.h>
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>
//I2C pins declaration
LiquidCrystal_I2C lcd(0x27,16,2);
SoftwareSerial Serial1(10,11); //make RX arduino line is pin 2, make TX arduino line is pin 3.
#include <TinyGPS++.h> 
static const int RXPin = 3, TXPin = 4;
static const uint32_t GPSBaud = 9600;
// The TinyGPS++ object
TinyGPSPlus gps;
// The serial connection to the GPS device
SoftwareSerial ss(RXPin, TXPin);

#define x A1
#define y A2
#define z A3

int xsample=0;
int ysample=0;
int zsample=0;

#define samples 10

#define minVal -50
#define MaxVal 50

int i=0,k=0;
int  gps_status=0;
float lat=0; 
float lon=0;                       
String gpsString="";
char *test="$GPRMC";

void initModule(String cmd, char *res, int t)
{
  while(1)
  {
    Serial.println(cmd);
    Serial1.println(cmd);
    delay(100);
    while(Serial1.available()>0)
    {
       if(Serial1.find(res))
       {
        Serial.println(res);
        delay(t);
        return;
       }

       else
       {
        Serial.println("Error");
       }
    }
    delay(t);
  }
}

void setup() 
{
  ss.begin(GPSBaud); 
  Serial1.begin(9600);
  Serial.begin(9600);
  lcd.init();                      // initialize the lcd 
  lcd.init();
  // Print a message to the LCD.
  lcd.backlight();
  lcd.print("Accident Alert  ");
  lcd.setCursor(0,1);
  lcd.print("     System     ");
  delay(2000);
  lcd.clear();
  lcd.print("Initializing");
  lcd.setCursor(0,1);
  lcd.print("Please Wait...");
  delay(1000);
  
  Serial.println("Initializing....");
  initModule("AT","OK",1000);
  initModule("ATE1","OK",1000);
  initModule("AT+CPIN?","READY",1000);  
  initModule("AT+CMGF=1","OK",1000);     
  initModule("AT+CNMI=2,2,0,0,0","OK",1000);  
  Serial.println("Initialized Successfully");
  lcd.clear();
  lcd.print("Initialized");
  lcd.setCursor(0,1);
  lcd.print("Successfully");
  delay(2000);
  lcd.clear();
  lcd.print("Callibrating ");
  lcd.setCursor(0,1);
  lcd.print("Acceleromiter");
  for(int i=0;i<samples;i++)
  {
    xsample+=analogRead(x);
    ysample+=analogRead(y);
    zsample+=analogRead(z);
  }

  xsample/=samples;
  ysample/=samples;
  zsample/=samples;

  Serial.println(xsample);
  Serial.println(ysample);
  Serial.println(zsample);
  delay(1000);
  
  lcd.clear();
  lcd.print("Waiting For GPS");
  lcd.setCursor(0,1);
  lcd.print("     Signal    ");
  delay(2000);
  lcd.clear();
  lcd.print("GPS is Ready");
  delay(1000);
  lcd.clear();
  lcd.print("System Ready");
  Serial.println("System Ready..");
}

void loop() 
{
    int value1=analogRead(x);
    int value2=analogRead(y);
    int value3=analogRead(z);

    int xValue=xsample-value1;
    int yValue=ysample-value2;
    int zValue=zsample-value3;
    
    Serial.print("x=");
    Serial.println(xValue);
    Serial.print("y=");
    Serial.println(yValue);
    Serial.print("z=");
    Serial.println(zValue);

    if(xValue < minVal || xValue > MaxVal  || yValue < minVal || yValue > MaxVal  || zValue < minVal || zValue > MaxVal)
   
   // This sketch displays information every time a new sentence is correctly encoded.
  while (ss.available() > 0){
    gps.encode(ss.read());
    if (gps.location.isUpdated()){
      
    lcd.clear();
    lcd.setCursor(1,0);
    lcd.print("GPS Signal");
    Serial.print("Position: ");
    Serial.print("Latitude= "); 
    Serial.print(gps.location.lat(), 6);
    Serial.print(";");
    Serial.print(" Longitude= "); 
    Serial.println(gps.location.lng(), 6); 
    lcd.setCursor(1,0);
    lcd.print("Lat:");
    lcd.setCursor(5,0);
    lcd.print(lat);
    Serial.print(lat);
    Serial.print(" ");
    lcd.setCursor(0,1);
    lcd.print(",Lon:");
    lcd.setCursor(5,1);
    lcd.print(lon);
    
   }
  }
  
  String latitude = String(lat,6);
    String longitude = String(lon,6);
  Serial.println(latitude+";"+longitude);
  delay(1000);
  
}


void Send()
{ 
   Serial1.println("AT");
   delay(500);
   serialPrint();
   Serial1.println("AT+CMGF=1");
   delay(500);
   serialPrint();
   Serial1.print("AT+CMGS=");
   Serial1.print('"');
   Serial1.print("+60175216020");    //mobile no. for SMS alert
   Serial1.println('"');
   delay(500);
   serialPrint();
   Serial1.print("Latitude:");
   delay(500);
   serialPrint();
   Serial1.print(" longitude:");
   delay(500);
   serialPrint();
   Serial1.print("http://maps.google.com/maps?q=loc:");
   
   delay(1000);
   Serial1.write(26);
   delay(2000);
   serialPrint();
}

void serialPrint()
{
  while(Serial1.available()>0)
  {
    Serial.print(Serial1.read());
  }
}
float lat=0;
float lon=0;

The lat and lon variables are initialized to 0 and I don't see where they are ever given a different value.

then what should I change command to generate the location where the gps is located?

or I have missing command ?

You need to pick up lats and longs from the gps data set.

may i know which command?

Start over with the example program that comes with the TinyGPS++ library, and learn how that works first.

Cut and pasted from TinyGps…

//Serial.println(gps.location.lat(), 6); // Latitude in degrees (double) //Serial.println(gps.location.lng(), 6); // Longitude in degrees (double) //Serial.print(gps.location.rawLat().negative ? "-" : "+"); //Serial.println(gps.loc2ation.rawLat().deg); // Raw latitude in whole degrees //Serial.println(gps.location.rawLat().billionths);// ... and billionths (u16/u32) //Serial.print(gps.location.rawLng().negative ? "-" : "+"); //Serial.println(gps.location.rawLng().deg); // Raw longitude in whole degrees //Serial.println(gps.location.rawLng().billionths);// ... and billionths (u16/u32)

Rings the bell?