Link Lost question and maybe improvement idea

hi,
i noticed that apm_planner reset “battery %” to 100% if link to vehicle was lost for some seconds.

at time i lost sometimes link connection from 3d radio in flight. if this happens i only can fly checking my rc-transmitter stop timer which also is running. but imo it would be helpfully if there is something like a average current calculation for link lost situations in apm_planner UAS object. maybe based on current consume during the last 60 seconds before link was lost. i noticed that apm_planer calculate something like a connection time-out time.

for me current % and battery voltage are the most important informations during flight.

/g
wolke

// edit
some infos about me, i currently work on a small armhf based groundstation. for this work i forked apm_planner2 on github to wolkstein/apm_planner2. at first i do working on some audio information tweaks on linux based plattforms. for me it is important that battery charge level will spoken as text message in defined percent steps for example 5%. currently i study UAS.cc. and i plan to implement a improvement like i describe in this thread. but i also unsure if such implementations in UAS.cc are the right place. at least i am at the beginning to understand qgroundcontroll software, which contains so many classes and functions. i am not intersted to waste apm_planner systems because the possibility for merging this work into the main repository.

Hi,

The percentage is reported from the APM, so if it resets to 100% it means the APM was reset.

As for code contributions, please raise a pull request of changes and we can discuss. I’m sure we can find a way to incorporate your solution.

Thx

hi,
i am a little bit confused because resetting apm if link lost to groundstation. can this happens in flight without crashing? here this happens without any effects in flight.

i create an issue #169 on github. but i have create no pull request because new library dependency’s. also i am unsure if audio things are relevant for apm planner. and i can not test my changes on other systems beside linux. so i can not ensure if this changes broke building on other platforms.

i created a pull request for alsa audio on github.

thx
wolke