Coder Social home page Coder Social logo

Comments (8)

Sibyx avatar Sibyx commented on July 2, 2024

Hi @wivaku,
right now there is no implementation for Bad-Elf trackpoint extension. You need to write your own:

Then you need to add your parser into ExtensionParser.

I hope I answered your question, if there is something I can help you feel free to ask. If you are going to have a PR, I will gladly merge it :) And happy new year! 🥳

from phpgpx.

wivaku avatar wivaku commented on July 2, 2024

Thanks for the quick reply (and: happy new year to you as well!)
Writing my own is probably beyond my current skillset. I.e. not sure how to add a 2nd one.

Related / as an alternative: when parsing, would it be possible to group all unsupported extensions under "unsupported"?

e.g. Bad Elf:

  +extensions: phpGPX\Models\Extensions^ {#783
    +trackPointExtension: null
    +unsupported: [
      "speed": 2.006332
    ]
  }

compared:
Garmin:

  +extensions: phpGPX\Models\Extensions^ {#780
    +trackPointExtension: phpGPX\Models\Extensions\TrackPointExtension^ {#786
      +aTemp: 19.5
      +avgTemperature: 19.5
      +wTemp: null
      +depth: null
      +heartRate: null
      +hr: null
      +cadence: null
      +cad: null
      +speed: null
      +course: null
      +bearing: null
      +namespace: "http://www.garmin.com/xmlschemas/TrackPointExtension/v2"
      +extensionName: "TrackPointExtension"
    }
    +unsupported: [] 

from phpgpx.

Sibyx avatar Sibyx commented on July 2, 2024

The library already suppose to work like you described (unsupported should appear in unsupported field). I am not sure if it works properly (there is a nasty two years old FIXME comment - I am sorry). Anyway, I should check it out

from phpgpx.

wivaku avatar wivaku commented on July 2, 2024

That is hopeful! Will monitor this ticket. No hurry.
The above shows the details of the Bad Elf example, if you need a complete example file: let me know.

from phpgpx.

Sibyx avatar Sibyx commented on July 2, 2024

If you can share a GPX file, testing will be much more easier!

from phpgpx.

wivaku avatar wivaku commented on July 2, 2024

Done, sent to your gmail address.

from phpgpx.

Sibyx avatar Sibyx commented on July 2, 2024

Hi,
In last commit I have fixed ExtensionParser to correctly fill unsupported extension field.

There is no new release, so you have to use master branch.

from phpgpx.

wivaku avatar wivaku commented on July 2, 2024

Thanks a lot! I can confirm this works. Used composer require sibyx/phpgpx:dev-master.

from phpgpx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.