|
Post by bigbass on Mar 15, 2021 4:24:17 GMT 1
Hello Alex X11 & cairo I tested your demo and works on the RPI3 on another theme app key KeyError: "'W3W_API_KEY'", get one here developer.what3words.com/public-apiI think that with several people even if we are going about things differently the end result is we will advance faster if everyone is doing some part of the mix ( we worked together in the past with X11 too) javascript is not my first choice when thinking about code and I used to avoid it like a virus wanted nothing to do with it (so I understand what you mean 100%) but now I guess its time for me to at least get something simple working with it maybe because I have a little more free time now then port what I can back to bacon Joe
|
|
|
Post by alexfish on Mar 15, 2021 6:02:58 GMT 1
Hi Joe
Thanks for testing
+ thanks for the link. ADDED , looks like this could cost money, and has limits, + only a comment , when at sea and out of range of a connection ?
In Past I posted details of Embedded Python using BaCon, so possible a half way Compromise , I hope, as Can see , will not have tested this bit as of yet.
I am Busy for 3/4 days , back late at night ...
in mean time wonder where and or what three.little.piggies is or means, can't imagine that four.little.piggies will be adjacent to three.little.piggies
Thanks again + BR Alex
|
|
|
Post by rikky on Mar 15, 2021 10:34:55 GMT 1
The key thing works. The functions: GET_BEARING: -- I'm not a native English speaker, so I haven't got a clue what this is. A round metal machine part with wheels in it? GET_DISTANCE: --deal with this later LONDEG2LONMIN LATDEG2LATMIN LATDEG2LATSEC LONDEG2LONSEC Oke, they seem to work, so I'' incorporate them (for now) But honestly, I cannot figure out what is written there. It's NOT BaCon, that's for sure. Important however is the other way around. The OpenStreetAndSea apie wants DD. So here a command line utility to do everything to DD example: CONVERT2DD "40 44 54.3 φ N" "73 59 9 λ W" example: CONVERT2DD "33° 51' 31"'"'" S" "151° 12' 51"'"'" E" example: CONVERT2DD "33 51.5167 S" "151 12.8500 E" Note, If the following does't compile, swop the remarks in lines 77/78 and 81/82 I Yust want to see if something like REPLACE$(string$,"″"," ") will be copied over the forum correctly. If so, this will drive people crazy. Attached File removed and new file some posts further on
|
|
|
Post by alexfish on Mar 15, 2021 17:32:56 GMT 1
A bearing is a measurement of direction between two points. ... An azimuth bearing uses all 360° of a compass to indicate direction. The compass is numbered clockwise with north as 0°, east 90°, south 180°, and west 270°. So a bearing of 42° would be northeast and a bearing of 200° would be southwest. Distanceall in Easier than J & extracts from Two well Known Apps
|
|
|
Post by bigbass on Mar 15, 2021 18:43:39 GMT 1
|
|
|
Post by alexfish on Mar 15, 2021 20:15:22 GMT 1
Hi Rik getting same as Joe pi@raspberrypi:~/Downloads $ ./CONVERT2DD "40 44 54.3 φ N" "73 59 9 λ W" CONVERT2DD: The computer says no, in line 108 pi@raspberrypi:~/Downloads $ ./CONVERT2DD "33° 51' 31"'"'" S" "151° 12' 51"'"'" E" -33.864167 +151.203333 pi@raspberrypi:~/Downloads $ ./CONVERT2DD "33 51.5167 S" "151 12.8500 E" CONVERT2DD: The computer says no, in line 103 the REPLACE$(string$,"″"," ") have : “ : leftdoublequotemark also have : ” : rightdoublequotemark so not native here what does ASC() show and LEN() If test the X11 cairo test the utf8 keys and will get as above if past the REPLACE in BaCon GUIGTK editor , will see the same BR Alex Attachments:
|
|
|
Post by rikky on Mar 15, 2021 20:52:09 GMT 1
Ahah, Made a change in the last moment that proved wrong. Changed ISNUMBER TO ISINT But the parts in the coordinates contain decimal points, so they are not ints. CONVERT2DD.bac (4.83 KB) Now it should work. PRINT "′ " & STR$(UCS("′")) : shows ′ 8242
|
|
|
Post by alexfish on Mar 15, 2021 21:00:56 GMT 1
pi@raspberrypi:~/Downloads $ ./CONVERT2DD "40 44 54.3 φ N" "73 59 9 λ W" +40.745556 -73.999722 pi@raspberrypi:~/Downloads $ ./CONVERT2DD "33° 51' 31"'"'" S" "151° 12' 51"'"'" E" -33.864167 +151.203333 pi@raspberrypi:~/Downloads $ ./CONVERT2DD "33 51.5167 S" "151 12.8500 E" -33.858612 +151.214167
BR Alex
|
|
|
Post by alexfish on Mar 15, 2021 21:22:06 GMT 1
|
|
|
Post by alexfish on Mar 16, 2021 19:46:46 GMT 1
Just an update to The X11cairo + compositing No code as yet as a complete app , be patient Demo Showing X11 Window Create X11 Window Create Cairo X11 surface Create Keyboard input : Create Openstreetmap surface Create Openseamap surface (navigation symbols) Create ... Render streetmap from png Render seamap from png Render ... render text to surface BR Alex Picky Attachments:
|
|
|
Post by rikky on Mar 17, 2021 15:30:31 GMT 1
Just want to mention that I have nothing to mention. Got stuck everywhere. Taking another route though. NOT Cairo but SVG I think SVG is made for this. With your vieuwbox only vieuwing the area where you are And the vieuwport having already open several charts glued together, with your seamap overlay, and your own svg objects, (like your ship or your bike etc) over that. So I'm in the process of learning svg Will take a wile, sorry.
|
|
|
Post by alexfish on Mar 17, 2021 19:16:03 GMT 1
You still need to draw to the Window The demo above use what ever layer you want . yet remember that image format is PNG2* And Then in essence can put your combined svg / converted to png or whatever converts and miss seamap bit here it will be svg2* so here Yes, You are correct, and the render may be faster , Create ... means further layer bits and or what ever . = OpenDoor .. what the user wants but the final bit is always 1. If Using GTK then gtk2 default is Render To cairo librsvg & gtk HEREThere again Most Browsers see svg , but it still has to be Rendered some How. Good Luck + BR Alex
|
|
|
Post by rikky on Mar 19, 2021 17:13:29 GMT 1
Pfff Got something. A pre embryonal thing, but sort of working. Using the new GUI functions from BaCon. It glue's a few Open sea charts together to a big one, and shows the chart every half second. Unfortunately you don't see that yet. The big chart looks like one normal chart and is mostly standing still, for I am not there yet to move the vieuwport according to the position of the ship (or bike) I haven't even figured out where this is, the exact location of the ship/bike/etc on the chart. But all the functions are there, so I have pre programmed a position in Amsterdam, and thr position changes slightly over time. Just to demonstrate. Beware, it's still ugly. seamap.bac (11.27 KB) Rik
|
|
|
Post by alexfish on Mar 19, 2021 18:10:13 GMT 1
Hi Rik
compiles , but will not show, is part of the file missing
All is of subs and functions
and the last lines are
stream = g_memory_input_stream_new_from_data((const void *)chart$, -1, g_free) pixbuf = gdk_pixbuf_new_from_stream(stream, NULL, NULL)
CALL gtk_image_set_from_pixbuf(GTK_IMAGE(GUIWIDGET(id, "image")), pixbuf)
CALL g_object_unref(pixbuf) CALL g_input_stream_close(stream, NULL, NULL)
' Draw each second ALARM Draw, 500
ENDSUB
IE, no main
ADDED: Scrap that, think I see it
BR Alex
|
|
|
Post by alexfish on Mar 19, 2021 18:25:00 GMT 1
Hi Rik
Can You post example of command line input
can seem to get this working
pi@raspberrypi:~/riknav $ ./seamap 52.3740300 4.8896900 16 Draw 52.374530 seamap: The computer says no in line 124
BR Alex
|
|