JuanIrache / gopro-telemetry

Reads telemetry from the GPMF track in GoPro cameras (Hero5 and later) and converts it to multiple formats
https://tailorandwayne.com/gopro-telemetry-extractor/
MIT License
310 stars 56 forks source link

Remove egm96 #192

Closed Akxe closed 1 year ago

Akxe commented 1 year ago

When testing, I noticed that when bundled, the egm96 library is 2.5mb in size. There must be a better way to convert to the correct output without being the 99% of the library size...

JuanIrache commented 1 year ago

I see the following options:

Akxe commented 1 year ago

I like to option that user might provide the library on its own.

I see two options:

I do, however see a problem if the user is not aware of the option to provide seaLeveCorrection fn/library he would not know how to fix it... A warning could do it, but I am not sure that that would be a good fix either.

JuanIrache commented 1 year ago

I like the optional peer dependency route. Then in processGPS5.js we only proceed to the condition around line 45 if the library is present. Maybe print a warning if egm96-universal is missing. The warning can be avoided by setting the ellipsoid option to true and geoidHeight to false

Akxe commented 1 year ago

Just as I finish types for the library I will look into making the dependency optional and let you do the warning :)