Help support TMP


"how would I solve this?" Topic


21 Posts

All members in good standing are free to post here. Opinions expressed here are solely those of the posters, and have not been cleared with nor are they endorsed by The Miniatures Page.

In order to respect possible copyright issues, when quoting from a book or article, please quote no more than three paragraphs.

For more information, see the TMP FAQ.


Back to the Computer Moderated Rules Message Board


Areas of Interest

General

Featured Hobby News Article


Featured Link


Featured Showcase Article

My Little Christmas Trees on the Tabletop

2" mini-trees prepped and shown on the tabletop.


Featured Profile Article

Cheap Wood Trays

Useful for dice trays or carrying painting supplies around.


657 hits since 24 Jan 2008
©1994-2026 Bill Armintrout
Comments or corrections?

briansommers24 Jan 2008 9:51 a.m. PST

how would I solve this problem:

suppose I have a ship at
Lat. 27* 17' 02.73" N and Long 82* 35' 47.40' W
my speed is 20 knots
my heading is 35 degrees

in one minute time what would my new lat/long be?

is there a simple way to solve this?

I don't have a strong math background so if you could explain it in real simple steps/terms that would
be helpful.

Grizwald24 Jan 2008 10:08 a.m. PST

Use this calculator:

link

and then apply Pythagoras.

Its not very simple, but I don't think you can simplify it any further. A degree of latitude or longitude is not a fixed distance.

emckinney24 Jan 2008 10:11 a.m. PST

This is an unfortunately complicated problem. A basic complication is that lines of longitude are great circles, as is the equator, so they all have the same circumference. (We'll ignore the very slight variations caused by the Earth not being a perfect sphere.) While this makes is pretty easy to solve problems where you're sailing straight up or down a line of longitude, latitude is a real pain in the butt. The circumference of each line of latitude is different (take a look at globe and it's obvious). So, you'll need to have equations to calculate those circumferences and change them back and forth to degrees of latitude.

Now, exactly what you want to do makes a difference. You gave a specific problem. Do you actually want to be able to take arbitrary locations on the globe and calculate movement to and from them?

How large an area you want to cover also makes a big difference. If you want to cover an area 500 miles by 500 miles, you can fudge things and pretend that the surfaces is flat. If you get much larger, curvature of the Earth starts to make a big difference. If you get several fairly widely separated points on the surface of a sphere, the distances among them don't work out to what you would calculate on a flat plane. You get non-commutative solutions, relative to the plane. (That's when A=B and B=C, but A<>C -- I'm simplifying to get the concept across.)

So, the short answer is, no, there isn't a simple way to solve the general case. You need to use spherical coordinates for everything, and then you need special handling for cases where a path crosses a pole or goes from 1 degree to 0 degrees to 359 degrees. Using quaternions helps you avoid these special cases, but the math is even more sophisticated and you'd still need to translate to latitude and longitude.

Bob Applegate24 Jan 2008 10:29 a.m. PST

You have to use the Great Circle stuff for agood
See:
williams.best.vwh.net/avform.htm
for a pretty complete explanation.

UltraOrk24 Jan 2008 10:38 a.m. PST

what about wind & tide?

jpattern224 Jan 2008 10:43 a.m. PST

Echoing what the others have said: No, it's not simple, at least not mathematically. I mean, your example goes down to hundredths of a second, which is about 1 foot of longitude at the equator. That's pretty dang precise, and I can't believe that level of precision is of much use in the real world in most sailing situations.

For a ballpark estimate, though, there *is* a simpler solution.

1 knot (US) is about 1.15 miles/hour. So at 20 knots, in one minute your ship is only going to travel about 0.38 miles, or about 2024 feet.

Go to Google Earth and punch in your initial position, 27 17 02.73 N, 82 35 47.40 W.

Now grab a protractor, measure 35 degrees from North and out about 2024 feet, using the Google map scale, put your cursor there, and you'll get a rough estimate of your new coordinates. I don't have a protractor handy, but I get roughly (VERY roughly, without a protractor and working off my display) 27 17 10 N, 82 35 40 W.

It's much easier to do this kind of thing on a hardcopy nautical map, if you have one or can print one out.

Out of burning curiosity, why are you asking?

jpattern224 Jan 2008 10:50 a.m. PST

UltraOrk, there be no wind an' tide in them thar waters!

Actually, that's one of the reasons that a position in hundredths of a second is far more precise than is usually needed at sea.

Even without wind and tide, unless that 20 knot speed is *exactly* 20.000 knots, at *exactly* 35.000 degrees, you're not going to be able to predict the position of the ship down to hundredths of a second.

I read somewhere that the most accurate (and very expensive) GPS systems are accurate down to about 1 foot.

jgawne24 Jan 2008 10:55 a.m. PST

Roll a D8 and multiply by Pi.

briansommers24 Jan 2008 10:56 a.m. PST

Now, exactly what you want to do makes a difference. You gave a specific problem. Do you actually want to be able to take arbitrary locations on the globe and calculate movement to and from them?

yes this is exactly what I want to do.

maybe I'm making it to difficult

I want to ATTEMPT (this is the key word) to write a very simple AI opponent for say a naval miniatures game for example, CaS or Harpoon, etc.

yeah, I guess it would be solving a spherical triangle, that does get messy

briansommers24 Jan 2008 11:16 a.m. PST

well then here is a follow up question:

maybe it would be just easier to program in a x,y coord. grid and then just use the old triangle to solve it.

basically i want to be able to have a map/table and be able to have it split up in squares and then be able to search for other ships/subs etc

jpattern224 Jan 2008 11:17 a.m. PST

I want to ATTEMPT (this is the key word) to write a very simple AI opponent for say a naval miniatures game for example, CaS or Harpoon, etc.

I have to believe that there are programs available that will do all the number-crunching and latituding and longituding for you. I have no idea where to find them, though.

Grizwald24 Jan 2008 11:54 a.m. PST

"maybe it would be just easier to program in a x,y coord. grid and then just use the old triangle to solve it."

Eminently more sensible! Just pretend the earth is flat. That's what most of us would do …

Mark Plant24 Jan 2008 12:23 p.m. PST

If you don't want to pretend that that earth is flat, but do want to do the programming yourself, then I would suggest:
1) changing from latitude/longlitude into polar co-ordinates.
2) calculating the change in position
3) convert back to longlitude/latitude.

(If a running series of movements are required, then all calculations are done using polar co-ordinates, with only the output required in lat/long.)

The maths doing it that way is much simpler.

Then again, for most purposes a flat earth works fine.

CPT Jake24 Jan 2008 12:38 p.m. PST

At work we use Geotrans for similar stuff. We feed it from a batch file and then spit out into a text file our software uses. It probably has functionality to do what you are asking.

link

Jake

GildasFacit Sponsoring Member of TMP24 Jan 2008 12:44 p.m. PST

Over the distances that you are working with planar geometry would give reasonably accurate results for a minute's travel but errors would accumulate from minute to minute.

Spherical trig is one of those subjects I taught for a short while and now can't remember anything of – most of it was trickery done with tables anyway, the 'real' maths hardly came into it at all.

Tony H

briansommers24 Jan 2008 1:15 p.m. PST

thanks for that link, i will look into that and see what happens.

Crusoe the Painter24 Jan 2008 1:47 p.m. PST

Convert Lat and Long to spherical coordinates, make your move, then convert back.

There are conversions for both steps.

CPT Jake24 Jan 2008 3:01 p.m. PST

The tool I posted the link to does those conversions.

The Monstrous Jake24 Jan 2008 3:01 p.m. PST

is there a simple way to solve this?

The "Search" system in Shipbase III does that by assuming the planet surface is flat and going from there. I wrote it in 1992 using a bunch of old National Geographic maps. The math doesn't work if you tried to translate it to the globe-shaped Earth, and it didn't always work if you switched from one map to another, but as long as you stuck to one map it worked out close enough for wargaming purposes. I think it kept track of up to 30 formations of ships, with an accuracy of about +/- 10 meters for the lead ship.

briansommers24 Jan 2008 3:04 p.m. PST

aren't those the same thing? I mean spherical coord. are expressed in lat and long ?? or not?

explain if you can

thanks
bs

emckinney24 Jan 2008 3:57 p.m. PST

Sorry - only verified members can post on the forums.