1 |
Matti Nykyri <matti.nykyri@×××.fi> [14-10-01 13:16]: |
2 |
> > On Oct 1, 2014, at 5:54, meino.cramer@×××.de wrote: |
3 |
> > |
4 |
> > Matti Nykyri <Matti.Nykyri@×××.fi> [14-10-01 00:26]: |
5 |
> >>> On Tue, Sep 30, 2014 at 08:12:38PM +0200, meino.cramer@×××.de |
6 |
> >>> wrote: Matti Nykyri <matti.nykyri@×××.fi> [14-09-30 19:44]: |
7 |
> >>>>>> On Sep 30, 2014, at 17:12, Alec Ten Harmsel |
8 |
> >>>>>> <alec@××××××××××××××.com> wrote: |
9 |
> >>>>> |
10 |
> >>>>> |
11 |
> >>>>> |
12 |
> >>>>>> On 09/30/2014 10:05 AM, meino.cramer@×××.de wrote: Suppose |
13 |
> >>>>>> the GPS would already be attached to the board and works... |
14 |
> >>>>>> |
15 |
> >>>>>> Is there any free available software and data for strict |
16 |
> >>>>>> offline useage (which does NOT calls to home), which is able |
17 |
> >>>>>> to map GPS data to a street/land map? I need both: The maps |
18 |
> >>>>>> themselves and the logic to read GPS coordinates and map |
19 |
> >>>>>> movements and ways to those maps. |
20 |
> >>>>>> |
21 |
> >>>>>> Is something like that available for free or should I |
22 |
> >>>>>> directly ask the NSA/CIA/FBI/...? |
23 |
> >>>>>> |
24 |
> >>>>>> Thank you very much in advance for any help! Best regards, |
25 |
> >>>>>> mcc |
26 |
> >>>>> The only project I know of that has openly available map data |
27 |
> >>>>> is OpenStreetMap (openstreetmap.org). I know they have an API, |
28 |
> >>>>> and they probably (not sure) have maps available for download. |
29 |
> >>>>> |
30 |
> >>>>> afaik the only way to combine various map data out of the box |
31 |
> >>>>> is to use a GIS package like QGIS. You can write software to |
32 |
> >>>>> do this using the proj4 library for an embedded box, not sure |
33 |
> >>>>> if anything for your specific use case already exists and is |
34 |
> >>>>> open source. |
35 |
> >>>>> |
36 |
> >>>>> Alec |
37 |
> >>>> |
38 |
> >>>> Sorry iphone send mail even if you don't wanna :/ |
39 |
> >>>> |
40 |
> >>>> What you are considering doing is quite a challenge. What kind |
41 |
> >>>> of coordinates does your gps module give you? The gps system |
42 |
> >>>> works with cartesian x y z coordinates. Then these are usually |
43 |
> >>>> displayed to the user in WGS-84. This is a quite hard |
44 |
> >>>> mathematical problem (differential elliptical problem). Usually |
45 |
> >>>> is done by your gps receiver and is approximated. GIS libraries |
46 |
> >>>> have these functions built inside. Distances are easier and |
47 |
> >>>> faster to calculate in cartesian coordinates. You need to |
48 |
> >>>> calculate distance because coordinates from gps will never |
49 |
> >>>> coincide with any address. |
50 |
> >>>> |
51 |
> >>>> Open street maps provides a very good start, but addresses have |
52 |
> >>>> great differences in different countries. For example google |
53 |
> >>>> misses addresses quite much depending on where you are |
54 |
> >>>> searching. Getting the address right requires good locality |
55 |
> >>>> from the program. Addresses and roads are vector maps. The |
56 |
> >>>> fastest way to get address is to have the vector map of the |
57 |
> >>>> world and then calculate distance to the closest address. The |
58 |
> >>>> database will be huge :) |
59 |
> >>>> |
60 |
> >>>> Maps are usually raster pictures which have some projection. |
61 |
> >>>> When you display them you can use 3d or 2d visual. In 3d (like |
62 |
> >>>> google earth) you draw a sphere (or oblate spheroid) and draw |
63 |
> >>>> textures on top of is to the right coordinates. In 3d |
64 |
> >>>> everything needs to be converted to cartesian coordinates. Or |
65 |
> >>>> in 2d you decide a projection and then convert the projection |
66 |
> >>>> of your maps to this projection. After that it is just easy |
67 |
> >>>> drawing. GIS libraries contain all the needed tools for these |
68 |
> >>>> operations. There are a few of them with open source license. |
69 |
> >>>> |
70 |
> >>>> I have been doing some work with opengl 3d drawing maps. Good |
71 |
> >>>> luck your project is quite big but it is sure very much fun :) |
72 |
> >>>> |
73 |
> >>>> -- -Matti |
74 |
> >>> |
75 |
> >>> YEAH! Matti is back! I saw your previous mail and thought: Oh |
76 |
> >>> boy...Clint Eastwood is very talkative compared to /him/. ;;;))) |
77 |
> >> |
78 |
> >> Trashed the phone... and now back to the good old fashion |
79 |
> >> terminal connection. |
80 |
> >> |
81 |
> >>> I am not /that/ serious this evening...sorry... With all the |
82 |
> >>> help from this forum this evening I got by far more working |
83 |
> >>> results as I have thought... |
84 |
> >>> |
85 |
> >>> But back to your mail: The GPS module I plan to use is this one |
86 |
> >>> (by Adafruit, Lady Ada): |
87 |
> >>> https://learn.adafruit.com/adafruit-ultimate-gps/overview From |
88 |
> >>> there (see link list on the left) you can also download the |
89 |
> >>> manuals (pdf). |
90 |
> >> |
91 |
> >> Nice... MicroTek chipset. Quite easy to use. |
92 |
> >> |
93 |
> >>> I will not use this thing as a driving assistant or "navi" (is |
94 |
> >>> this common speaking outside germany also...or is it one of |
95 |
> >>> those pseudo english german words like "handy" for "cell |
96 |
> >>> phone"...dont laugh! This time /I am/ serious! :) ) |
97 |
> >>> |
98 |
> >>> Its more like a GPS data logger. I plan to copy the gathered |
99 |
> >>> data on my PC later and I will try to "draw" them onto a map. |
100 |
> >>> May be the results proof later, that I am able to walk through |
101 |
> >>> walls and hovering over the face of the waters...;) |
102 |
> >> |
103 |
> >> Ok. This is easy... You just need some maps... openstreetmaps are |
104 |
> >> good for that. From the MT3339 you get NMEA messages and WGS-84 |
105 |
> >> coordinates. I would suggest displaying your results in 2D. For |
106 |
> >> germany Lambert conformal conic projection is good choice. In |
107 |
> >> this projection all angles are true and sreight lines are great |
108 |
> >> circle routes. Just convert the maps to this projection and |
109 |
> >> convert your coordinates to Lambert false easting and false |
110 |
> >> northing and you will have cartesian coordinates that are easy to |
111 |
> >> draw. Even excel is able to draw this in real time :) I don't see |
112 |
> >> where you need the address resolution. |
113 |
> >> |
114 |
> >>> May be the UV-mappinga abillity of this 3D renderig program will |
115 |
> >>> help -- I am using it for other purposes since 2006. |
116 |
> >>> www.blender.org |
117 |
> >> |
118 |
> >> From what I know about blender isn't it just 3d rendering |
119 |
> >> program. Not a GIS application. It doesn't know anythin about |
120 |
> >> coordinates... |
121 |
> >> |
122 |
> >>> Will see how far it will go. First step in progress will be |
123 |
> >>> acchived, when I can read any data from the GPS module and they |
124 |
> >>> are not that changing if I dont move and they will change when I |
125 |
> >>> move. The module is ordered and will arrive -- I hope -- next |
126 |
> >>> week. |
127 |
> >> |
128 |
> >> Nice. |
129 |
> >> |
130 |
> >> -- -Matti |
131 |
> > |
132 |
> > Hi Matti, |
133 |
> > |
134 |
> > thanks for your explanation. If I start struggling...you will |
135 |
> > receive email (ok?) ! |
136 |
> > |
137 |
> > Blender: The UV-Mapping of blender maps 2D-Images to whatever |
138 |
> > shaped things in 3D quite good...it is used for texturing. |
139 |
> > Additionally Blender has a python API, so missing things can |
140 |
> > added. |
141 |
> |
142 |
> Of course you can do that, but it's gazillion times harder to do |
143 |
> than 2d. If you want to have a good 3d visual (like google earth) |
144 |
> you need to calculate your oblate spheroid on the fly and i don't |
145 |
> think blender will be able to do that. |
146 |
> |
147 |
> With basic UV-mapping you will have uneven distribution with poles |
148 |
> compared to equator. The best solution is to use icosahedron (like a |
149 |
> normal football with alternating hexagons and pentagons). Also with |
150 |
> that you will automatically end up with triangles which are better |
151 |
> for your GPU. Also the size of the triangles are even throughout the |
152 |
> object. No tessellation is required. |
153 |
> |
154 |
> You will never need to draw more than one half of this spheroid |
155 |
> because the other side is hidden an equal to the visual side. If you |
156 |
> really wan't conserve memory of you GPU you can just have 1/8 of the |
157 |
> vertices of the spheroid. The remaining 3/8 vertices can be created |
158 |
> on the fly by a rotation matrix. |
159 |
> |
160 |
> Even better choice is to have a fixed amount of vertices and draw |
161 |
> only the needed parts of the sphere on the fly. You also need to |
162 |
> calculate the coordinates for your texture. |
163 |
> |
164 |
> To have see the goodies of 3d map view you probably want to have |
165 |
> tilt with your visual. Otherwise there is not much difference with |
166 |
> 2d view. The WGS-84 defines just the spheroid which does not |
167 |
> describe earth accurately. Because earth's densities are not equal |
168 |
> the height of mean sea level is not equal above the WGS-84 ellipse. |
169 |
> To calculate that you need EGM (earth gravitational model). The |
170 |
> result is called geoid. EGM96 is now mostly used but newer more |
171 |
> accurate EGM2008 is also available. In maps and all other |
172 |
> applications heights are always reported as above mean sea level. |
173 |
> |
174 |
> To calculate coordinates, lets say N52 E16, you take the WGS-84 |
175 |
> ellipse that goes through the poles and is 16 deg east of 0 ellipse. |
176 |
> Now the N52 is at the ellipse in the point where a normal to ellipse |
177 |
> form 52deg angle with equator plane. To calculate where this point |
178 |
> is at mean sea level or at arbitrary altitude you need to follow the |
179 |
> vector of gravity. Vector of gravity does not have the same |
180 |
> direction as the normal to the ellipse, but it is close. The gravity |
181 |
> vector is twisted by the gravitational differences of earth (EGM) |
182 |
> and the rotation of earth. These will give accurate result but in |
183 |
> most applications it is not needed. A GIS library can do these |
184 |
> calculations. Inverse of this is much much harder to do accurately |
185 |
> (but every gps receiver needs to calculate it and usually use |
186 |
> approximating algorithms). |
187 |
> |
188 |
> So if you want to draw a map of lets say Aachen you it is not |
189 |
> efficient to have vertices of the entire earth in GPU's memory. It |
190 |
> is much better to have lets say 10000 points in Aachen and draw the |
191 |
> texture on top of them an calculate the coordinates on the fly. If |
192 |
> you are drawing areas bigger than Europe then you have more |
193 |
> advantages with 3d view. |
194 |
> |
195 |
> > Just a shot in the dark... |
196 |
> |
197 |
> It would be nice to hear how well blender is able to do this :) |
198 |
> |
199 |
> -- -Matti |
200 |
|
201 |
Hi Matti, |
202 |
|
203 |
I have the first result of trying to do as described: With my DSL |
204 |
connection it is impossible to download the OSM data for offline |
205 |
browsing. Reason: The duration for the download (~40GB) exceeds 24 |
206 |
hours. After 24 h my DSL line is forced to disconnect by the provider |
207 |
and the download fails. |
208 |
Grrmmmpppfff... |
209 |
Reminds me of times when modems were hi-tec... |
210 |
|
211 |
I found another program called "viking" (sci-geosciences/viking), |
212 |
which claims to be able to download all needed data/maps/etc... and |
213 |
store them for later usage on harddisk. This is not exactky "offline" |
214 |
but ... kind of "second hand offline" ;) |
215 |
|
216 |
The idea to use blender was born in the moment when it seems |
217 |
that I have to do all the mapping myself...no longer needed as |
218 |
it seems. |
219 |
|
220 |
Furthermore I installed sci-geosciences/gpsd and found this |
221 |
page: http://the8thlayerof.net/category/beaglebone-black/ |
222 |
which described how to connect the beaglebone black, the gps module I |
223 |
ordered and gpsd. |
224 |
|
225 |
Still waiting for the parcel to arrive... |
226 |
|
227 |
Best regards, |
228 |
mcc |