I hope that I understand the situation correctly:1) MAVlink protocol has a message type that includes a slot for reporting mAh remaining in battery.2) HK-GCS does not utilize the mAh information, so the very nice widget for reporting battery status only responds to battery voltage and battery capacity does not change with time.3) HK-GCS has a place (and widget) for showing battery amps, but MAVlink does not have a message type with a slot for that data, so HK_GCS has to show battery current as constantly zero. This is not the fault of HHK-GCS; it's not being supplied with relevant data. Hopefully a future MAVlink protocol update will at least provide battery current data in a message so that it can be displayed by ground stations.I found these things out (courtesy in large part to Doug Weibel) when I added a current sensor to APM 2.12 and found that no ground station is able to report battery capacity remaining or battery current. Only APM terminal shows battery current and capacity.At the moment, I'm thinking of adding a work-around by modifying the APM 2.12 code so that I can select (via an RC channel value) whether the battery_voltage variable is filled with actual battery voltage or battery current or mAh before it is sent to HK-GCS. A kludgy way to multiplex that data, but it will probably suit my usage well enough.

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Please download 1.2.100 and let me know how it goes.

     

    Please also note that you might need to go into File, Settings, Instruments and verify your max capacity is set correctly as well as your voltage limits. I've been changing my regional settings a lot and have found sometimes it looses my decimal place and 12.5V becomes 125V.... Let me know what you find so I can fix it for everyone. I'll also look into using the parameter value from APM as the max mAh value and post another update.

  • I agree that there is no MAVlink field for current, but the "battery remaining" field is working for me in APM 2.12 and seems to be  reported properly in HK GCS 1.2.96.  "Battery remaining" is transferred as a percentage of the capacity entered in APM (i.e. if you have used 200 mAh and the capacity was set to 2000mAh it will return 90%.) The HK GCS mAh counter then scales the value you have entered on the settings/instruments page by the percentage parameter. I see the bar and numerical value coming down as I use more of the battery.

    In 2.11 there was a problem with the scaling in mavlink_common.h that meant that the parameter was too low by a factor of 100, so it was always reporting back less than 1% remaining, but this was corrected in 2.12

  • Yes, I do plan on addressing this. I was waiting for some decision from the MAVlink team on our proposal of additional fields in a message....but I don't believe they have responded. Right now, there is no field for current (amps) in the MAVlink protocol... You wouldn't believe the number of posts and complaints having to do with battery capacity. I know it's important. I just didn't know it was this important. You don't need to do a work around. I'll fix way I'm handling the message. When I originally wrote tha parsing routine, APM wasn't passing anything having to do with battery capacity or voltage.

     

    I've been swamped with other projects recently and haven't had time to work on my GCS....

This reply was deleted.

Activity