Open troysurrett opened 6 years ago
Ultimately, this may need to end up in FIT format to get Garmin VIRB Edit to do what I want. Here's a ruby tool that will help me write to it, because the format as defined is kinda hard to use: https://github.com/scrapper/fit4ruby
Looks like I can put the gyroscope and magnetometer data into a FIT
file:
9.2.1 “three_d_sensor_calibration” Messages
The three_d_sensor_calibration message identifies the calibration values needed to convert the data recorded by the sensors to the desired units for the end user. The calibration message can currently be used for values collected by accelerometers, gyroscopes, and magnetometer (compass) into g, deg/s, and G’s respectively. The calibration values help to tare the sensor, adjust for positioning, and keep the data points within the correct range.
9.2.2 “accelerometer_data” Messages
The accelerometer sensor collects samples that consist of x, y, z points and a sample offset time that indicates the milliseconds between when the sample was taken and the timestamp in the message. The samples may span between multiple seconds but the message is limited to 30 samples and each sample point is limited to 16-bits. The x, y, z points are the raw ACD values with some mild processing done on them by the accelerometer. Calibrated x, y, and z fields exist to allow processed x, y, z points to be added to the message.
9.2.3 “gyroscope_data” Messages
The gyroscope sensor collects samples that consist of x, y, z points and a sample offset time that indicates the milliseconds between when the sample was taken and the timestamp in the message. The samples may span between multiple seconds but the message is limited to 30 samples and each sample point is limited to 16-bits. The x, y, z points are the raw ACD values with some mild processing done on them by the gyroscope. Calibrated x, y, and z fields exist to allow processed x, y, z points to be added to the message.
9.2.4 “magnetometer_data” Messages
The magnetometer sensor collects samples that consist of x, y, z points and a sample offset time that indicates the milliseconds between when the sample was taken and the timestamp in the message. The samples may span between multiple seconds but the message is limited to 30 samples and each sample point is limited to 16-bits. The x, y, z points are the raw ACD values with some mild processing done on them by the magnetometer. Calibrated x, y, and z fields exist to allow processed x, y, z points to be added to the message.
From the FitSDK file "Fit File Types Description" page 57.
The 360Fly comes with a full set of sensors, including gyroscope and accelerometer, but the GPS output that RaceRender will put into a
.gpx
file is pretty thin. My suspicion is that a tool like GarminVIRB Edit could consume the gyro and accelerometer fields to stabilize the video, or provide more overlays like g-force, or identify hull-slams (and therefore, exciting splashes), however currently I'm unable to consume this data because it is trapped in CSVs.To complete this project I'm going to have to read up on the GPX standard and see what fields it can consume, then write a tool, probably in Ruby, that takes in the 6 CSV files and generates a single GPX file.