I need values like speed, altitude etc.. Can I access them in real time while FG is running? I want to write a program that reads the data and sends them to an Arduino. Is that possible? (Mac OS)
This should provide many pointers to get you going, depending on your needs/technology stack, there's tons of existing examples/code that you can reuse.
PS: It's generally a good idea to search the forum/wiki for relevant keywords, and to look at sticky topics: viewtopic.php?f=36&t=10173