PIDtoolbox icon indicating copy to clipboard operation
PIDtoolbox copied to clipboard

Support for iNAV logs

Open swampmonster opened this issue 4 years ago • 14 comments

First of, Big fan of the work you've been doing on this project. Been using it a lot with betaflight with great results!

On to my question/feature request, would it be possible to add support for iNAV logs? From what i can tell the main issue seems to be that the naming of fields doesn't match up 1 to 1 with betaflight. I sadly dont have a matlab dev environment to help with any code but i'd be happy to provide log files. Another possibility would be if you can point me to the fields pidtoolbox are expecting to find and me writing a tool to convert inav logs to a format that works.

swampmonster avatar Mar 27 '20 09:03 swampmonster

Thanks for the request. Definitely interested in this. Been thinking of reaching out to someone in the inav group. If I could get some logfiles sent my way I’m happy to work on this. I’m not familiar with the details of inav, only to say I realize it has more sophisticated long range and multi sensor control features, which would also be nice to implement into Ptb. Besides Ptb current functionality, what aspects of inav would be valuable for analysis in Ptb? Maybe I could continue this discussion on a Main inav Facebook group where I could probably also get some logfiles.

bw1129 avatar Mar 27 '20 10:03 bw1129

Logs i'd be happy to provide but they do have GPS data in them so i would prefer if i can email them or otherwise send privatly.

swampmonster avatar Mar 27 '20 11:03 swampmonster

Yes, good point. Maybe we can link up over Facebook Messenger. You can find me on the Blackbox log review facebook page.

bw1129 avatar Mar 27 '20 12:03 bw1129

So I’ve been making some progress on this but it hit a roadblock. For some reason Ptb can’t accurately compute set point. This is most likely because it does not understand INAV rate system. I’ve posted the question on inav Facebook site but no responses. Question: what are the main parameters? Eg in BF it’s i)rc_rates (main), ii)superrates (creates expo but modulates max rates) iii)rc_expo (pure expo function with no affect on max rates). I presume inav does not have superrates, so may have to dig into src code to see how this is computed.

bw1129 avatar May 01 '20 12:05 bw1129

Here's what i was able to dig out from the cli and a screenshot of how it looks in the configurator.

roll_rate = 60
Allowed range: 6 - 180

pitch_rate = 60
Allowed range: 6 - 180

yaw_rate = 50
Allowed range: 2 - 180

manual_roll_rate = 100
Allowed range: 0 - 100

manual_pitch_rate = 100
Allowed range: 0 - 100

manual_yaw_rate = 100
Allowed range: 0 - 100

rc_expo = 70
Allowed range: 0 - 100

rc_yaw_expo = 20
Allowed range: 0 - 100

Screenshot 2020-05-10 at 14 19 04

Sort of looks like how bf4.2 will do rates. Very simplified

swampmonster avatar May 10 '20 12:05 swampmonster

Hey thanks! I’ll start looking into this again. I might have to visit the RC set point code in inav. Seems it’s don’t different from BF.

bw1129 avatar May 10 '20 14:05 bw1129

Trying to load an inav 3.0 RC2 (happens with a 2.6 log too) and i get the following error:

image

blackbox log tools correctly read it and i can see data in the latest blackbox explorer fine.

LOG00037.TXT

wx4cb avatar Jun 08 '21 23:06 wx4cb

I honestly didn’t think there were any INAV users that would be interested in this level of tuning. I ended up simplifying the loading code because it was getting so cumbersome that I had to ignore INAV. INAV uses different variable names. I could look into making it work again if there seems to be some more community demand for it. Do you have any sense how many INAVers actually use this tool?

bw1129 avatar Jun 08 '21 23:06 bw1129

I honestly didn’t think there were any INAV users that would be interested in this level of tuning. I ended up simplifying the loading code because it was getting so cumbersome that I had to ignore INAV. INAV uses different variable names. I could look into making it work again if there seems to be some more community demand for it. Do you have any sense how many INAVers actually use this tool?

to be honest, i only just found this tool as it was mentioned in JBs live stream today so i figured i would try it out seeing as the wiki said it supported inav 👍

to be honest i don't think a lot of people know about this in that world. maybe if you're on fb you can go ask in the inav fixed wing group and take a look there ....

wx4cb avatar Jun 08 '21 23:06 wx4cb

for me, it would be more about looking for noise than anything else.

wx4cb avatar Jun 08 '21 23:06 wx4cb

Ok, in that case version 0.392 will still work. V0.4 is just for sophisticated step response tuning

bw1129 avatar Jun 08 '21 23:06 bw1129

Hi guys, I'm also looking at getting PT working with iNAV. Just went through the code quickly and indeed the variable names are different, and feedforward is called axisRate instead of axisF. I think if we could at least replace those and remove unwanted columns from the decoded file it could be read by PT. Though it would have to match BF header. Else, if we can import directly .csv files it would be much easier.

charlesmarseille avatar Jul 01 '21 17:07 charlesmarseille

I didn't want to make a new issue and saw this was open but Inav 4.0 user here all my Quads on iNav for Position Hold etc , I also noticed there is some heavy lifters moving to Inav as well . 0.45 seemed to work fine 0.5 seems to crash a lot, Wish i could provide reasons but it gives a crash sound with no window or error message. Just wanted to add my support for other iNav users.

robmulally avatar Jan 10 '22 00:01 robmulally

Yea there are some known bugs. One common one is make sure there are no spaces in the logfile name (nor weird characters).

bw1129 avatar Jan 10 '22 00:01 bw1129