Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<pre><code>Lat_to_Travel = CurLat - TargetLat Long_to_Travel = CurLong - TargetLong Time_to_Travel = ETA - now </code></pre> <p>If the distances are relatively small, it is probably <strong>ok to assume a linear progression on these three dimensions</strong> (*). You then need to decide on a number of intermediate position to display, say 10, and calculate each intermediate point accordingly</p> <pre><code>NbOfIntermediates = 10 // for example Lat_at_Intermediate(n) = CurLat + (1/NbOfIntermediates * Lat_to_travel) Long_at_Intermediate(n) = CurLong + (1/NbOfIntermediates * Long_to_travel) Time_at_Intermediate(n) = now + (1/NbOfIntermediates * Time_to_travel) </code></pre> <p>The most complicated in all this is to keep the units ok.</p> <p>( * ) <strong>A few considerations as to whether it is ok to assume a linear progression...</strong><br> Obviously the specifics of <strong>the reality of the physical elements</strong> (marine currents, wind, visibility...) may matter more in this matter than geo-spatial mathematics.<br> Assuming that the vehicle travels at a constant speed, in a direct line, it is [<em>generally</em>] <strong>ok to assume linearity in the Latitude dimension</strong> [well technically the earth not being exactly a sphere this is not fully true but damn close]. However, over longer distances that include a relatively big change in latitude, the angular progression along the longitude dimension is not linear. The reason for this is that as we move away from the equator, a degree of longitude expressed in linear miles (or kilometer...) diminishes. The following table should give a rough idea of this effect, for locations at various latitudes:<br></p> <pre> Latitude Length of a Degree Approximate examples (of longitude) in nautical miles 0 60 Kuala Lumpur, Bogota, Nairobi 20 56.5 Mexico city, Mecca, Mumbai, Rio de Janeiro 45 42.5 Geneva, Boston, Seattle, Beijing, Wellington (NZ) 60 30 Oslo, Stockholm, Anchorage AK, St Petersburg Russia </pre> <p>See this <a href="http://www.csgnetwork.com/degreelenllavcalc.html" rel="nofollow noreferrer"><strong>handy online calculator</strong></a> to calculate this for a particular latitude.<br> Another way to get a idea for this is to see that traveling due East (or West) at the lattitude of Jacksonville, Florida, or San Diego, California, it takes 52 miles to cover a degree of longitude; at the latitude of Montreal or Seattle, it takes only 40 miles.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload