return err;
}
-// Given an real symmetric 3x3 matrix A, compute the eigenvalues
+/* Given an real symmetric 3x3 matrix A, compute the eigenvalues */
static void compute_eigenvalues(double mat[3][3], double* eig1, double* eig2, double* eig3)
{
double p = mat[0][1] * mat[0][1] + mat[0][2] * mat[0][2] + mat[1][2] * mat[1][2];
lookback_count = lookback_counts[info->cal_level];
min_diff = min_diffs[info->cal_level];
- // For the current point to be accepted, each x/y/z value must be different enough
- // to the last several collected points
+ /*
+ * For the current point to be accepted, each x/y/z value must be different
+ * enough to the last several collected points.
+ */
if (cal_data->sample_count > 0 && cal_data->sample_count < MAGN_DS_SIZE) {
unsigned int lookback = lookback_count < cal_data->sample_count ? lookback_count :
cal_data->sample_count;
}
}
-// Platform sensor orientation
+/* Platform sensor orientation */
#define DEF_ORIENT_ACCEL_X -1
#define DEF_ORIENT_ACCEL_Y -1
#define DEF_ORIENT_ACCEL_Z -1
#define DEF_ORIENT_GYRO_Y 1
#define DEF_ORIENT_GYRO_Z 1
-// G to m/s2
+/* G to m/s2 */
#define CONVERT_FROM_VTF16(s,d,x) (convert_from_vtf_format(s,d,x))
#define CONVERT_A_G_VTF16E14_X(s,d,x) (DEF_ORIENT_ACCEL_X *\
convert_from_vtf_format(s,d,x)*GRAVITY)
#define CONVERT_A_G_VTF16E14_Z(s,d,x) (DEF_ORIENT_ACCEL_Z *\
convert_from_vtf_format(s,d,x)*GRAVITY)
-// Degree/sec to radian/sec
+/* Degree/sec to radian/sec */
#define CONVERT_G_D_VTF16E14_X(s,d,x) (DEF_ORIENT_GYRO_X *\
convert_from_vtf_format(s,d,x) * \
M_PI/180)
convert_from_vtf_format(s,d,x) * \
M_PI/180)
-// Milli gauss to micro tesla
+/* Milli gauss to micro tesla */
#define CONVERT_M_MG_VTF16E14_X(s,d,x) (convert_from_vtf_format(s,d,x)/10)
#define CONVERT_M_MG_VTF16E14_Y(s,d,x) (convert_from_vtf_format(s,d,x)/10)
#define CONVERT_M_MG_VTF16E14_Z(s,d,x) (convert_from_vtf_format(s,d,x)/10)