GPS connection

Simplify IoT Development.

Moderators: lily.li, violet, seth.welday

Post Reply
jlcurty
Pre-kindergarten
Pre-kindergarten
Posts: 7
Joined: Tue Mar 20, 2018 5:14 am

GPS connection

Post by jlcurty » Thu Jun 07, 2018 7:26 pm

Hi,
the gsm part works like a charm but the GPS is extremely slow to catch satelite connections ....
I use this code :
#include "MC20_Common.h"
#include "MC20_Arduino_Interface.h"
#include "MC20_GNSS.h"


GNSS gnss = GNSS();

void setup() {
SerialUSB.begin(115200);
// while(!SerialUSB);

gnss.Power_On();
SerialUSB.println("\n\rPower On!");

while(!gnss.open_GNSS(EPO_RL_MODE)){
delay(1000);
}

SerialUSB.println("Open GNSS OK.");
}

void loop() {
char buffer[64];
if(gnss.getCoordinate()){
SerialUSB.print("GNSS: ");
SerialUSB.print(gnss.longitude, 6);
SerialUSB.print(",");
SerialUSB.println(gnss.latitude, 6);
SerialUSB.print(gnss.str_longitude);
SerialUSB.print(",");
SerialUSB.println(gnss.str_latitude);
} else{
SerialUSB.println("Error!");
}

delay(1000);
}


Sometimes I never get a connection , sometimes I get a connection after 20 mins but when I move the gps coordinate don't change ...
any suggestion ??

jean-Louis

hong.jiang
Staff
Staff
Posts: 200
Joined: Tue Apr 17, 2018 11:03 am

Re: GPS connection

Post by hong.jiang » Wed Jun 20, 2018 9:37 am

Dear Costumer:
The GPS part will be limited indoor,Because there are building blockages and signal interference. If you want to have a high performance,you should take it to the open area.

Post Reply