Arduino nano and GPS ( TinyGPS++ )

Hello,
I used arduino Nano and GPS ( NEO-6M) to get position of air plane RC but I never get Position.
I don't understand, could you help me please.
My code and the result below.

#include <SoftwareSerial.h>

// The serial connection to the GPS module
SoftwareSerial ss(4, 3);

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

void loop(){
  while (ss.available() > 0){
    // get the byte data from the GPS
    byte gpsData = ss.read();
    Serial.write(gpsData);
  }
}
$GPRMC,,V,,,,,,,,,,N*53
$GPVTG,,,,,,,,,N*30
$GPGGA,,,,,,0,00,99.99,,,,,,*48
$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
$GPGSV,4,1,15,01,,,25,02,,,27,03,,,26,04,,,26*7E
$GPGSV,4,2,15,06,,,25,07,,,25,11,,,26,14,,,25*7C
$GPGSV,4,3,15,23,,,26,24,,,26,25,,,28,28,,,24*7C
$GPGSV,4,4,15,33,,,29,37,,,30,48,,,31*7F
$GPGLL,,,,,,V,N*64

Code with telemetrty:

#include <iBUSTelemetry.h> //https://github.com/adis1313/iBUSTelemetry-Arduino
#include <Wire.h>
#include <TinyGPS++.h>
#include <SPI.h>

TinyGPSPlus gps;

#define UPDATE_INTERVAL 500

iBUSTelemetry telemetry(9); // arduino pin pour donnes iBUS


uint32_t prevMillis = 0; // neessaire pour updateValues()

float maxspeed = 0, speed1 = 0;
int maxhigh = 0, high1 = 0;
int maxsatelite = 0, satelite1 = 0;

float meters ;
float voltage = 0.0;

void setup()
{
  Serial.begin(9600);
  delay(50000);
  pinMode(13, OUTPUT);

  digitalWrite(13, HIGH);// carte SD absente


  Serial.println(""); Serial.println("Demarrage acquisition ibus"); // Ecrit dans ce fichier
  Serial.println(""); Serial.println("date      heure      latitude       longitude   altitude   vitesse");

  Wire.begin();
  telemetry.begin();

  // definition capteurs

  telemetry.addSensor(IBUS_MEAS_TYPE_EXTV); //batterie
  telemetry.addSensor(IBUS_MEAS_TYPE_SPE); //vitesse km/h
  //telemetry.addSensor(IBUS_MEAS_TYPE_ALT); //altitude
  //telemetry.addSensor(IBUS_MEAS_TYPE_GPS_LAT); // latitude
  //telemetry.addSensor(IBUS_MEAS_TYPE_GPS_LON); // longitde

  telemetry.addSensor( IBUS_MEAS_TYPE_VERTICAL_SPEED ); // utilisé pour altitude
  telemetry.addSensor( IBUS_MEAS_TYPE_GROUND_SPEED   );// utilisé pour latitude
  telemetry.addSensor( IBUS_MEAS_TYPE_GPS_DIST       );// utilisé pour longitde
  telemetry.addSensor( IBUS_MEAS_TYPE_ARMED          );// utilisé pour vitesse max


}

void loop()
{

  updateValues();
  telemetry.run();
}

void updateValues()
{

  // lecture donnes Gps et allumage LED si OK

  if (Serial.available()) {
    digitalWrite(13, LOW);//donnes Gps OK
    gps.encode(Serial.read());
  }





  float meters = (gps.altitude.meters());
  float airSpeed = (gps.speed.kmph());

  // definition vitesse max

  speed1 = (gps.speed.kmph());
  if ( speed1 > maxspeed) {
    maxspeed = speed1;
  }


  // recuperation date et heure du GPS pour datalogging

  String Temps = String(gps.time.hour() + 1) + (":") + (gps.time.minute()) + (":") + (gps.time.second());
  String Date = String(gps.date.day()) + ("/") + (gps.date.month()) + ("/") + (gps.date.year());

  // Temporisation

  uint32_t currMillis = millis();

  if (currMillis - prevMillis >= UPDATE_INTERVAL) { // Code in the middle of these brackets will be performed every 500ms.
    prevMillis = currMillis;


    // affichage donnes capteur sur radiocommande

    telemetry.setSensorValue(1, voltage * 100  );
    telemetry.setSensorValue(2, speed1 );

    telemetry.setSensorValue(3, gps.altitude.meters()); //  altitude
    telemetry.setSensorValue(4, gps.location.lat()); //latitude
    telemetry.setSensorValue(5, gps.location.lng()) ; // longitude
    telemetry.setSensorValue(6, maxspeed);
  }
}

The NMEA output from the GPS is reporting very weak signals and it could take a very long time (or never) to get a position fix under those reception conditions.

Test the GPS outdoors where it has a good view of the sky.

ok thank you.
I have try but in city maybe that.
If I'm indoor, I have low gps number but if I but my finger on antenna the number of GPS increase

my standard advice in re GPS modules: get one with a proper, civilized SMA connector, and use an external antenna. get one with two or more mounting holes. don't bother with the execrable u.fl connector. I consider the inventor of the u.fl connector to rank right up there with the wonderful human being who writes rhyming TV commercials.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.