Good news: you can now use the standard ArduPilot GCS with ArduPilot Mega!
Just select option 2 ("ArduPilot Legacy") in your GCS protocol in the config file of the latest code, and APM will drive the GCS just like ArduPilot. Try tilting the APM board and watch the artificial horizon move along. Very cool
//0-4 Ground Control Station:
#define GCS_PROTOCOL 2
// 0 = Ardupilot Mega Standard Binary
// 1 = special test,
// 2 = Ardupilot Legacy
// 3 = Xplane
// 4 = Ardupilot IMU out
// 5 = Jason's GCS,
// -1 = no GCS (no telemetry output)
Automatik is hard at work updating the GCS to support APM natively, with all the additional functionality it brings, but for now you've got a great GCS with all the cool stuff like moving maps and voice synthesis, all ready to go.
Comments
Got it all hooked back up, and check this out.
Look at current code for the diffrences in GCS files. Legacy hardcoding of the serial port or calling of a paramater that becomes cross platform.
/***************************************
// Telemetry - Uncomment the pair for the port you want to use
#define SendSer Serial.print // This pair to use the usb port
#define SendSerln Serial.println
//#define SendSer Serial3.print // this pair for the xbee port
//#define SendSerln Serial3.println // Internal defines, don't edit and expect things to work
/***************************************/
I have seen it but can't remember where.
Earl
Earl
Earl
void print_position(void)
{
Serial.print("!!!");
Serial.print("LAT:");
Serial.print(current_loc.lat/10,DEC);
Serial.print(",LON:");
Serial.print(current_loc.lng/10,DEC); //wp_current_lat
Serial.print(",SPD:");
Serial.print(ground_speed/100,DEC);
Serial.print(",CRT:");
Serial.print(climb_rate,DEC);
Serial.print(",ALT:");
Serial.print(current_loc.alt/50,DEC);
Serial.print(",ALH:");
Serial.print(next_WP.alt/10,DEC); <<<<<<<<<<<<<<<<<<<< /10 not /100 Earl >>>>>>>>>>>>>>>>>>>
Serial.print(",CRS:");
Serial.print(ground_course/1000000,DEC); <<<<<<<<<<<<<<<<<<<< added 4 zeros to divide Earl >>>>>>>>>>>>>>>>>>>
Serial.print(",BER:");
Serial.print(target_bearing/100,DEC);
Serial.print(",WPN:");
Serial.print(wp_index,DEC);//Actually is the waypoint.
Serial.print(",DST:");
Serial.print(wp_distance,DEC);
Serial.print(",BTV:");
Serial.print(battery_voltage,DEC);
Serial.print(",RSP:");
Serial.print(servo_out[CH_ROLL]/100,DEC);
Serial.print(",TOW:");
Serial.print(iTOW);
Serial.println(",***");
Earl
here is code in ArdiPilot_0_1_0 I changed
iTOW = GPS.Time;
current_loc.lng = GPS.Longitude *10; // Lon * 10**7 <<<<<<<<<<<<<<<<<< *10 by Earl >>>>>>>>>>>>>>>>
current_loc.lat = GPS.Lattitude *10; // Lat * 10**7 <<<<<<<<<<<<<<<<<< *10 by Earl >>>>>>>>>>>>>>>>
#if GCS_PROTOCOL != 3
current_loc.alt = ((1 - ALTITUDE_MIX) * GPS.Altitude) + (ALTITUDE_MIX * press_alt); // alt_MSL centimeters (meters * 100)
#else
current_loc.alt = GPS.Altitude *10; <<<<<<<<<<<<<<<<<< *10 by Earl >>>>>>>>>>>>>>>>
#endif
ground_course = GPS.Ground_Course; //degrees * 100
COGX = cos(ToRad(GPS.Ground_Course/100.0));
COGY = sin(ToRad(GPS.Ground_Course/100.0));
Yup, that fixed it.
Now to fix lat, lon and alt scale
Earl