diff Discovery/Src/base.c @ 621:6826731ff2be

Use roll and pitch agles in 0-360 format: The roll and pitch values are provided as pos/neg angle values which causes problems in the vector calculation for the motion detection => changed the implementation to store the calibration data with a 180? offset. Also shift value by 180? before they are used for vector calculations.
author Ideenmodellierer
date Wed, 03 Feb 2021 21:44:22 +0100
parents 556df4a8f418
children ba83a8ef9bad
line wrap: on
line diff
--- a/Discovery/Src/base.c	Wed Jan 27 22:12:44 2021 +0100
+++ b/Discovery/Src/base.c	Wed Feb 03 21:44:22 2021 +0100
@@ -751,7 +751,7 @@
 							pSettings->design = 7;
 							if(pSettings->MotionDetection == MOTION_DETECT_SECTOR)
 							{
-								DefinePitchSectors(pSettings->viewPitch,CUSTOMER_DEFINED_VIEWS);
+								DefinePitchSectors((float)(pSettings->viewPitch - 180.0),CUSTOMER_DEFINED_VIEWS);
 								MapCVToSector();
 							}
 						}
@@ -767,7 +767,7 @@
 						pSettings->design = 3;
 						if(pSettings->MotionDetection == MOTION_DETECT_SECTOR)
 						{
-							DefinePitchSectors(pSettings->viewPitch,CUSTOMER_DEFINED_VIEWS);
+							DefinePitchSectors((float)(pSettings->viewPitch - 180.0),CUSTOMER_DEFINED_VIEWS);
 							MapCVToSector();
 						}
 					}