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

  • I have tried this version - works well.
  • 2.0.12 is available and has a more realistic distance for speed selected. Let me know if you've got anything else!!! I love to get feedback!
  • That's possible. I'll look into it.
  • One thought about the simulation speed. If i set 100 km/h, simulation speed is about 30 km/h. Maybe possible to do a more realistic simulation speed?
  • Very fast response. Thanks.
  • Ok, installer is ready: http://www.happykillmore.com/Software/GPSEmulator/Setup/Setup.exe

    It includes an automatic update routine that should make life much easier when it comes to bug fixes and additions.
  • lol, 2.0.11 posted http://www.happykillmore.com/Software/RemzibiOSD/GPSEmulator.zip

    Thank god you're not paying for this stuff!!!
  • Thanks. I register dll - emulator works ok.
    I try move GPS emulator window, and came out another bug. Change the window size. Maybe this is a feature?
  • You can try this in the mean time.

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

    It needs to go in C:\Windows\System32 and needs to be registered (regsvr32.exe)
  • I think I'm going to have to create an installer for the GPS Emulator. It's really becoming it's own thing. Up 'till now, it's been a part of Remzibi's OSD program. I'll post a link when I get the installer done.
This reply was deleted.