From: Kai-Uwe Bux on
Gene wrote:

> On Jul 30, 9:10 pm, Kai-Uwe Bux <jkherci...(a)gmx.net> wrote:
>> Default User wrote:
>> > I have a project I'm working on that is related to route planning for
>> > simulated vehicles. Currently there are data files that contain the
>> > postition data (latitude, longitude, altitude) for some routes. These
>> > positions, along with the heading and speed at each point, are sent at
>> > a certain rate to a display program. I have already developed the code
>> > for doing speed and heading based on the waypoint information.
>>
>> > As an expansion, we'd like to add the capability to do some free-form
>> > route-planning. The idea being that someone would choose a few major
>> > points and arrival times, and possibly loiter time. The program would
>> > then create a data file with the positions necessary to travel the
>> > route when updated at a given rate. So, a vehicle that updates at 20Hz
>> > needs to have more interolated points than one that updates at 1Hz.
>>
>> > A simplistic method would be just to do straight lines between the
>> > points. I have routines that can interpolate points that way. That does
>> > get into the "left turn at Albuquerque" problem. I'd like to at least
>> > investigate some smoothing, perhaps some sort of spline technique.
>>
>> [...]
>>
>> Splines are a good idea because spline interpolation is fast. To map that
>> onto your problem you regard the route as a curve in space given by three
>> coordinates all depending on time and then applying interpolation to each
>> of the coordinates separately.
>>
>> The only ramification is the coordinate system chosen: you mentioned
>> latitude/longitude/altitude. What makes interpolating here a little
>> tricky is that latitude and longitude are bounded. E.g., latitude ranges
>> in
>> [-90,90] degrees. Ordinary interpolation techniques (including splines)
>> could take you out of that range.
>>
>> A simple solution would be to convert to Cartesian coordinates first,
>> interpolate there, and then convert back the results. Since the spherical
>> coordinate system behaves weirdly at the origin, you could check for that
>> point.
>>
>> Another option would be to use functions like tan() to map, say, the
>> latitude to a real number, use that for interpolation, and convert the
>> results back to latituded via arctan(). In this case, the boundary values
>> 90� and -90� require some special attention.
>>
>> Best
>>
>> Kai-Uwe Bux
>
> Geodetic computations are notoriously hard to get right over any
> significant geographical area. Depending on the accuracy you need,
> the computations can be very complicated because the earth's surface
> is (roughly) an ellipsoid, not even a sphere.

The OP talked about the coordinate system "(latitude, longitude, altitude)".
I took altitude to mean "distance to the origin". Of course, things get much
more complicated when altitude means distance to some random surface.

> There are some free
> libraries available at the National Geospatial-Intelligence Agency web
> site that might give you some insight.

Thanks for the hint.


Best

Kai-Uwe Bux
From: Default User on
"Hans" <hans(a)nospam.com> wrote in message
news:4c5c15e1$1(a)dnews.tpgi.com.au...

> Have a look at a http://williams.best.vwh.net/avform.htm#Math
> This provides you with all formulas you need for your project..

Thanks, I'll take a look.


Brian
--
Day 551 of the "no grouchy usenet posts" project.


From: Default User on
"Kai-Uwe Bux" <jkherciueh(a)gmx.net> wrote in message
news:i3m31e$u93$2(a)news.doubleSlash.org...
> Gene wrote:

>> Geodetic computations are notoriously hard to get right over any
>> significant geographical area. Depending on the accuracy you need,
>> the computations can be very complicated because the earth's surface
>> is (roughly) an ellipsoid, not even a sphere.
>
> The OP talked about the coordinate system "(latitude, longitude,
> altitude)".
> I took altitude to mean "distance to the origin". Of course, things get
> much
> more complicated when altitude means distance to some random surface.

Ah. I should have been clearer. "Altitude" represents height above ellipsoid
(WGS-84).




Brian
--
Day 551 of the "no grouchy usenet posts" project.