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

Implement Head Tracking #94

Merged
merged 9 commits into from
Jan 18, 2023
Merged

Implement Head Tracking #94

merged 9 commits into from
Jan 18, 2023

Conversation

pkendall64
Copy link
Contributor

Implementation of Head Tracking.

The head tracker in the HDZero goggles outputs the PPM signal on the HT port on the goggles with the following channel layout

  • Pan -> Channel 0 (TR1 in EdgeTX)
  • Tilt -> Channel 1 (TR2 in EdgeTX)
  • Roll - Channel 2 (TR3 in EdgeTX)

Setup

In the goggles "Head Tracking" page the "Tracking" option should be set to "On", the the goggles should be resting on a level surface and the "Calibrate" option should be selected. I find that resting them on a book on the left and right side, with the face plate above the desk gives the best results.

The "Max Angle" option is used to set the angular limits for the head tracker, i.e. how far your head moves to reach full deflection on the PPM signal. The best way to do this is to first get you head in natural resting position when flying and set the centre point using the "Set Center" option, then select the "Max Angle" option and adjust the value while moving your head left/right, up&down until you get the desired range on the PPM bars at the bottom of the screen.

Usage

When you use the head tracking function, you need to enter the "Head Tracking" page and select the "Set Center" option. This will reset the centre/home point for the goggles, so you need to do this when facing the direction and holding you head in you natural resting position when flying.

src/core/ht.c Show resolved Hide resolved
src/core/ht.c Outdated Show resolved Hide resolved
src/core/ht.c Outdated Show resolved Hide resolved
src/core/ht.c Outdated Show resolved Hide resolved
src/core/ht.c Outdated Show resolved Hide resolved
@bkleiner
Copy link
Contributor

erff, seems github is refusing to rebase because of "too many changes".
could you rebase manually when you get the chance?

@pkendall64
Copy link
Contributor Author

erff, seems github is refusing to rebase because of "too many changes". could you rebase manually when you get the chance?

Rebased and pushed, with whitespace fixes.

@Yith1
Copy link

Yith1 commented Jan 18, 2023

I've not had chance to try this functionality but I noticed something in the description I thought worth commenting on.

When you use the head tracking function, you need to enter the "Head Tracking" page and select the "Set Center" option. This will reset the centre/home point for the goggles, so you need to do this when facing the direction and holding you head in your natural resting position when flying.

This is good, but ideally you'd want a quick way to do this reset as you might have to do it mid flight. Maybe a long click on the right button of the goggles if the Headtracker is enabled? (short click remaining as being record on/off)

@bkleiner
Copy link
Contributor

bkleiner commented Jan 18, 2023

As far as i can tell, this works nicely. The bars on the tx follow the goggles movement. Would be good to have somebody with an gimbal try it too tho.

For button interaction: long press of the right button is currently used to modify the top fan speed (quick de-fog).
i think in the long run we gonna have to implement more gestures like double tap to cover all the functionality.

Feel like it might be a better idea to get this merged and take stock of the button interactions in another PR, potentially also implementing #27

@bkleiner bkleiner merged commit 678d157 into hd-zero:main Jan 18, 2023
@pkendall64 pkendall64 deleted the headtracking branch January 18, 2023 21:12
@bkleiner bkleiner mentioned this pull request Jan 20, 2023
@Yith1
Copy link

Yith1 commented Jan 29, 2023

My test of the Headtracker. In conclusion it worked fine.
Only minor gripe would be that it was easy to click "calibrate" instead of "centre" when picking up the goggles and centerring them ready for use. Perhaps once calibrated that could be the first option? However I'm not sure if moving things around like that is a good user-experience.

https://www.youtube.com/watch?v=Rv4PyhZKh9I

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants