Skip to content
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

2.9.2: Calculated telemetry sensor "distance" not working #4437

Closed
1 task done
mha1 opened this issue Dec 19, 2023 · 0 comments · Fixed by #4442
Closed
1 task done

2.9.2: Calculated telemetry sensor "distance" not working #4437

mha1 opened this issue Dec 19, 2023 · 0 comments · Fixed by #4442
Labels
bug 🪲 Something isn't working

Comments

@mha1
Copy link
Contributor

mha1 commented Dec 19, 2023

Is there an existing issue for this problem?

  • I have searched the existing issues

What part of EdgeTX is the focus of this bug?

Transmitter firmware

Current Behavior

The calculated telemetry sensor "distance" delivers erratic output.

Expected Behavior

Distance calculation outputs actual distance to initial GPS position.

Steps To Reproduce

The error occurs on radio and simulator. To reproduce use the simulator with enabled telemetry simulator:

  1. setup model and discover telemetry
  2. add calculated telemetry sensor using GPS and Alt, name it "GPdi"

image

  1. initialize Alt to an arbitrary value e.g. 123m and the GPS position to 25.9973,-97.15712.
  2. Go to Reset telemetry/Reset flight to auto-offset ALT and set the initial GPS Position
  3. check Alt and GPS to be the set GPS position, Alt to be 0m and GPdi to be 0m

image

  1. change GPS position to 25.9973,-97.15711 (i.e. change least significant longitude digit from 2 to 1 resulting in a change of 0.1 seconds). Expect distance now to be slightly less than 1m.
  2. observe change of GPdi to 24189m

image
image

Version

2.9.2

Transmitter

RadioMaster TX16S / TX16SMK2

Operating System (OS)

No response

OS Version

No response

Anything else?

If was a gambler I'd put my money on #4250

@mha1 mha1 added bug 🪲 Something isn't working triage Bug report awaiting review / sorting labels Dec 19, 2023
mha1 added a commit to mha1/edgetx that referenced this issue Dec 20, 2023
Sharing the calculated earth radius of the pilot's GPS position (home point) with value in a union leads to overwriting the earth radius upon craft's position because value is newly used to store a hash to allow value widget to recognize change in crafts's lat/lon.

changes:
- moved storage of home point earth radius to gps struct to prevent overwriting the home point earth radius. This should not affect RAM usage.
@pfeerick pfeerick removed the triage Bug report awaiting review / sorting label Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants