Use game engine to simulate real air traffic - unity3d

I want to simulate something similar to an ATC radar display.
it needs to plot a lot of points and ways that I have their geographic positions and also plot the moving objects on the map then update their position as soon as their new positional data arrive.
I used leaflet.js without any realworld map or image as background(which is not even required for me), but there were two issues. first is I need to plot too much objects and polylines and polygons and some moving objects, ans second is leaflet.js requires the use of a browser which affects the performance.
I think maybe using a game engine would result in better performance, but I'm not a c++ or c# programmer so I went for Godot and couldn't find anything about how to plot geographic coordinates in that environment(neither for Unity).
could anyone give me any idea how to program such an app?

Related

Does Leaflet have a "geopositioning mode"?

I use the Leaflet plug-in "Leaflet.ImageOverlay.Rotated.js" to use its L.imageOverlay.rotated(...) thing in order to overlay certain map pieces in various places on top of the normal map.
It does this by taking an image and having me tell it its top-left, top-right and bottom-left coordinates to figure out how to rotate, tilt and stretch/squeeze it properly.
It took me a very long time to figure these coordinates out by hand. For this reason, I'm looking for some sort of "geopositioning mode", perhaps enabled by this extension, which would simply let me click three times on the map to tell it where these points go. That would be so simple for the developers to do and would help so much. It's such an obvious thing to do that I strongly suspect it's already implemented and ready.
Is there such a "mode"? If not, how am I expected to find the positions without spending so much time and trial-and-error as I did for the first overlay map image?
Added: I should also clarify that the image should be shown in this mode so that you can re-adjust the points and watch in real time as the image bends/warps, to get it just right.
you can develop a modul for this problem.
find minimum 4 point on raster map.
click on tilemap for 4 points
than find different slope and distance same 2 points.
maybe you must rotate and use affine transformation.

Unity large,dynamic tile map

I'm thinking of making city transport simulation game, based on tile map like simcity. Because transportation is the main component, I'm not gonna describe city thoroughly, like drawing all the buildings or others. But I need to divide the city to districts and villages.
I want them to be generated randomly, based on tile map system - Actually this doesn't have to be tile based, but I don't have any better idea to generate randomly divided districts.
The problem is there are literally to many tiles. Of course I won't make all the tiles to GameObjects, but array storing the information of tile just gets like 4000x3000 (for 12,000,000 tiles). Is it okay? I think this will seriously slow down the game.
I searched for many ways to generate tile maps, but those tile maps are for RPGs.. they are just sprites and background.
My tiles should change dynamically(maybe the colors, and I'm making the game with 3d so maybe the tile can have height that may change), with showing the status of that tile(a small region of the city). What will be better way for my needs?
Thank you!
The short answer is that you should generate a mesh to represent your tiles. This will allow you to represent a large number of tiles as a single game object.
It is not as troublesome as it sounds. I actually went through this myself recently, and have written a step-by-step guide on how to do it, and how to solve a host of other issues I ran in to working with tiles:
http://matthewlynch.net/2017/02/19/efficient-artefact-free-2d-tile-mapping-in-unity-5-5/
The only caveat I would mention (this is discussed in the tutorial, but not directly addressed) is that you should still divide your map up in some way.
I would not recommend exceeding 100x100 tiles in a single mesh, and in fact would recommend breaking it up even further. But once you get the basics of tile->mesh rendering up and running, this is not difficult to do.

Extracting measurements from a finger via ROI and image processing MATLAB

I am trying to do a number of things via MATLAB but I am getting a bit lost with what techniques to use. My ultimate goal is to extract various measurements from a users fingerprint presentation, e.g. how far the finger over/undershoots, the co-ordinates of where the finger enters, the angle of the finger.
In my current setup, I have a web camera recording footage of a top down view of the presentation which I then take the video file and break down into individual frames. https://www.dropbox.com/s/zhvo1vs2615wr29/004.bmp?dl=0
What I am trying to work on at the moment is using ROI based image processing to create a binary mask around the edges of the scanner. I'm using the imbw function to get a binarised image and getting this as a result. https://www.dropbox.com/s/1re7a3hl90pggyl/mASK.bmp?dl=0
What I could use is some guidance on where to go from here. I want to be able to take measurements from the defined ROI to work out various metrics e.g. how far a certain point is from the ROI so I must have some sort of border for the scanner edges. From my experience in image processing so far, this has been hard to clearly define. I would like to get a clearer image where the finger is outlined and defined and the background (i.e. the scanner light/blocks) are removed.
Any help would be appreciated.
Thanks

Shape detection using MATLAB

I am working on car parking system project. For that, I would like to detect the presence of a car.
Can anybody tell me how I can accomplish this using MATLAB?
Also, what is the algorithm for detecting a car?
There's a whole world of methods for object detection in images. You need to learn a little bit about image processing to solve this problem. I suggest you read about template matching or more generally about Object recognition. Specifically for car detection, if you know they will be seen at a certain angle (head on, for example) i'd try Viola-Jones detection which is implemented in OpenCV as haar-based feature cascade detection. Although OpenCV is not a matlab library, you can probably find something in matlab's image processing toolboxes that does a similar job (or interface into OpenCV)
Background subtraction would be a simple place to start.
In a nutshell:
Can capture an image of your empty parking lot. This is your reference image.
Compare the current image of your parking lot with the reference image. The parts that are different will be of interest.
Problems:
You need to keep updating your reference image to stay current with the conditions (e.g. day, night, cloudy, raining). Sometimes this may not be possible, because your reference image needs to have no cars in it for the approach to work.
Moving things in the background (like trees shaking in the wind) will come up as false positives
Have you considered using 3D/stereoscopic imaging in addition to using 'normal' images? If yes you could open up a whole new world of methods and intelligent tricks to remove objects based upon their distance to the camera. Then, any object that is a certain, fixed distance from the camera (e.g. your background) is easily removable and you can just process the new parts of the image (e.g. cars).
If this interests you I can supply you with an algorithm I have developed to detect animals in a livestock pen, which is a similar concept.

iPhone: GPS on custom map + CATiledLayer

Really hope someone can help me as I'm a bit stuck :S
I have a custom map of an event using the CATiledLayer so users can zoom in and scroll around the map. What I would like to do now is add the functionality to let the user know where they currently are on the map. I know it can be done as I've seen an app do this before. I'm not sure how to go about doing it though, maybe I need to convert lat/lon into pixels but I'm not sure if thats possible (depending on how big the image is, etc).
On another site it was mentioned to find out the boundaries of the map and then I can add pins to the map, but I'm not sure how to go about doing this? Will I need to find every coordinate (lat/lon) within the boundary so I can add the pin of where the user is currently?
If anyone can give me with any advice or pointers, I'd much appreciate it
You can use the route-me library by adding your own map source class. A good article that explains how to do it is here http://mobilegeo.wordpress.com/2010/07/07/route-me-native-iphone-mapping-framework/
I'm facing a challenge right now in trying to map GPS coords to a map that's an artist's rendition. In particular this is for a ski mountain, so the artist's rendition is a "trail map". The trail map is not accurate in that the whole mountain has been squeezed onto the one view, yet the actual topology of the mountain doesn't conform to the drawing.
I've tried several approaches:
1) Triangulation using known GPS coordinates of the lift stations. This is fairly simple to implement, yet this is not accurate enough and the algorithm fails if the rendition differs enough from the GPS map.
2) Creating a uniform grid for both the GPS map and the Trailmap, then doing a mapping from cells in the GPS map to the Trailmap. The downside to this is it can be a lot of busy work with no easy UI for doing it.
3) Calculating the vectors of each lift (being a straight line), find the closet lift station to a given GPS point, and calculate the estimated Trailmap location using this vector.
I'm considering #2, which is essentially the simplest solution. But if you've found a better way, I'd love to hear it.