Skip to content
Snippets Groups Projects
Commit e20f7b34 authored by Paul Best's avatar Paul Best
Browse files

fix useless conversion

parent f6db98c2
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -68,6 +68,10 @@ int main(int argc, char* argv[]){
fprintf(outfile, "\n rorqual predPeaks\n");
for(i=0; i<rapport.numDetectionsRorqual; i++){
fprintf(outfile, "%hd,", rapport.predPeaksR[i]);
printf("%f ", rapport.predsR[rapport.predPeaksR[i]]);
}
if(rapport.numDetectionsRorqual > 0){
printf("\n");
}
fprintf(outfile, "\n rorqual samples\n");
for(i=0; i<rapport.numDetectionsRorqual; i++){
......@@ -85,6 +89,10 @@ int main(int argc, char* argv[]){
fprintf(outfile, "\n cacha predPeaks\n");
for(i=0; i<rapport.numDetectionsCachalot; i++){
fprintf(outfile, "%hd,", rapport.predPeaksC[i]);
printf("%f ", rapport.predsC[rapport.predPeaksC[i]]);
}
if(rapport.numDetectionsCachalot > 0){
printf("\n");
}
fprintf(outfile, "\n cacha samples\n");
for(i=0; i < fmin(rapport.numDetectionsCachalot, CACHA_RAPPORT_NSAMPLESTOSEND); i++){
......
No preview for this file type
......@@ -118,15 +118,6 @@ void parseMPU(unsigned char* additionnalDataBlock, int size, bool verbose, FILE*
fprintf(mpuFile, "%hd\n", val);
}
}
float ax = ((float) toLittleEndian(*((short int*) (curData + 13)))) / 32756 * 19.62; // resolution +- 2g
float ay = ((float) toLittleEndian(*((short int*) (curData + 15)))) / 32756 * 19.62;
float az = ((float) toLittleEndian(*((short int*) (curData + 17)))) / 32756 * 19.62;
float gx = ((float) toLittleEndian(*((short int*) (curData + 19)))) / 32756 * 250; // resolution +- 255deg/sec
float gy = ((float) toLittleEndian(*((short int*) (curData + 21)))) / 32756 * 250;
float gz = ((float) toLittleEndian(*((short int*) (curData + 23)))) / 32756 * 250;
float mx = ((float) toLittleEndian(*((short int*) (curData + 25)))) / 32756 * 0.15; // utesla
float my = ((float) toLittleEndian(*((short int*) (curData + 27)))) / 32756 * (-0.15); // - car magneto oppose a accelero
float mz = ((float) toLittleEndian(*((short int*) (curData + 29)))) / 32756 * (-0.15); // - car magneto oppose a accelero
maxtimeStamp = timestamp;
}
curData += trameSize + 1; // shift of trame size + 1 byte of checksum
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment