Go Down

Topic: gps viewer + venus gps (Read 923 times) previous topic - next topic

leotriador

Does anyone know how to conect and cofigure the venus gps in 10 hz with the gps viewer?

PaulS

Quote
Does anyone know how to conect and cofigure the venus gps in 10 hz with the gps viewer?

Does anyone even know what you are talking about, in the absence of links?

floresta

Quote
Does anyone know how to conect and cofigure the venus gps in 10 hz with the gps viewer?

Yes, I do.

Don

leotriador

Can you guide me please to do it, since I don`t have a clue.

floresta

Connect GPS
Run GPS Viewer.exe
Set Com Port and Baudrate and then Connect
Menu | Binary | Configure Position Update Rate
Select 10 then Accept


Don

leotriador

Thanks a lot for the information

leotriador

One more thing, my gps is conected to mi arduino uno in pins 5 and 6 as tx an rx, to conect to the gps viewer I just have to conect mi arduino to my pc and then in the gps viewer select the serial port that my arduino is conected to right?

PeterH


I just have to conect ... right?


If you're assuming your Arduino will act as a relay between the GPS and the host PC then you'd need to run a sketch on the Arduino to do that.
I only provide help via the forum - please do not contact me for private consultancy.

floresta

I think that the example given here --> http://arduino.cc/en/Tutorial/SoftwareSerialExample <-- is along the lines of what he is trying to do.

It might be easier to just get a USB <--> Serial interface for his computer and use that with the gps viewer software to configure the GPS.


Don

leotriador

Code: [Select]
Just get to conect the gps to the gps viewer, now I put it in 10hz and it gets to 38400 of baudrate, now my problem is that I can`t get to work with arduino, does anyone have any clue for this?


#include <SD.h>
#include <Wire.h>
#include <SoftwareSerial.h>
#include "I2Cdev.h"
#include "MPU6050.h"

SoftwareSerial gpsSerial(6, 5); // RX, TX (TX not used)
const int sentenceSize = 80;

MPU6050 accelgyro;

int16_t ax, ay, az;
int16_t gx, gy, gz;

char sentence[sentenceSize];

#define LOG_INTERVAL 100

const int chipSelect = 10;
File logfile;
long idd = 0;
long ids = 0;
long idm = 0;
long idh = 0;

void error(char *str)
{
  Serial.print("error: ");
  Serial.println(str);

  while(1);
}

void setup()
{
  Wire.begin();
  Serial.begin(38400);
  gpsSerial.begin(38400);
 
  Serial.println("Iniciando MPU");
  accelgyro.initialize();
  Serial.println("Iniciando SD");
  // make sure that the default chip select pin is set to
  // output, even if you don't use it:
  pinMode(10, OUTPUT);
 
  // see if the card is present and can be initialized:
  if (!SD.begin(chipSelect)) {
    Serial.println("Fallo de SD");
    return;
  }
  Serial.println("Inicio Correcto");
  Serial.println("Testeando MPU");
  Serial.println(accelgyro.testConnection() ? "Conexion MPU6050 exitosa" : "Error de Conexion a MPU");
 
 
  // create a new file
  char filename[] = "LOGGER00.CSV";
  for (uint8_t i = 0; i < 100; i++) {
    filename[6] = i/10 + '0';
    filename[7] = i%10 + '0';
    if (! SD.exists(filename)) {
      // only open a new file if it doesn't exist
      logfile = SD.open(filename, FILE_WRITE);
      break;  // leave the loop!
    }
  }
 
  if (! logfile) {
    error("couldnt create file");
  }
 
  Serial.print("Logging to: ");
  Serial.println(filename);
}

void loop()

  static int i = 0;
  if (gpsSerial.available())
  {
    char ch = gpsSerial.read();
    if (ch != '\n' && i < sentenceSize)
    {
      sentence = ch;
      i++;
    }
    else
    {
     sentence = '\0';
     i = 0;
     char field[20];
      getField(field, 0);
      accelgyro.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);
  if (strcmp(field, "$GPRMC") == 0)
  {
   
    Serial.print("Tiempo: ");
    getField(field, 1);
    Serial.print(field);
    logfile.print(field);
    logfile.print("\t");   
   
    Serial.print("Lat: ");
    getField(field, 3);  // number
    Serial.print(field);
    logfile.print(field);
    logfile.print("\t");
    getField(field, 4); // N/S
    Serial.print(field);
    logfile.print(field);
    logfile.print("\t");
   
    Serial.print("Long: ");
    getField(field, 5);  // number
    Serial.print(field);
    logfile.print(field);
    logfile.print("\t");
    getField(field, 6);  // E/W
    Serial.print(field);
    logfile.print(field);
    logfile.print("\t");

    Serial.print("Velocidad: ");
    getField(field, 7);
    Serial.print(field);
    logfile.print(field);
   
    Serial.print("a/g:\t");
    Serial.print(ax); Serial.print("\t");
    logfile.print(ax);
    logfile.print("\t");
    Serial.print(ay); Serial.print("\t");
    logfile.print(ay);
    logfile.print("\t");
    Serial.print(az); Serial.print("\t");
    logfile.print(az);
    logfile.print("\t");
    Serial.print(gx); Serial.print("\t");
    logfile.print(gx);
    logfile.print("\t");
    Serial.print(gy); Serial.print("\t");
    logfile.print(gy);
    logfile.print("\t");
    Serial.println(gz);
    logfile.println(gz);
    logfile.flush();
   
  }
    }
  }
}

void getField(char* buffer, int index)
{
  int sentencePos = 0;
  int fieldPos = 0;
  int commaCount = 0;
  while (sentencePos < sentenceSize)
  {
    if (sentence[sentencePos] == ',')
    {
      commaCount ++;
      sentencePos ++;
    }
    if (commaCount == index)
    {
      buffer[fieldPos] = sentence[sentencePos];
      fieldPos ++;
    }
    sentencePos ++;
  }
  buffer[fieldPos] = '\0';
}
/code]

it logs but only a few lines, then it jumps to another file.

Go Up