Add support for Baro/Vario in CRSF
Fixes the CRSF part of https://github.com/ArduPilot/ardupilot/issues/26699
Is it possible for me to do some test?
Hardware Kakute F7 Mini and SpeedyBee F405 Wing Mini.
br Karl
With a SpeedyBee F405 Wing I would also like to have a look at this. I would just need the right firmware for it ...
If it is OK!?
I build for the SpeedyBee F405 WING
parameter list version: 4.6.0 dev
FW
Karl
No baro values on SpeedyBee F405 WING mini with FW 4.6.0 dev.
FrSky X10S Express, EdgeTX 2.9.4, HiYounger TX module + BETAFPV 2.4GHz Nano RX ELRS 3.3.2, SppedyBee F405 Wing mini only with BT slave on Serial 6 for communication. No GPS connected.
Do you get any extra sensors if you search for them? I only did ID 9, not ID 7 (Baro only)
@andyp1per Can you please provide a firmware for SpeedyBee F405 Wing?
Deleted all sensor and searched again.
That is, what I have here on the table
It is just a F405 WING Mini with RX and BT module, nothing else. The parameter list with your Version: 4.6.0 dev I posted before. No changes made.
Here the radio telemetry screen and the companion telemetry screen -fresh-
No id 9
br Karl
PS. If helpful, can post same pics with Kakute F7 mini. But there id 9 also did not show up ....
@andyp1per
I think, there is an error on my side.
I cloned your fork ~$ git clone --recurse-submodules https://github.com/andyp1per/ardupilot.git and just build the firmware.
But checking, if your modifications like
are actually in the code I did build here I see that
My apologize for the confusion
Best you provide a firmware for the SpeedyBee F405 Wing
Karl
ID 9 shows up! Wrong value, but it is there .....
Values jumping between -xxxx m and +xxx m here
ID 9 shows up! Wrong value, but it is there .....
![]()
Values jumping between -xxxx m and +xxx m here
Do you have a GPS? Worth checking this when armed and outside as it is relative alt above home position which needs to be set. I used the code from the CRSF spec, so it could be wrong - but not sure how I would tell. What about the vario data?
Try this one, I think I need to invert the sign since AP deals in down rather than up
GPS attached. FW changed. Have the FC here on the window sill
With Ethos 1.5.6
I still have to test whether the values are correct ...
Ethos can evaluate the frame CRSF_FRAMETYPE_BARO_ALTITUDE with ID9 (Alt and VSpd). EdgeTX only evaluates CRSF_FRAMETYPE_VARIO with ID7 (VSpd).
It would be an advantage for Ardupilot if we could use both. Possibly switchable with a flag in RC_OPTIONS or similar. This would cover all transmitter systems.
As for the values themselves, the calculations used for the S.Port protocol can be found in AP_Frsky_Telem. Presumably you can see there which sign is used and adopt this in part for CRSF.
This includes ID 7 - please try it arduplane.zip
EdgeTX 2.9.4 VSpd - ID7 - shows changing values between -25.x m/s to +50.x m/s without movement (incorrect) Alt - ID9 - constantly shows -586.5m (incorrect) for comparison Alt - ID2 - shows 0 (correct)
Ethos 1.5.6 VSpd - ID7 - shows changing values between -25.x m/s to +50.x m/s without movement (incorrect) Alt - ID9 - 0 m (correct) VSpd - ID9 - shows a constant 1.43 m/s (incorrect)
Alt and VSpd show up, but irregular values.
50' YT video showing first baro values on QGroundcontrol and then values on my radio.
https://youtu.be/iiIft0VpIOk
So there was a bug in the new code where it was using absolute alt instead of relative. Should be fixed now.
I think the errors in vspd are actually quantization errors since this is only an 8-bit int. We might have to special-case 0 to return 0;
VSpd id 7. moving up down in between +1xx.x m/s and -9x.x m/s
ALT id 9. -1000.0 m fix, not moving at all
ELRS
arduplane.zip - think there was a sign conversion issue.
Can you send me a disarmed log of your vehicle? There is not a lot going on in these calculations, but there is some weird conversion.
arduplane.zip - think there was a sign conversion issue.
Can you send me a disarmed log of your vehicle? There is not a lot going on in these calculations, but there is some weird conversion.
I am just a user and at the moment there is no vehicle. It is just the SpeedBee in the window sill. MP or QG? But I'll flash now and come back ....
VSpd - varying between -/+ xxx m/s Alt - crazy numbers -/+ xxxxx m
What is that "disarmed log"?? MP or QG
I think, 'data log' in MP. I am on Linux here with QG, but I have a WIN with MP in a Vbox. So I'll try ....
Log 1: original 4.6.0 with ER8GV Vario RX Log 4: Andy 4.6.0 with Standard ELRS RX
You should be able to make a good comparison.
Ok, pretty sure this is correct now:
Constant 10000 is expected - that's 0m above home or 10000dm above the minimum altitude which is 1000m below home. The switching between -1/+1 etc for vpsd is also expected - this is in cm/s for ID7 and is a log scale for ID9 so represents something like +-0.05ms which is perfectly reasonable. So my guess is that the decoding on your TX side that is the problem.
Set RATIO for VSpd and Alt to 0.1 on the radio here. ELRS. Alt and VSpd values now in region +/- x.x m/s and x.x m.
Put the FC in a blown up plastic shopping bag and compress the bag with my hand. Alt value static, VSpd moving, but in my eyes not making seens.
Alt value is relative height above home which will not change unless you arm.
I see on MP, that the FC is ARMED (ARM/DISARM on toggle switch) Alt here with me rock solid -4.5m. Putting a plastic bag over the FC and putting hand pressure on the bag, in MP see - 30 ... -40m, but value is 9 rock solid. For VSpd same. a little variation, but not a measurement as expected ... ELRS
