hi everyone,
looking for some best practice, advice, and awesomeness from you guys on this one.
has anyone ever tried calculating speed from lat / long fields in data?
for example, I have a .gpx data that looks like this:
<time>2015-02-27T09:03:01.000-07:00</time></trkpt>
<trkpt lat="43.58573655" lon="-110.82813699">
<ele>1930.0</ele>
<time>2015-02-27T09:03:02.000-07:00</time></trkpt>
<trkpt lat="43.58597959" lon="-110.82789655">
<ele>1918.0</ele>
<time>2015-02-27T09:03:18.000-07:00</time></trkpt>
<trkpt lat="43.5859905" lon="-110.82785591">
<ele>1918.0</ele>
<time>2015-02-27T09:03:19.000-07:00</time></trkpt>
<trkpt lat="43.58598692" lon="-110.8278205">
<ele>1918.0</ele>
fields = _time, lat, lon, ele
i want to calculate some basic metrics - average speed, top speed - and would love to hear opinions on searches to tackle this so I'm not reinventing the wheel.
in the future I will build in some playback element to view the route vs. speed in splunk but for now I just want to know how others have tackled this.
examples = kudos 🙂
thanks in advance!
-dave
Hi Dave
There is a custom Splunk command, haversine, that calculates the distance between two lon and lat points. You can download this command here:
https://apps.splunk.com/app/936/
After that you should be able to calculate the speed
speed=distance/delta-time
j
Follow up blog post with some examples here: http://blogs.splunk.com/2015/03/22/downhill-splunking-part-1/
Hello
You could use the haversine app: https://apps.splunk.com/app/936/
It does works with 6.x, I tested it.
To get the distance between two points, and with the difference in the timestamps you could calculate the velocity between 2 coordinates
Regards
Hey Guillermo - thanks!
I was wondering wether you had built a search to calculate speed between each event when using this app? If so, what did it look like? I'm struggling to get one built that works well.
@himynamesdave,
Any luck with calculating of speed ? I'm also looking for similar solution
Hi Dave
There is a custom Splunk command, haversine, that calculates the distance between two lon and lat points. You can download this command here:
https://apps.splunk.com/app/936/
After that you should be able to calculate the speed
speed=distance/delta-time
j
Hey Johan - thanks!
I was wondering wether you had built a search to calculate speed between each event when using this app? If so, what did it look like? I'm struggling to get one built that works well.