<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Calculation of distance and traveltime with multiple GPS points in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Calculation-of-distance-and-traveltime-with-multiple-GPS-points/m-p/766774#M243035</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks, I did that prior to my post without any luck.&lt;/P&gt;</description>
    <pubDate>Thu, 09 Sep 2021 07:30:20 GMT</pubDate>
    <dc:creator>Mikkel_madsen</dc:creator>
    <dc:date>2021-09-09T07:30:20Z</dc:date>
    <item>
      <title>Calculation of distance and traveltime with multiple GPS points</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculation-of-distance-and-traveltime-with-multiple-GPS-points/m-p/766546#M242943</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a rather complicated task which I would love your input on. It consists of several tasks/ issues. Overall, the data look similar to this (beware: &lt;STRONG&gt;&lt;U&gt;these data are fake&amp;nbsp;&lt;/U&gt;&lt;/STRONG&gt;and i only an example):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="1" width="102.2632435108565%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="10%" height="30px" class="lia-align-center"&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="10%" height="30px"&gt;&lt;STRONG&gt;Event_time&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="10%" height="30px"&gt;&lt;STRONG&gt;Event_east&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="10%" height="30px"&gt;&lt;STRONG&gt;Event_north&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="10%" height="30px"&gt;&lt;STRONG&gt;Poi_east&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="10%" height="30px"&gt;&lt;STRONG&gt;Poi_north&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="10%" height="30px"&gt;&lt;STRONG&gt;Notify_time&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="2.5%" height="30px"&gt;&lt;STRONG&gt;Pos_east&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="2.5%" height="30px"&gt;&lt;STRONG&gt;Pos_north&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="5%" height="30px"&gt;&lt;STRONG&gt;Pos_time1&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="10%" height="30px"&gt;&lt;STRONG&gt;Pos_east1&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="2.5%" height="30px"&gt;&lt;STRONG&gt;Pos_north1&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="2.5%" height="30px"&gt;&lt;STRONG&gt;Pos_time2&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="2.5%" height="30px"&gt;&lt;STRONG&gt;Pos_east2&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="0.625%" height="30px"&gt;&lt;STRONG&gt;Pos_north2&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="0.625%" height="30px"&gt;&lt;STRONG&gt;Pos_time3&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="0.625%" height="30px"&gt;&lt;STRONG&gt;Pos_east3&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="0.625%" height="30px"&gt;&lt;STRONG&gt;Pos_north3&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="10%" height="57px"&gt;1&lt;/TD&gt;
&lt;TD width="10%" height="57px"&gt;11Feb2021:18:08:02&lt;/TD&gt;
&lt;TD width="10%" height="57px"&gt;12.134963&lt;/TD&gt;
&lt;TD width="10%" height="57px"&gt;55.461058&lt;/TD&gt;
&lt;TD width="10%" height="57px"&gt;12.451788&lt;/TD&gt;
&lt;TD width="10%" height="57px"&gt;55.421875&lt;/TD&gt;
&lt;TD width="10%" height="57px"&gt;2021-02-11T18:09:55.000+01:00&lt;/TD&gt;
&lt;TD width="2.5%" height="57px"&gt;12.124598&lt;/TD&gt;
&lt;TD width="2.5%" height="57px"&gt;55.457985&lt;/TD&gt;
&lt;TD width="5%" height="57px"&gt;2021-02-11T18:10:55.000+01:00&lt;/TD&gt;
&lt;TD width="10%" height="57px"&gt;12.561334&lt;/TD&gt;
&lt;TD width="2.5%" height="57px"&gt;55.876498&lt;/TD&gt;
&lt;TD width="2.5%" height="57px"&gt;2021-02-11T18:11:55.000+01:00&lt;/TD&gt;
&lt;TD width="2.5%" height="57px"&gt;12.457935&lt;/TD&gt;
&lt;TD width="0.625%" height="57px"&gt;55.215469&lt;/TD&gt;
&lt;TD width="0.625%" height="57px"&gt;2021-02-11T18:10:57.000+01:00&lt;/TD&gt;
&lt;TD width="0.625%" height="57px"&gt;12.457896&lt;/TD&gt;
&lt;TD width="0.625%" height="57px"&gt;55.897569&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="10%" height="30px"&gt;2&lt;/TD&gt;
&lt;TD width="10%" height="30px"&gt;12Feb2021:16:12:00&lt;/TD&gt;
&lt;TD width="10%" height="30px"&gt;12.457965&lt;/TD&gt;
&lt;TD width="10%" height="30px"&gt;55.589512&lt;/TD&gt;
&lt;TD width="10%" height="30px"&gt;12.021369&lt;/TD&gt;
&lt;TD width="10%" height="30px"&gt;55.021369&lt;/TD&gt;
&lt;TD width="10%" height="30px"&gt;2021-02-12T16:12:55.000+01:00&lt;/TD&gt;
&lt;TD width="2.5%" height="30px"&gt;12.146026&lt;/TD&gt;
&lt;TD width="2.5%" height="30px"&gt;55.012459&lt;/TD&gt;
&lt;TD width="5%" height="30px"&gt;2021-02-12T16:12:56.000+01:00&lt;/TD&gt;
&lt;TD width="10%" height="30px"&gt;12.012459&lt;/TD&gt;
&lt;TD width="2.5%" height="30px"&gt;55.124598&lt;/TD&gt;
&lt;TD width="2.5%" height="30px"&gt;2021-02-12T16:12:57.000+01:00&lt;/TD&gt;
&lt;TD width="2.5%" height="30px"&gt;12.215498&lt;/TD&gt;
&lt;TD width="0.625%" height="30px"&gt;55.124023&lt;/TD&gt;
&lt;TD width="0.625%" height="30px"&gt;2021-02-12T16:12:58.000+01:00&lt;/TD&gt;
&lt;TD width="0.625%" height="30px"&gt;12.459065&lt;/TD&gt;
&lt;TD width="0.625%" height="30px"&gt;55.213026&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is just an example. I have several GPS- and time stamps (up to e.g. Pos_time60 and Pos_east60 etc). The different positions (pos_east&lt;STRONG&gt;n&amp;nbsp;&lt;/STRONG&gt;and pos_north&lt;STRONG&gt;n&lt;/STRONG&gt; may represent a biker).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) Calculate the true-line distance from pos_east and pos_north (e.g. a bikers starting position) to event_east and event_north (the event). As I have several GPS stamps from 'the biker' (up to &amp;gt;60) I believe it could be done by straight-line calculation from pos_east to pos_east1 to pos_east2&amp;nbsp; to pos_east&lt;STRONG&gt;n&lt;/STRONG&gt;.... to event_east (the event). However, some of the last GPS-stamps from 'the biker' may be relatively close to the event GPS position. Therefore, the first position of 'the biker' within 25 meters from event_east and event_north should be used as the final position (if it makes any sense).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) I want to calculate the travel time of 'the biker' from notify_time until the first position within 25 meters from the event_east and event_north. The variable pos_time&lt;STRONG&gt;n&amp;nbsp;&lt;/STRONG&gt;represents the time 'the biker' was at pos_east&lt;STRONG&gt;n&lt;/STRONG&gt; and pos_north&lt;STRONG&gt;n&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;3) Some 'bikers' travels via poi_east and poi_north before going to event_east and event_north. I want to first calculate the distance from pos_east and pos_north to poi_east and poi_north (again via pos_east&lt;STRONG&gt;n&lt;/STRONG&gt; and pos_north&lt;STRONG&gt;n&amp;nbsp;&lt;/STRONG&gt;- and also with the first GPS-stamp within 25 meters from poi_east and poi_north) and secondly the distance from poi_east and poi_north till event_east and event_north&amp;nbsp;(again via pos_east&lt;STRONG&gt;n&lt;/STRONG&gt; and pos_north&lt;STRONG&gt;n&amp;nbsp;&lt;/STRONG&gt;- and also with the first GPS-stamp within 25 meters from poi_east and poi_north).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4) As in task 2, I want to calculate the traveltime of 'the biker' from the original position (pos_east and pos_north) until 25 meters within the poi_east and poi_north and again from poi-coordinates until within 25 meters from the event-coordinates.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry for all the text! It is rather complicated! I hope it makes sense.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All best&lt;/P&gt;
&lt;P&gt;MM&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 11:18:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculation-of-distance-and-traveltime-with-multiple-GPS-points/m-p/766546#M242943</guid>
      <dc:creator>Mikkel_madsen</dc:creator>
      <dc:date>2021-09-08T11:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of distance and traveltime with multiple GPS points</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculation-of-distance-and-traveltime-with-multiple-GPS-points/m-p/766556#M242947</link>
      <description>Check GEODIST() Function.</description>
      <pubDate>Wed, 08 Sep 2021 12:19:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculation-of-distance-and-traveltime-with-multiple-GPS-points/m-p/766556#M242947</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-09-08T12:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of distance and traveltime with multiple GPS points</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculation-of-distance-and-traveltime-with-multiple-GPS-points/m-p/766774#M243035</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks, I did that prior to my post without any luck.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 07:30:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculation-of-distance-and-traveltime-with-multiple-GPS-points/m-p/766774#M243035</guid>
      <dc:creator>Mikkel_madsen</dc:creator>
      <dc:date>2021-09-09T07:30:20Z</dc:date>
    </item>
  </channel>
</rss>

