Skip to content

Commit

Permalink
Switched to extracting double precision for GPS location.
Browse files Browse the repository at this point in the history
  • Loading branch information
dnewman-gpsw committed Sep 6, 2017
1 parent d0e6c08 commit 6947aec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions demo/GPMF_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* @brief Demo to extract GPMF from an MP4
*
* @version 1.0.0
* @version 1.0.1
*
* (C) Copyright 2017 GoPro Inc (http://gopro.com/).
*
Expand Down Expand Up @@ -167,9 +167,9 @@ int main(int argc, char *argv[])
{
uint32_t samples = GPMF_Repeat(ms);
uint32_t elements = GPMF_ElementsInStruct(ms);
uint32_t buffersize = samples * elements * sizeof(float);
uint32_t buffersize = samples * elements * sizeof(double);
GPMF_stream find_stream;
float *ptr, *tmpbuffer = malloc(buffersize);
double *ptr, *tmpbuffer = malloc(buffersize);
char units[10][6] = { "" };
uint32_t unit_samples = 1;

Expand All @@ -195,7 +195,7 @@ int main(int argc, char *argv[])
}

//GPMF_FormattedData(ms, tmpbuffer, buffersize, 0, samples); // Output data in LittleEnd, but no scale
GPMF_ScaledData(ms, tmpbuffer, buffersize, 0, samples, GPMF_TYPE_FLOAT); //Output scaled data as floats
GPMF_ScaledData(ms, tmpbuffer, buffersize, 0, samples, GPMF_TYPE_DOUBLE); //Output scaled data as floats

ptr = tmpbuffer;
for (i = 0; i < samples; i++)
Expand Down

0 comments on commit 6947aec

Please sign in to comment.