<?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: Direction of Flight Given Lat and Long in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Direction-of-Flight-Given-Lat-and-Long/m-p/612576#M178782</link>
    <description>&lt;P&gt;Something like this (untested, I may have my tests confused)?&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;LAT_DIFF = LAT_DEST - LAT_ORIG;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;LON_DIFF = LON_DEST - LON_ORIG;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;if LAT_DIFF&amp;lt;0 &amp;amp; LON_DIFF&amp;lt;0 then DIRECTION = ifc(abs(LAT_DIFF) &amp;gt; abs(LON_DIFF), 'S', 'E');&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;if LAT_DIFF&amp;gt;0 &amp;amp; LON_DIFF&amp;lt;0 then DIRECTION = ifc(abs(LAT_DIFF) &amp;gt; abs(LON_DIFF), 'N', 'E');&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;if LAT_DIFF&amp;gt;0 &amp;amp; LON_DIFF&amp;gt;0 then DIRECTION = ifc(abs(LAT_DIFF) &amp;gt; abs(LON_DIFF), 'N', 'W');&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;if LAT_DIFF&amp;lt;0 &amp;amp; LON_DIFF&amp;gt;0 then DIRECTION = ifc(abs(LAT_DIFF) &amp;gt; abs(LON_DIFF), 'S', 'W');&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Dec 2019 05:10:27 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2019-12-18T05:10:27Z</dc:date>
    <item>
      <title>Direction of Flight Given Lat and Long</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Direction-of-Flight-Given-Lat-and-Long/m-p/612563#M178772</link>
      <description>&lt;P&gt;Suppose I know the Lat and Long of an origin and destination airport. I then want to find the main direction of flight.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EIDW DUBLIN INTERNATIONAL&lt;BR /&gt;Lat: 53.4213888889 Long: -6.2700000000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TO:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CYYZ LESTER B. PEARSON INTL&lt;BR /&gt;Lat: 43.6767190556 Long: -79.6306582222&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case I would like to return West. The reverse flight from CYYZ to EIDW would return East&lt;/P&gt;&lt;P&gt;Not sure SAS can do this or not. The preference would be only returning North, East, South, West&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any ideas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2019 03:13:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Direction-of-Flight-Given-Lat-and-Long/m-p/612563#M178772</guid>
      <dc:creator>BCNAV</dc:creator>
      <dc:date>2019-12-18T03:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: Direction of Flight Given Lat and Long</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Direction-of-Flight-Given-Lat-and-Long/m-p/612576#M178782</link>
      <description>&lt;P&gt;Something like this (untested, I may have my tests confused)?&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;LAT_DIFF = LAT_DEST - LAT_ORIG;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;LON_DIFF = LON_DEST - LON_ORIG;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;if LAT_DIFF&amp;lt;0 &amp;amp; LON_DIFF&amp;lt;0 then DIRECTION = ifc(abs(LAT_DIFF) &amp;gt; abs(LON_DIFF), 'S', 'E');&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;if LAT_DIFF&amp;gt;0 &amp;amp; LON_DIFF&amp;lt;0 then DIRECTION = ifc(abs(LAT_DIFF) &amp;gt; abs(LON_DIFF), 'N', 'E');&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;if LAT_DIFF&amp;gt;0 &amp;amp; LON_DIFF&amp;gt;0 then DIRECTION = ifc(abs(LAT_DIFF) &amp;gt; abs(LON_DIFF), 'N', 'W');&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;if LAT_DIFF&amp;lt;0 &amp;amp; LON_DIFF&amp;gt;0 then DIRECTION = ifc(abs(LAT_DIFF) &amp;gt; abs(LON_DIFF), 'S', 'W');&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2019 05:10:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Direction-of-Flight-Given-Lat-and-Long/m-p/612576#M178782</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-12-18T05:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: Direction of Flight Given Lat and Long</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Direction-of-Flight-Given-Lat-and-Long/m-p/612733#M178842</link>
      <description>&lt;P&gt;Spherical trigonometry is not my strong point but what is going to be your rules for determining E/W over N/S if the compass angle were to be something like 45 degrees?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2019 16:33:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Direction-of-Flight-Given-Lat-and-Long/m-p/612733#M178842</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-12-18T16:33:03Z</dc:date>
    </item>
  </channel>
</rss>

