Commit 2705197 1 parent 0a20571 commit 2705197 Copy full SHA for 2705197
File tree 2 files changed +3
-2
lines changed
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -216,7 +216,7 @@ namespace FcComms
216
216
217
217
uint8_t response[FcCommsMspConf::kMspMaxDataLength ];
218
218
219
- // Returns the IMU values
219
+ // Returns the IMU values in m/s^2
220
220
void getAcc (double (&acc_values)[3])
221
221
{
222
222
// Jetson runs in little endian mode and the FC
@@ -238,7 +238,7 @@ namespace FcComms
238
238
// We are also using a hacked up version of cleanflight that does not
239
239
// apply this scaling factor using a bitshift hack before sending so
240
240
// we need to do it here.
241
- acc_values[i] = static_cast <double >(*temp)/(512.0 * 8.0 );
241
+ acc_values[i] = 9.8 * static_cast <double >(*temp)/(512.0 * 8.0 );
242
242
}
243
243
}
244
244
};
Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ namespace FcComms
72
72
FcCommsReturns __attribute__ ((warn_unused_result))
73
73
printRawRC();
74
74
75
+ // Get the acceleration in m/s^2
75
76
FcCommsReturns __attribute__ ((warn_unused_result))
76
77
getAccelerations(double (&accelerations)[3]);
77
78
You can’t perform that action at this time.
0 commit comments