Olá boa noite, gostaria de saber se alguem pode me ajudar a identificar o seguinte erro no meu código: No matching function for call to 'TinyGPS:: get_position(long int *)
O código segue logo abaixo:
#include <SoftwareSerial.h>
#include <TinyGPS.h>
long latitude,longitude;
SoftwareSerial gpsSerial(2,3);
TinyGPS gps;
void setup() {
Serial.begin(9600);
gpsSerial.begin(4800);
long get_position;
long lat_temp=gps.get_position(&latitude); // o compilador diz q erro está nessa linha...
long long_temp=gps.get_position(&longitude);
long latitude_destino=-31323133;
long longitude_destino=-54093878;
}
void loop() {
boolean cont=true;
do{
while(gpsSerial.available()){ // check for gps data
if(gps.encode(gpsSerial.read())){ // encode gps data
gps.get_position(&latitude,&longitude); // get latitude and longitude
if (lat_temp=latitude_destino && long_temp=longitude_destino)
{ println("DESTINO ENCONTRADO!");
cont=false;
} else if (longitude_destino < long_temp)
{
println("Vá para a direita");
}
else {
println("Vá para a esquerda");
}
else if (latitude_destino < lat_temp)
{
println("Siga em frente alguns metros");
}
else {
println("Volte alguns metros");
}
}while(cont);
}
}
}
Se alguem puder me ajudar eu agradeço desde já. Obrigado.