Comparison actual speed from gps track versus allowed speed

This forum deals with mapmatching.
Post Reply
LNM_PTV
Posts: 14
Joined: Mon Apr 18, 2016 12:25 pm

Comparison actual speed from gps track versus allowed speed

Post by LNM_PTV »

Hello!

Does anyone have a code sample in which the input are the GPS tracks including the actual speed and the output is a comparison between actual speed and allowed speed?

Thank you very much.
Lars Moritz
Technical Consultant
PTV GROUP, Germany
Joost
Posts: 307
Joined: Fri Apr 25, 2014 1:46 pm

Re: Comparison actual speed from gps track versus allowed sp

Post by Joost »

Joost Claessen
Senior Technical Consultant
PTV Benelux
User avatar
Bernd Welter
Site Admin
Posts: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Comparison actual speed from gps track versus allowed sp

Post by Bernd Welter »

Hi there,

Do we have a minimalistic sample for the usecase based on just 1 single coordinate per call?
The logical signature I need is somehow
- input: latitude, longitude (optional: timestamp)
- output: speedlimit for that vehicle category (at the given timestamp)

When I use matchPositions the API complains about "Not enough input positions for stable matching (at least six are needed)".

Do we recommend to use xMapmatch for that or is it better to work with additional content such as A2I/I2A tables or IDMapping and a more or less simple SQL query?

Best regards,
Bernd
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
Joost
Posts: 307
Joined: Fri Apr 25, 2014 1:46 pm

Re: Comparison actual speed from gps track versus allowed sp

Post by Joost »

xMapmatch can work single points, but then you need to make you have Mapmatching / HistoryConsideration / @enabled set to false in your profile. You can use the standard profile "local-matching" for this.
Do we recommend to use xMapmatch for that or is it better to work with additional content such as A2I/I2A tables or IDMapping and a more or less simple SQL query?
Actually xMapmatch can also work with the A2I/etc tables. If you use the matchPositions method and set the ResultListOptions.vendorId to true then in the result on the matched segment you can find the vendor ID with can be used to lookup the date in the L2S / SPL side tables.

The question is more should you take the effort to implement the side table lookup or just use the forwardSpeedlimit returned by xMapmatch?

The benefit of using xMapmatch directly is that xMapmatch has used the heading to select correct directional speed limit.
The benefit of using side table is that you get more information on conditional speed limits like weather or time dependent.
Joost Claessen
Senior Technical Consultant
PTV Benelux
Post Reply