-
-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Some AFHDS2A/AFHDS3 GPS/ALT telemetry handling issues #3582
Conversation
The root issue here is that FlySky "PREC7" is not really supported. In The easy fix is to lower precision from 7 to 2, so at least value is not truncated. |
So where are things at with this PR now? |
Need more work for this. Need somebody to help to compare the output of the same sensor connect via different equipments. |
As in? AFHDS2 vs AFHDS3 receiver? Native vs MPM? |
Yes, there are a few paths in the code:
All I want to do is to align the sensor outputs in different paths. |
You're lucky... the PL18 still has Flysky fw on it atm, so I can do 1,3,4 easily enough, and need to do the https://github.com/EdgeTX/edgetx/wiki/Flysky-FRM303-Mod-for-TX16S for some of the other PRs and stuff anyway, so will do that tomorrow (thus 2, with FRM303). My MPM TX16S with failed |
So after some fiddling around, these are the results (with the current state of this PR, and either FS-iA6B or FTr12B RX, the same FS-CAT01 sensor mostly stationary on the desk, attempting to have similar power on and run times to minimise self-heat variability... was done in the order of this list which may explain some variance): AFHDS3 receiver connected to PL18 with Flysky firmware. AFHDS3 receiver connected to EdgeTX radios with IRM301 or FRM303. AFHDS2 receiver connected to EdgeTX NV14 with internal AFHDS2 module. AFHDS2 receiver connected to EdgeTX radios with MPM. So, IMO, pressure was as consistent as it's going to be with these sensors (when reported). Altitude consistently went down the longer the sensor was connected, so it may be related to self-heat if the temperature is (edit) not factored in as part of the calculation. While from start to end it's a variance of 10m, overall it's not excessively great a variance. I'm going to try the FRM303 again with a rebased version of this branch to see if telemetry was broken when this PR was started. edit: I did that with no change, but also realised you must have rebased this recently as it was only a few commits behind. Will try again tomorrow with a nightly to try and pin it down further. |
Alt is calculated with pressure alone. |
I think I may need to work out some more tweaks for the gps readings in this PR. Almost forgotten about this PR |
* Fix widgets vs. sensors (TX16s/FS-IA6B FW2.8.3) and updated meaningful units. * Updated the GPS sensors to degree unit. * Fixed a bug in AFHDS2 Alt decoding. * Fixed a typo. * Update GPS sensors format. * Change Long/Lat unit to RAW.
* Fix widgets vs. sensors (TX16s/FS-IA6B FW2.8.3) and updated meaningful units. * Updated the GPS sensors to degree unit. * Fixed a bug in AFHDS2 Alt decoding. * Fixed a typo. * Update GPS sensors format. * Change Long/Lat unit to RAW.
I needed to add Flysky altitude telemetry processing to er9x (for the ATMEGA devices). I've used this code, but had problems due to the uint64_t arithmetic. Looking closely at the code the 19-bit pressure value is shifted left 16 places (needing more than 32 bits), then divided by the SeaLevelPressure (101320). |
Fixes (partially) #3543
Fixes #3583