I have been working on a Lua script to send data over a serial port, and one of the pieces of data I want to send is the altitude. After looking at the bindings.desc file, I figured alt, which is a field of Location, is what I am looking for. I tried printing the output to the messages tab first to make sure that Location(alt) is in fact the parameter I am looking for, but couldn’t get anything to display. I figured I would check to make sure I was calling the parameter correctly by checking the type of Location(alt) and saw that it is userdata.
I am still very new to Lua, but after doing a fair amount of research, I couldn’t figure out a way to get an altitude value due to the type being userdata. Is there a way I can get altitude data from this, or is there another parameter I should be looking at altogether?