Both are beautiful languages. You do not need years to study. An easy way to make a decision is to see which modules already exist.
For example, you mentioned that your application is connected with GPS. See which libraries are already written to connect Python and Lua to your specific GPS equipment. Perhaps someone has already done most of the hard work for you. If not, then go down a step. If you are talking to your GPS via I2C, check out the I2C libraries in both languages. See which ones are more popular and better supported.
However, garbage collectors have historically encountered real-time compliance issues. Depending on yours, you may need to switch to a lower level. You must also make sure that any system you work on will support your programming environment. I worked with systems in which Python would be great, but it doesn't fit into the 5K code space.
source share