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

max speed filter m/s setting, when exceeded causes tracking to stop until reboot #121

Open
AlexC176 opened this issue Jun 1, 2022 · 1 comment

Comments

@AlexC176
Copy link

AlexC176 commented Jun 1, 2022

Another field test and I've replicated a problem with the "max speed filter m/s" on SPRACINGF3 RC1-11.1.0. On previous test flights with the value set to 40m/s I completely lost the tracking function.

Steps to replicate 1) set the value to walking speed 4m/s. The tracker will track perfectly while you circle outside of the start tracking distance (m) at a steady walk. Then perform a fast sprint past the tracker to exceed the 4m/s threshold. The tracker will freeze and no longer track the target until powered off. I have zero the max speed filter m/s to 0 to avoid this bug.

File Main.c , function void updateTargetPosition(void)

if(masterConfig.max_speed_filter == 0 || targetCurrent.speed < masterConfig.max_speed_filter) {
epsVectorLoad(&targetCurrent,targetPosition.lat,targetPosition.lon,currentDistance,targetLast.time,currentTimeMillis);//epsVectorSpeed(targetLast.time,currentTimeMillis,currentDistance);

Once the max speed threshold is exceeded
epsVectorLoad(&targetCurrent,targetPosition.lat,targetPosition.lon,currentDistance,targetLast.time,currentTimeMillis);//epsVectorSpeed(targetLast.time,currentTimeMillis,currentDistance);

Is never updated with current state values and the subsequent function call epsVectorCurrentToLast(&targetCurrent,&targetLast) copies the identical values from targetCurrent to targetLast every call.

I think the fix is to update the filter if {} statement to the following ; you have already calculated the currentSpeed.

if(masterConfig.max_speed_filter == 0 || currentSpeed < masterConfig.max_speed_filter) {
epsVectorLoad(&targetCurrent,targetPosition.lat,targetPosition.lon,currentDistance,targetLast.time,currentTimeMillis);//epsVectorSpeed(targetLast.time,currentTimeMillis,currentDistance);

@AlexC176 AlexC176 changed the title max speed filter m/s setting, when exceeded causes tracking to stop max speed filter m/s setting, when exceeded causes tracking to stop until reboot Jun 1, 2022
@raul-ortega
Copy link
Owner

raul-ortega commented Nov 11, 2024

I've updated development including this fix. This will be published in stable version 11.3.0.

Commit 82f7264

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

No branches or pull requests

2 participants