Ask a Question
GoPro Support Hub Ask a question. Share an answer. Find a solution. Stay stoked.
Announcements
Is your GoPro gear up to date? Check to see If it is on our Update page.
Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.
Sightseer
Posts: 3
Extracting Pitch and Roll as single numbers, frame by frame

Hi there!

 

How can I extract pitch & roll from the Accel and Gyro data frame by frame? Need a single # for each. Essentially...do any of the software packages referenced here allow this? I don't need to display a gauge, I need a number for pitch and roll (deg) for each frame in a CSV file.

Or, can someone shoot me an equation that I can use in Excel to calculate the number from the Accel and Gyro data? Quaternions are simply beyond me!

 

Have MP4s from a GP Hero9 Black. Telemetry extractor is great, but I cannot use the Accel and Gyro data as-is.

 

Ultimately need this:

Time, Lat, Long, Altitude, Heading, Pitch, Roll...

...for each frame.

 

Thank you!

Highlighted
Nomad
Posts: 1,121
Re: Extracting Pitch and Roll as single numbers, frame by frame
Personally I don't know of an off-the-shelf tool for achieving this. I experimented with the concept for the After Effects templates, but results were not consistent (I was hitting AE's script processing limitations and had to take shortcuts).
Sightseer
Posts: 3
Re: Extracting Pitch and Roll as single numbers, frame by frame

What is required is a set of equations, a spreadsheet or an app, to translate the Telemetry Extractor "Camera Orientation" (a set of 4 Quaternions) to camera Yaw (Heading?), Pitch and Roll. H E L P !?

Tourist
Posts: 15
Re: Extracting Pitch and Roll as single numbers, frame by frame

Given that my understanding of Yaw, Pitch and Roll is that it is the angular rotation in radians (or degrees) over a specific period of time.

Since the Gyroscope data extracted from the GoPro video meta data is in radians per second, we only need to determine the amount of rotation over the time interval of the sample.  For example, here are 10 gyroscope readings (obtained from the Telemetry Extractor) with the corresponding angular rotation.

 

dateGyroscope (z) [rad/s]Gyroscope (x) [rad/s]Gyroscope (y) [rad/s]secondsIntervalYaw (rad)Roll (rad)Pitch (rad)Yaw (Deg)Roll (Deg)Pitch (Deg)
2020-07-02T21:36:04.975Z0.0010649627263050.059637912673057-0.0138445154419677764.9750.0110.00001170.00000070.00000000.00067120.0000400-0.0000006
2020-07-02T21:36:04.986Z-0.0042598509052180.056443024494143-0.0394036208732777764.9860.012-0.0000511-0.00000290.0000001-0.0029289-0.00016530.0000065
2020-07-02T21:36:04.998Z-0.0042598509052180.021299254526092-0.04685835995740277764.9980.012-0.0000511-0.00000110.0000001-0.0029289-0.00006240.0000029
2020-07-02T21:36:05.010Z0.001064962726305-0.027689030883919-0.03407880724174777765.010.0120.0000128-0.00000040.00000000.0007322-0.00002030.0000007
2020-07-02T21:36:05.022Z0.008519701810437-0.059637912673057-0.00638977635782777765.0220.0110.0000937-0.00000560.00000000.0053696-0.00032020.0000020
2020-07-02T21:36:05.033Z0.012779552715655-0.062832800851970.0255591054313177765.0330.0120.0001534-0.0000096-0.00000020.0087866-0.0005521-0.0000141
2020-07-02T21:36:05.045Z0.012779552715655-0.0298189563365280.04792332268370677765.0450.0120.0001534-0.0000046-0.00000020.0087866-0.0002620-0.0000126
2020-07-02T21:36:05.057Z0.0095846645367410.0149094781682640.04259850905218377765.0570.0120.00011500.00000170.00000010.00658990.00009830.0000042
2020-07-02T21:36:05.069Z00.0500532481363150.0117145899893577765.0690.0110.00000000.00000000.00000000.00000000.00000000.0000000
2020-07-02T21:36:05.080Z-0.0042598509052180.057507987220447-0.02342917997870177765.080.012-0.0000511-0.00000290.0000001-0.0029289-0.00016840.0000039
Sightseer
Posts: 3
Re: Extracting Pitch and Roll as single numbers, frame by frame

Thanks, @davidr003 ! I'll have a look at this and see about keeping a running tally from the camera's initial orientation on the wing.

Sightseer
Posts: 3
Re: Extracting Pitch and Roll as single numbers, frame by frame
[ Edited ]

Also, I had not seen the Camera Orientation stream option from the Telemetry Extractor.  Color scheme of the buttons over there led me to think that the More Streams button was restricted to the premioum version. My fault!

So the Camera Orientation stream has fields CameraOrientation and 1, 2 & 3. They vary between 1 and -1.

What are these numbers? This may be easier to deal with.

 

Perhaps I need a new post?

 

Thanks!

 

ctsdateCameraOrientation123
89.982020-10-18T16:41:44.314Z1.00000000-0.00012207-0.00003052-0.00033570
122.46452020-10-18T16:41:44.389Z0.99996948-0.00024415-0.00012207-0.00030519
154.9492020-10-18T16:41:44.464Z0.99996948-0.00024415-0.00015259-0.00018311
187.43352020-10-18T16:41:44.539Z0.99996948-0.00027467-0.00015259-0.00024415
219.9182020-10-18T16:41:44.614Z0.99996948-0.00024415-0.00021363-0.00042726
252.40252020-10-18T16:41:44.689Z0.99996948-0.00030519-0.00030519-0.00039674
284.8872020-10-18T16:41:44.765Z0.99996948-0.00036622-0.00042726-0.00012207
317.37152020-10-18T16:41:44.840Z0.99996948-0.00036622-0.00042726-0.00012207
GH010214_1_CORI_1234.png
Nomad
Posts: 1,121
Re: Extracting Pitch and Roll as single numbers, frame by frame
[ Edited ]

That's probably what you are looking for, but in quaternions

Edit "1, 2, 3 & 4" (or up to 3 in the CSV) are the labels the Extractor gives to each value, because they are not labelled one by one by the camera