sendPOSI command change (double for lat/lon/h) (#111)
* Updated POSI to use doubles for lat/lon/alt, as step size for floats was unacceptably large at high longitudes.
This commit is contained in:
committed by
Jason Watkins
parent
48656f2b4c
commit
0e493920fa
@@ -56,4 +56,28 @@ int compareArrays(float* expected[], int esizes[], float* actual[], int asizes[]
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
int compareDoubleArray(double expected[], double actual[], int size)
|
||||
{
|
||||
return compareDoubleArrays(&expected, &size, &actual, &size, 1);
|
||||
}
|
||||
|
||||
int compareDoubleArrays(double* expected[], int esizes[], double* actual[], int asizes[], int count)
|
||||
{
|
||||
for (int i = 0; i < count; ++i)
|
||||
{
|
||||
if (esizes[i] != asizes[i])
|
||||
{
|
||||
return -100 - i;
|
||||
}
|
||||
for (int j = 0; j < esizes[i]; ++j)
|
||||
{
|
||||
if (!feq(actual[i][j], expected[i][j]) && !isnan(expected[i][j]))
|
||||
{
|
||||
return -1000 - i * 100 - j;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user