Content originally posted in LPCWare by Polux rsv on Fri Nov 18 06:04:56 MST 2011
GPS will send strings longer than the UART buffer size. You have to use software buffer, feeded by chars received through the interrupt. Your main loop will periodicaly check if CR/LF was received from GPS. If yes, it will empty the buffer and decode the values received. Some GPS parsers are available on internet.
For your project, I suggest you use a RTOS. I have FreeRtos handling the GPS task, the sensors+IMU task, the can task and the terminal/telemetry task. It will handle all the message passing stuf between the tasks.
Angelo