From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 9900F13838B for ; Wed, 1 Oct 2014 13:26:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 25C34E08BF; Wed, 1 Oct 2014 13:26:38 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C44ECE0880 for ; Wed, 1 Oct 2014 13:26:36 +0000 (UTC) Received: from localhost ([84.133.149.102]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0LzskF-1YMnn72KmJ-014zkh for ; Wed, 01 Oct 2014 15:26:35 +0200 Date: Wed, 1 Oct 2014 15:26:33 +0200 From: meino.cramer@gmx.de To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] "Headless question": Harvesting the results...software needed. Message-ID: <20141001132633.GA21977@solfire> References: <20140930140513.GJ3828@solfire> <542ABA4F.9060302@alectenharmsel.com> <3F710173-62E5-4000-8634-589BF3F8BBCE@iki.fi> <20140930181238.GM3828@solfire> <20140930193704.GA32540@lyseo.edu.ouka.fi> <20141001025458.GA8936@solfire> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: mutt-ng/devel-r804 (Linux) X-Provags-ID: V03:K0:9Yk8cryZ9TgMhcnyAUt/PcPIcHNzdjbqnS2jMU5zOBKy5shOMPC eyK+Xa8zmn3BzZ+MCkbncGNX5imCa5P2e8OY5XI+fAW5ILez4ESBjpzDN+S3JfxcTsCIxl1 OvC2h4M28WthwEPVFZtP7f2/2hZnVJiozpAcaPTMnJoiDtLKKchLn5U5TBmosB/giothCgL 5l+TmcjPMjTBfOBY9MB5Q== X-UI-Out-Filterresults: notjunk:1; X-Archives-Salt: 4e7b056e-b826-46f2-aae1-36b8aa3e5fa5 X-Archives-Hash: b08344f1e7d79acc420f5869e73e273e Matti Nykyri [14-10-01 13:16]: > > On Oct 1, 2014, at 5:54, meino.cramer@gmx.de wrote: > > > > Matti Nykyri [14-10-01 00:26]: > >>> On Tue, Sep 30, 2014 at 08:12:38PM +0200, meino.cramer@gmx.de > >>> wrote: Matti Nykyri [14-09-30 19:44]: > >>>>>> On Sep 30, 2014, at 17:12, Alec Ten Harmsel > >>>>>> wrote: > >>>>> > >>>>> > >>>>> > >>>>>> On 09/30/2014 10:05 AM, meino.cramer@gmx.de wrote: Suppose > >>>>>> the GPS would already be attached to the board and works... > >>>>>> > >>>>>> Is there any free available software and data for strict > >>>>>> offline useage (which does NOT calls to home), which is able > >>>>>> to map GPS data to a street/land map? I need both: The maps > >>>>>> themselves and the logic to read GPS coordinates and map > >>>>>> movements and ways to those maps. > >>>>>> > >>>>>> Is something like that available for free or should I > >>>>>> directly ask the NSA/CIA/FBI/...? > >>>>>> > >>>>>> Thank you very much in advance for any help! Best regards, > >>>>>> mcc > >>>>> The only project I know of that has openly available map data > >>>>> is OpenStreetMap (openstreetmap.org). I know they have an API, > >>>>> and they probably (not sure) have maps available for download. > >>>>> > >>>>> afaik the only way to combine various map data out of the box > >>>>> is to use a GIS package like QGIS. You can write software to > >>>>> do this using the proj4 library for an embedded box, not sure > >>>>> if anything for your specific use case already exists and is > >>>>> open source. > >>>>> > >>>>> Alec > >>>> > >>>> Sorry iphone send mail even if you don't wanna :/ > >>>> > >>>> What you are considering doing is quite a challenge. What kind > >>>> of coordinates does your gps module give you? The gps system > >>>> works with cartesian x y z coordinates. Then these are usually > >>>> displayed to the user in WGS-84. This is a quite hard > >>>> mathematical problem (differential elliptical problem). Usually > >>>> is done by your gps receiver and is approximated. GIS libraries > >>>> have these functions built inside. Distances are easier and > >>>> faster to calculate in cartesian coordinates. You need to > >>>> calculate distance because coordinates from gps will never > >>>> coincide with any address. > >>>> > >>>> Open street maps provides a very good start, but addresses have > >>>> great differences in different countries. For example google > >>>> misses addresses quite much depending on where you are > >>>> searching. Getting the address right requires good locality > >>>> from the program. Addresses and roads are vector maps. The > >>>> fastest way to get address is to have the vector map of the > >>>> world and then calculate distance to the closest address. The > >>>> database will be huge :) > >>>> > >>>> Maps are usually raster pictures which have some projection. > >>>> When you display them you can use 3d or 2d visual. In 3d (like > >>>> google earth) you draw a sphere (or oblate spheroid) and draw > >>>> textures on top of is to the right coordinates. In 3d > >>>> everything needs to be converted to cartesian coordinates. Or > >>>> in 2d you decide a projection and then convert the projection > >>>> of your maps to this projection. After that it is just easy > >>>> drawing. GIS libraries contain all the needed tools for these > >>>> operations. There are a few of them with open source license. > >>>> > >>>> I have been doing some work with opengl 3d drawing maps. Good > >>>> luck your project is quite big but it is sure very much fun :) > >>>> > >>>> -- -Matti > >>> > >>> YEAH! Matti is back! I saw your previous mail and thought: Oh > >>> boy...Clint Eastwood is very talkative compared to /him/. ;;;))) > >> > >> Trashed the phone... and now back to the good old fashion > >> terminal connection. > >> > >>> I am not /that/ serious this evening...sorry... With all the > >>> help from this forum this evening I got by far more working > >>> results as I have thought... > >>> > >>> But back to your mail: The GPS module I plan to use is this one > >>> (by Adafruit, Lady Ada): > >>> https://learn.adafruit.com/adafruit-ultimate-gps/overview From > >>> there (see link list on the left) you can also download the > >>> manuals (pdf). > >> > >> Nice... MicroTek chipset. Quite easy to use. > >> > >>> I will not use this thing as a driving assistant or "navi" (is > >>> this common speaking outside germany also...or is it one of > >>> those pseudo english german words like "handy" for "cell > >>> phone"...dont laugh! This time /I am/ serious! :) ) > >>> > >>> Its more like a GPS data logger. I plan to copy the gathered > >>> data on my PC later and I will try to "draw" them onto a map. > >>> May be the results proof later, that I am able to walk through > >>> walls and hovering over the face of the waters...;) > >> > >> Ok. This is easy... You just need some maps... openstreetmaps are > >> good for that. From the MT3339 you get NMEA messages and WGS-84 > >> coordinates. I would suggest displaying your results in 2D. For > >> germany Lambert conformal conic projection is good choice. In > >> this projection all angles are true and sreight lines are great > >> circle routes. Just convert the maps to this projection and > >> convert your coordinates to Lambert false easting and false > >> northing and you will have cartesian coordinates that are easy to > >> draw. Even excel is able to draw this in real time :) I don't see > >> where you need the address resolution. > >> > >>> May be the UV-mappinga abillity of this 3D renderig program will > >>> help -- I am using it for other purposes since 2006. > >>> www.blender.org > >> > >> From what I know about blender isn't it just 3d rendering > >> program. Not a GIS application. It doesn't know anythin about > >> coordinates... > >> > >>> Will see how far it will go. First step in progress will be > >>> acchived, when I can read any data from the GPS module and they > >>> are not that changing if I dont move and they will change when I > >>> move. The module is ordered and will arrive -- I hope -- next > >>> week. > >> > >> Nice. > >> > >> -- -Matti > > > > Hi Matti, > > > > thanks for your explanation. If I start struggling...you will > > receive email (ok?) ! > > > > Blender: The UV-Mapping of blender maps 2D-Images to whatever > > shaped things in 3D quite good...it is used for texturing. > > Additionally Blender has a python API, so missing things can > > added. > > Of course you can do that, but it's gazillion times harder to do > than 2d. If you want to have a good 3d visual (like google earth) > you need to calculate your oblate spheroid on the fly and i don't > think blender will be able to do that. > > With basic UV-mapping you will have uneven distribution with poles > compared to equator. The best solution is to use icosahedron (like a > normal football with alternating hexagons and pentagons). Also with > that you will automatically end up with triangles which are better > for your GPU. Also the size of the triangles are even throughout the > object. No tessellation is required. > > You will never need to draw more than one half of this spheroid > because the other side is hidden an equal to the visual side. If you > really wan't conserve memory of you GPU you can just have 1/8 of the > vertices of the spheroid. The remaining 3/8 vertices can be created > on the fly by a rotation matrix. > > Even better choice is to have a fixed amount of vertices and draw > only the needed parts of the sphere on the fly. You also need to > calculate the coordinates for your texture. > > To have see the goodies of 3d map view you probably want to have > tilt with your visual. Otherwise there is not much difference with > 2d view. The WGS-84 defines just the spheroid which does not > describe earth accurately. Because earth's densities are not equal > the height of mean sea level is not equal above the WGS-84 ellipse. > To calculate that you need EGM (earth gravitational model). The > result is called geoid. EGM96 is now mostly used but newer more > accurate EGM2008 is also available. In maps and all other > applications heights are always reported as above mean sea level. > > To calculate coordinates, lets say N52 E16, you take the WGS-84 > ellipse that goes through the poles and is 16 deg east of 0 ellipse. > Now the N52 is at the ellipse in the point where a normal to ellipse > form 52deg angle with equator plane. To calculate where this point > is at mean sea level or at arbitrary altitude you need to follow the > vector of gravity. Vector of gravity does not have the same > direction as the normal to the ellipse, but it is close. The gravity > vector is twisted by the gravitational differences of earth (EGM) > and the rotation of earth. These will give accurate result but in > most applications it is not needed. A GIS library can do these > calculations. Inverse of this is much much harder to do accurately > (but every gps receiver needs to calculate it and usually use > approximating algorithms). > > So if you want to draw a map of lets say Aachen you it is not > efficient to have vertices of the entire earth in GPU's memory. It > is much better to have lets say 10000 points in Aachen and draw the > texture on top of them an calculate the coordinates on the fly. If > you are drawing areas bigger than Europe then you have more > advantages with 3d view. > > > Just a shot in the dark... > > It would be nice to hear how well blender is able to do this :) > > -- -Matti Hi Matti, I have the first result of trying to do as described: With my DSL connection it is impossible to download the OSM data for offline browsing. Reason: The duration for the download (~40GB) exceeds 24 hours. After 24 h my DSL line is forced to disconnect by the provider and the download fails. Grrmmmpppfff... Reminds me of times when modems were hi-tec... I found another program called "viking" (sci-geosciences/viking), which claims to be able to download all needed data/maps/etc... and store them for later usage on harddisk. This is not exactky "offline" but ... kind of "second hand offline" ;) The idea to use blender was born in the moment when it seems that I have to do all the mapping myself...no longer needed as it seems. Furthermore I installed sci-geosciences/gpsd and found this page: http://the8thlayerof.net/category/beaglebone-black/ which described how to connect the beaglebone black, the gps module I ordered and gpsd. Still waiting for the parcel to arrive... Best regards, mcc