a program that write with PIC 16F887 and Magellan Gps.

Hi ,We are helper 01 UAV research group. Our mission is to control only Rudder by using FMA Co-pilot. PIC 16F887 use as main processor to connect with Magellan GPS (SporTrak Map) for waypoints and true heading . But We’re facing some problems.(1) Is PiC 16F887 enough for UAV Rudder control?(2) How can select GPRMC sentence form Magellan GPS? Following program flow is right or not?#INT_RDAvoid gpsRda_isr(void){c = fgetc(GPS);c = (char)c;if(c=='$') commas=0;header=0;if(c=='R') header++;if(c=='M') header++;if(c=='C') header++;if(header==3){if(c==',') commas++;if(commas==3) // get latitude data (3) {if(c==',') k=0;else {LAT[k]=c; k++;}} if(commas==5) // get longtitude data (5){if(c==',') k=0;else {LONGI[k]=c; k++;}} if(commas==8) // true heading (8) {if(c==',') k=0;else {tr1[k]=c; k++;}}if(commas==9) flag=1;}fputc(c,modem);output_high(PIN_D2);}(3) Magellan Gps give us 6 lines with RMC sentences. And so I wanna to know about a program that write with PIC 16F887 and Magellan Gps.Please give us your suggestions .We always thanks for your help and kindness.Helper 01 UAV research groupAerospace Engineering UniversityChina

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

Join diydrones

Email me when people reply –

Replies

  • Hawk,
    1) yes a PIC16F887 is good enough for rudder control but I imagine you will need to use timers and interrupts in order to handle servos and gps.
    There should be some routines within this file you can modify to use within your own code for parsing GPS sentences. It's not the best code around but it works.

    main.c

    https://storage.ning.com/topology/rest/1.0/file/get/3692048988?profile=original
This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…