UPDATE: New GPS Emulator Installer Added: GPS Emulator Setup
It includes an automatic update routine that should make life much easier when it comes to bug fixes and additions.
TestFlight.gif
I have modified the GPS Emulator I wrote for Remzibi's OSD to capture and output GPS data to the ArduPilot using either Remzibi's USB to serial cable or DIYdrones' FTDI cable.

Using the config tool, create a flight path, save the mission and upload it to the ArduPilot. Then launch the GPS Emulator and select the saved mission... and voila.... your imaginary plane is flying on it's own!

The image above is 26 points in a circle around Chicago at 30 MPH.... the purple line is my flight path, the blue is the straight line between waypoints.

You can download the GPS Emulator from here: ConfigTool.zip.
Please NOTE: You'll need to install Remzibi OSD's Config Tool from here: Remzibi.Happykillmore.com

You can find instructions here: GPS Emulator for ArduPilot with Google Maps

PS, contrary to popular belief, when the Ardu is in the Middle switch setting (WP mode) it will fly in circles, not just once around and then circle around home....

TimeTrial.gif

Update for ArduPilot V2.3

Changes that must be made to the ArduPilot Source to make the GPS Emulator work:

easystar.h

//1-7 #define GPS_PROTOCOL 0 //4-1 #define ALTITUDE_ERROR_MAX 10 //
//4-4
#define ALTITUDE_ERROR_PITCH_MAX 14 //Limits, EasyStar climb by itself, you don't need to up the elevator (you may stall)...

ArduPilot_Easy_Star_V23.pde Tab

void loop()//Main Loop **** Change print_data(); to print_data_emulator();
GPS_NMEA.pde Tab

void fast_init_gps(void) { pinMode(12, OUTPUT);//Status led Serial.begin(9600); //Universal Sincronus Asyncronus Receiveing Transmiting //Serial.begin(38400); }

//Suggested changes below (to help with 5Hz buffer overruns)
//This code goes near line #80
if(gps_buffer[0]=='$')//Verify if is the preamble $
{
counter = 0; //Add this
checksum = 0; //Add this
unlock=1;
}


//This is near the bottom
{
counter++; //Incrementing counter
if (counter >= 200) //Add this
{ //Add this
Serial.flush(); //Add this
counter = 0; //Add this
checksum = 0; //Add this
unlock = 0;
}
}

System.pde Tab (Add the following)

void print_data_emulator(void) { static unsigned long timer1=0; static byte counter; if(millis()-timer1 > ATTITUDE_RATE_OUTPUT)
{
digitalWrite(13,HIGH);
Serial.print("!!!");
Serial.print ("STT:");
Serial.print((int)Tx_Switch_Status());
Serial.print (",WPN:");
Serial.print((int)last_waypoint);//Actually is the waypoint.
Serial.print (",DST:");
Serial.print(wp_distance);
Serial.print (",RER:");
Serial.print((int)roll_set_point);
Serial.print (",PSET:");
Serial.print(pitch_set_point);
Serial.println(",***");
timer1=millis();
digitalWrite(13,LOW);
}
}
E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Thanks. GGA string works ok. GPS emulator - very good program. I have used it for debug my project.
    Version 2.0.10 requires some dll. dx8vb.dll i found on the internet. Program works, but i not see airplane model. Maybe dll version wrong?
  • You can try this version 2.0.10 of the Emulator. I think I fixed the bug in the GPGGA but the other strings may not be correct in regions where decimal points are not periods.

    http://www.happykillmore.com/Software/RemzibiOSD/GPSEmulator.zip

    Emulator_Screenshot.gif
  • GPS emulator have bug in NMEA GGA string?
    In ver. 1.1.45 all OK
    $GPGGA,195614.41,5504.3548,N,02246.0038,E,1,05, >> 1.0 << ,300,M,0,M,,*64
    In ver. 1.2.6 bug?
    $GPGGA,195809.62,5504.4310,N,02246.0211,E,1,05, >> 0,9 << ,55,M,0,M,,*5B
    I try ver. 2.0.0 - same as ver. 1.2.6
    Must be dot, but there is a comma... :(
  • Thank you
  • I'm currently working on a project to get everything working with ArduPilot source 2.6
    Go here: http://www.rcgroups.com/forums/showthread.php?t=1234310&pp=20
  • Has anyone worked this with version 25_0_4. I have tried but things are a little different. I would love to get this to work.
  • See the text above to see what changes must be made for ArduPilot Source V2.3
  • I'm glad you got it working Doug and Peter. Yes, NMEA and 9600. Please note that if you select a value higher than 2 Hz on the emulator, the Ardu may reboot on you and go home and back to WP#1, 2, etc. I have limited testing but I've noticed on missions with more datapoints, at 5Hz, it will make it about 4-5 WP's and then go home....

    You also need to have a signal on the CTRL input. By default it's in "Manual". If the status message says it's in manual mode then your Ardu is sending messages. You need to connect something on the CTRL input and put it on the middle setting.
  • Awesome

    Working just fine for me, radio must be on with receiver and switch set to CTRL port on ardupilot...

    Hope this helps others who are interested in using this... :)
This reply was deleted.