by Max » Wed Jan 30, 2013 2:05 am
Yea, Mavlink does have a standard message type with a battery current field. It's part of the SYS_STATUS message, IIRC. The problem is where to get the data and then how to inject it into the status message that AQ currently sends. Since AQ doesn't have a current sensor onboard, there would need to be a hardware add-on, which somehow communicates with the AQ, and some code in the firmware to do the communication and send the current measurement via mavlink. Or some way to send a mavlink message directly from the current sensor (probably not very practical). The AQ does have a number of interfaces/types that can be used, so perhaps there is an existing off-the-shelf unit that can be fitted.
There is also the option of estimating current flow based on voltage and a known discharge curve... the AQ code does a bit of this already, and there are instructions in the docs about how to profile a battery so that the AQ can run a better estimate of the battery state. But this would obviously be less accurate than actual measurement.
Cheers,
-Max