I think I understand how the UART bits work, but if I'm not mistaken, the program rejects false sentences, then waits for the next '$' which is the start of both types of sentence.
This, here. is the problem. If the GPS fires off 7 NMEA sentences or BASE continually fires sentences with no delay in between the messages, the MCU will never be able to pick up the $ symbol, or the start bits, or the stop bits,since it will be jumbled in with everything else.
Imagine this:
Imagine that I am standing in a room continually spewing out the digits to a series of 3-digit numbers. You know the numbers are 3-digits long but imagine I never pause in between the digits. So I just say 345123789... if I want to say 345, 123, 789... The only way you would be able to interpret what I'm saying is if you knew when the first digit of any particular number was.
If you walked in partway through you would have no idea how to group the digits together into numbers since I do not pause in between the digits. Even if we agreed beforehand that the special number 314 signifies the start of a string of 3-digits numbers, this still would not help since if you walked halfway through and heard "...
314123456..." you would have no idea if the 314 was grouped together to be the special starting number since it could just be that the 314 is split between two consecutive 3-digit numbers. I could have been trying to say something like "
731, 412, 345, 6..." but you missed the first digit. If you interpreted the 314 that appears there as the an entire 3-digit number and interpreted everything else I said afterwards based on that, everything will be wrong.
In that example, your sentences are like the 3-digit numbers, and your $ is like 314. Without a delay longer than a serial-word (8-bits) your MCU RX will never be able to know when a symbol begins. The delay gives the MCU a unique scenario that it can pick up on because it can say to itself "okay, the line has been quiet for long enough that I know that a bit of some kind (either start, stop or data) should have already arrived. Since it didn't arrive then the serial messaging timing doesn't match up for valid data so I know I am in an truly in idle state so the next thing that comes will be a start bit".
A similar example is if you started reading an english paragraph in the middle that had no capitals, periods, or spaces. Except it's worse than that since in English you have the benefit of rather unique combinations of letters making up valid words so you can kind of pick out when a word should start and end. With a UART it's just a string of ones and zeroes and almost any combination could be valid data.
Picking out a random section in the middle of that previous paragraph with those rules looks like this:
tedreadinganenglishparagraphinthemiddlethathadnocapitalsperiodsorspacesexceptitsworsethanthatsinceinenglishyouhavethebenefitofratheruniquecombinationsoflettersmakingupvalidwordssoyo