|
Post by alexfish on Mar 28, 2021 9:31:55 GMT 1
Hi All
Whilst testing the X11/cairo maps I found that not all maps x/y return true as a image
on my side have added a test image >0 , if the result <=0 the map will not map the offending bit that will cause the cairo surface to fail. IE one will see a blank or partial blank screen
Hence this is a Bug & will be update the core lib after further testing
BR Alex
|
|
|
Post by alexfish on Mar 28, 2021 11:53:15 GMT 1
X11/cairo now updated to xwin3_2.bac
see First Post
BR Alex
|
|
|
Post by alexfish on Mar 28, 2021 14:11:36 GMT 1
Hi All
Can Confirm as much for RPI3 there is a limit on size of cairo surface
if find line in xwin3_2.bac (First Post)
slippy = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,1950*10,1080*10) and change to
slippy = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,1950*2,1080*2)
Then this works from here
from here looking at certain bits , then can build in auto detect, later BR Alex
|
|
|
Post by bigbass on Mar 28, 2021 16:25:11 GMT 1
Hello Alex
I used
slippy = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,display_width*2,display_height*2)
instead to allow for other monitor sizes
still some fine tuning needed with the arrow keys when you get to the limits
but its looking really good on the RPI3 now!
Joe
|
|
|
Post by rikky on Mar 30, 2021 14:38:00 GMT 1
It is nice beautiful weather, so I'm not seeing a lot of computer nowadays. When I do; I'm mostly configuring the Buster thing the way I want it. This is more work then it seems, for everything is different. As you may notice the spell checker is also still missing. Enough with the complaing part. I have OpenCpn up and running for when I need to suddenly sail away, but I am deffenitely going to switch that for something that is a hybride between the Alex and the Rik thing. For this OpenCpn is outdated. It isnt slippy, or not realy. It doesnt show the charts outside of the area where you are currently residing. You have to move your ship to another location to see the chart of that other location, and move your ship back is ...... I know it's possible, for Ive done it a million times several years ago, but now I cannot get this ship connect back to the position the AIS sends out.... Not so nice; When I go out sailing I have to manualy move my ship to the new position, every time I sail off the chart. This said, As far as I know OpenCpn does not work with a .png or .svg that you can recieve via OpenStreet/SeaMap. You have to convert them to .kap or .000 or something. I tried to make such a thing several years ago but it was very difficult. (This is not to say that I did not succeed.;°) By the time I've learned how to make a kap out of a svg I have probbably my AlexRik thing ready. All I need is getting the mouse recognized via I believe an XEvent according to cairoX2.bac from Alex.(No succes so far) And getting some buttons working via test_svg_animation.bac from Vovchick. (Also no succes so far) And then I think we've something that puts OpenCpn in the shadow.
|
|
|
Post by alexfish on Mar 30, 2021 23:04:02 GMT 1
Hi Rik
Going to be busy next couple of weeks + ,
As the bits stand now , have done.
1. the surface array's are out , this was causing a seg fault on free , can't explain in detail now but will be noted in the next demo.
2. looks like there is a memory problem with the X11 CAIRO SURFACE , hence 1.
3. Re X11 cairo surface looking further at deleting on curtain events or possible Flush *** but I do know from past testing this works .
4 . The mouse , will update at same time as item 2.
5. I need to put a separate a few of the Combine routines this will enable users pick and choose the bits + hoping making it easy for user's to add there Own Flavors
When I say busy , does not mean that an updated will occur after.
BR Alex
|
|
|
Post by alexfish on Apr 4, 2021 15:55:19 GMT 1
Hi All
Have Updated The X11/cairo lib :: post #1
Fix memory loss + : fix key input redraw // hope that it be flicker free
: please note memory can Increase from start up size To win max size , but should remain stable after Max limit is reached:
Please delete old version & replace with 3_2_1 testing & test
If all OK then will start the process As Above
BR Alex
|
|
|
Post by vovchik on Apr 4, 2021 23:50:25 GMT 1
Dear Alex,
To get a clean compile on 64-bit Mint 19 I had to include:
PRAGMA OPTIONS -w
at the top. Thanks. It works...
With kind regards, vovchik
|
|
|
Post by rikky on Apr 5, 2021 7:31:09 GMT 1
It works on the Rpi3 with my old BerryBoot Stretch system. Don't ask me how this can be, but I think this is good news. If it works here, it works anywhere, probably
|
|
|
Post by bigbass on Apr 5, 2021 17:57:22 GMT 1
Hello Alex
Working on the RPI3!
getting around many built in problems the RPI3 has that are
the viewer tookit the storage space map downloader by lat ,lon moving of the viewer
*gps real time interaction will add another level to the mix
Joe
|
|
|
Post by rikky on Apr 6, 2021 23:30:18 GMT 1
So this is about as far as I can get. Putted a lot of effort in it but cannot figure it out any further. I have connected SignalK information to the OpenSeaGui so that you can see the other boats. Created some nice routines that actually work very well to get keys and values out of the SignalK JSON string. But here comes the rub. This SignalK contains a lot of information, every time for every ship again it tells the most stupid of things. Example the key design has a sub-key length which contains: {"meta":{"description":"The various lengths of the vessel","properties":{"overall":{"type":"number","description":"Length overall","units":"m"},"hull":{"type":"number","description":"Length of hull","units":"m"},"waterline":{"type":"number","description":"Length at waterline","units":"m"}}},"value":{"overall":86},"$source":"AIS.AI","timestamp":"2021-03-18T15:36:07.316Z","sentence":"VDM"} And on and on it goes. {"length":86} would have done. So here in Gent (B) there are a little over 100 boats within reach of my AIS and combined they occupy over 400 Kilobytes of JSON string. Filtering this info to something useful costs the raspi3 (with my routines) nearly a minute. (edit: actually only 20 seconds, so not so bad) This is a No Go. Imagine you are in Rotterdam or ShenZu. Maybe the Rpi4 is quicker, but I don't experiment with that thing (yet), until I've something working. Made a routine to make big SignalK's into little ones, and they work more quick. And these are send by a separate program GET_BOATS_OSG to OpenSeaGui. At least now OpenSeaGui does not stall. For the demonstration I have filtered out all the boats that were not moving, and have also not included the big SignalK JSONS, except of ./Track/1 which is an original SignalK string with only one ship. And added a real live animation in which every 2 seconds accounts for one real live minute. Still did not succeed in adding buttons or a mouse. Chinese (GUI things) is just too difficult. 2.tgz (18.2 KB) Rik.
|
|
|
Post by bigbass on Apr 7, 2021 19:01:38 GMT 1
Hello Rik Here is some feedback on your OpenSeaGUI I needed some very small changes for my box since I dont have gtk2 installed PRAGMA GUI gtk3 And you are testing with berryboot I dont have that either GLOBAL downloaddir$ = "/tmp/plotter/" 'GLOBAL downloaddir$ = "/mnt/BERRYBOOT/shared/opt/PLOTTER/TYLES/" give it a test run ./OpenSeaGUI "51° 57.621'" "3° 58.479'" 10
how does this look as feedback! on another note I installed signalK since its the standard that they use parsing JSON with it now using it with the node server will post something with that (in a simple demo) in another place (because will be using that nasty javascript) signalK is very interesting a lot can be done with it and all the tests worked fine on the RPI3 signalk.org/specification/1.5.0/doc/github.com/SignalK/signalk-serverRiK your demo is looking good! Joe
|
|
|
Post by rikky on Apr 11, 2021 17:05:39 GMT 1
'PRAGMA GUI gtk3' makes my picture fall under the screen. Since I want to put there some buttons in the future this is no option But if it works for you, then that's oke. Made a sequential routine for SignalK. Now a little over 100 ships take about 40 milliseconds. So that's good enough for going to Shenzu. These routine(s) can be bettered, for they improved while I was going. so the early 'keys' can be improved. They work for SignalK version 0.1.0 which isn't by far the latest version, unfortunately. So there is still work to be done. I want to take this opportunity to advertise SignalK yet again. It might be J and it might be not the best solution, but it is there. It is open source, and a lot of people are using (and improving) it. And you don't have to know J to work with it, or even want to work with it, you just have to take the output, and work with that. Otherwise, you are inventing the wheel again. As if there is nothing better to do. Only a simple gps is already too difficult. It spits out all the information it receives from the different satellites it has connected to, but it does that asynchronically. So you have to figure out which part belongs to where. The AIS goes a step beyond that even. Ghhhh. Take signalK Use my routines to shorten them quickly. Or improve these routines and you have time to drink a beer, and play with your lady. This said, here is the new demo animation, with a few bugs removed, and without the external program 3.tgz (31.75 KB) Todo list: - buttons of course for whatever. (I've avoided this until now, for It's difficult) - mouse for pointing to a ship, and then get information, like the name, etc. - there seems to be some sort of database somewhere with the objects, like buoys and bridges. The last one is important, for the pictures you can receive via the OpenSeaMap server, they put all the information that you don't need on the openseamap.png. For example in some harbours they have numbered all the bollards. This clutters the whole harbour, so that you cannot sea any water anymore. But that's a whole new chapter. That's it basically. Thanks for watching.. Rik.
|
|
|
Post by rikky on Apr 20, 2021 15:23:12 GMT 1
Alexfish is out sailing. unfortunately.
|
|
|
Post by rikky on May 11, 2021 11:00:21 GMT 1
It's like everything in life, be it programming or whatever follows the 20/80 percent rule. 20 percent of the effort goes into 80 percent of your product, or whatever, and 80 percent goes into the rest. I'm halfway into the last 20 percent. I've still a couple of mayor problems of which I just solved one. The mouse coordinates in an event-box with an svg inside have to be seriously adjusted. I chose HUG, for no mather what I chose gave difficulties, and HUG is old fashioned and deprecated, and therefor documented best. To get the right coordinates for the MOUSE(0) and MOUSE(1) you have to : FUNCTION CALCULATE_MOUSEPOS(pos) LOCAL string$ LOCAL newpos LOCAL difference newpos = ROUND(pos/1.2) difference = CENTER - newpos difference = ROUND(difference/25*30) newpos = CENTER - difference IF newpos < 0 THEN newpos = -1 IF newpos > CENTER * 2 THEN newpos = (CENTER * 2) + 1 RETURN newpos END FUNCTION I'm a bit surprised that nobody noticed. Made a little demo program, where you can click and there appears a dot on the cursor position. EVENT_SVG.tgz (22.21 KB)
|
|