-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Pan servo home direction offset #6501
Pan servo home direction offset #6501
Conversation
@avsaase Wow. I wasn't expecting anyone to take any notice this soon. The need for such a function. Is because to our minds getting confused between what we see in the camera and what the home arrow is trying to tell us. e.g. If the plane is heading due east 90° and your home location is 30° to your right at that given distance. Although, there is another problem that also has to be addressed..... That is, the plane will not be heading towards the home. Even though you could be looking in the direction of home and the home arrow (with the new feature) will now confirm this. My idea would be to add another addition to this PR you have implemented. How does this sound to you? |
I understand why you asked for this feature, but in any case it can never solve all problems because the COG is often not the same as the direction the camera points due to crosswinds. I think flying with camera pan can always be confusing if you forget you're not looking straight ahead, regardless of this PR. Maybe a separate pan degree OSD element would be a better solution for this? |
I have not tried this out in flight as I don't have a pan servo setup, but the more I think about it the more confusing I think this option may be. I'll leave it up to the devs to decide what they want to do with this PR. |
@avsaase This feature aligns the instrumentation (home arrow) with camera image, to prevent confusion. And its nice to have that confirmation between the two. But the logic conditions below should be implemented by the user to assist the feature. These OpenTX conditions, will prevent the Pan servo being left slightly offset. It will automatically aligning the camera with the planes heading after 25 seconds, if the pan servo is not being manually driven within that period of time.. @avsaase I would like to thank you for noticing my feature request and the time you put into writing this PR. I don't take for granted the effort you guys put in. This PDF explains the feature limitations and setup in more detail for user who find this PR |
This sounds really cool. The home arrow being based on the viewing direction makes a lot of sense to me. What would also be cool, would be the inverse of this. So a mode where the camera looks towards the home direction. That way, if you do get lost in an unfamiliar area, it's even easier to find your way back. Enable the pan follows home point mode and bank around until you're flying towards home. I think then you would also benefit from an OSD pan direction indicator, like @avsaase mentioned earlier. Nice work guys. |
@MrD-RC I tested it out a while back and it works well. Alexander done a good job with it. |
Nice @Jetrell. Mind if I share the PDF in an article I’m writing on the changes in 3.0. |
I have just tested this new feature, but for me the configured degrees doesn't match the servo travel. I guess the problem is my servo needs a PWM signal from 500 to 2500, so it looks like I have the use half the degrees value to make it work properly. |
@danielolsman What kind of servos are that? I've never heard of that before. This feature indeed assumes servos that use 1000-2000 us PWM, so if you have double that range you probably need to double or halve something. |
This is the servo I have : it's no big deal, I will change the value until it's right. I have lowered the value and it's getting closer |
Resolves #6500 (@Jetrell can you confirm this is what you asked for?). This PR creates two cli commands:
osd_pan_servo_index
to select the pan servo andosd_pan_servo_pwm2centideg
to set the rotation of the pan servo as a function of the pwm signal. For a 180 degrees servo this most likely needs to be set to18
. Change the sign to reverse the offset direction.Example:
pan_servo_home_dir_offset.mp4
Testing this on the bench is a bit of a hassle. I found the easiest way is to set a safehome nearby and remove
&& isImuHeadingValid()
frominav/src/main/io/osd.c
Line 1334 in 0179917
This could also be applied to other OSD elements, the HUD elements would be good candidates for this (obviously that also needs a tilt offset). If there is interest I can make a separate PR for that or add it to this one.