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

  • I'm afraid my impression is that you know more about coding/debugging than myself. Nothing comes to my mind.

    Out of curriosity: is there any reason you've selected these components vs. ardupilot/ublox or em406?

    I think people may have a better idea of how to help if they knew more about your project. Are you building an open source ardupilot/paparazzi style board? What other components are involved, ect.
  • hi Gerry Lichter,

    thanks for ur help.Give me light ,Please
  • Dear Gerry lichter,

    Thanks for ur suggestons.We have to control only rudder with Magellan GPS (SporTrak Map).It is more empherize case for our UAV.Now our problem is .>>> Our program donot know all GPRMC sentence.A program know only G and P , after that program terminate.I thnik When program select GPRMC wiht 9600 baud(1Hz) , timer give a problem. Please give me suggestions , thanks.
    void 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);
    }
  • Experimental: http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en026561
    Proven: http://www.atmel.com/dyn/products/product_card.asp?PN=ATmega328P

    You can make some predictions about performance issues you may face based on the specifications.

    Short Version:
    Atmel:
    -20 MIPS throughput at 20 MHz
    -8 Channel 10-bit A/D-converter(TQFP/MLF)
    -32KB self-programming Flash Program Memory,
    -2KB SRAM,
    -1024 Bytes EEPROM
    -Digital Communication Peripherals ?SPI/I2C?


    PIC:
    -14KB self-programming Flash Program Memory,
    -5 MIPS throughput at ?? MHz
    -14 channels of 10-bit A/D-converter
    -368 bytes RAM
    -256 Bytes EEPROM
    -Digital Communication Peripherals 1-A/E/USART, 1-MSSP(SPI/I2C)
This reply was deleted.

Activity

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