...
Currently, traffic accident by ambulance has been problem in Finland. Ambulance simulator is needed training for driver but professional simulator is not developed yet. Ambulance simulator has is developing in Metropolia University as one of project. Hardware part was almost developed and software part is just start.
2. Goal of my project
Simulator has to have function to read some information from map data of 3D format. As first step, I tried to make function that realize to output height and angle data from input of coordinate data. And tested libcitygml library to handle map data.
...
3. Development environment
...
I tried to use Microsoft Visual Studio at first, because hardware part of simulator had been controlled by program developed by Visual Studio. But I couldn’t build up with libcitygml in environment of Visual Studio. Therefore I used Qt Creator as prototyping.
4. Map data and CityGML
Map data that is 3D format and will be loaded by simulator is constructed by CityGML format. CityGML format is one of kinds of XML-based format. In XML-based format, all data is written with tags. Tags have many kinds and are able to express tree construction. CityGML format data is able to transform easily by libcitygml library to use in environment of C++ language. And, libcitygml is open source library.
...
5. Method
Transformed data by libcitygml is substituted for class of C++. I can choose kinds of filtering when substituting. Data of points have information about type of object, dependence relationship and x, y, z coordinate. I have to pick up and convert from many data of points to height and angle and optional input of coordinate. I realized it function divided by two parts.
5-1 Selection of points
Three points is needed to create surface and pick up function is realized formula as follows.
It is formula of distance between two points, x0,y0 are optional input of coordinate and xi,yi are transformed data from CityGML. This calculation does against all data of points and chooses the value fewest three points, finally.
5-2 Create of surface and calculation of intersections
Surface is created by three points data that is chosen by above formula. The equation of a plane is follows.
In this equation, is got from data of points by using cross product and a normal vector. And, when substituting optional input to x and y, can get z that means height of map surface.
...
6. Experiments and results
...
Both results captured characteristic of a ground but angle data was unstable as case of sample 1. I think that reason come from size of area to calculate angle. Because function only refers, to getting angle, small range, it doesn’t show characteristic.
7. Future plans
To calculate more correctly angle, I think approximation is better way. Make curve from near points and calculate tangent. Probably it way can reflect characteristic of slope better than now method.
...
8. Conclusion
I built function that can output height and angle data from input of coordinate data. Simulator can reflect to motion from condition of geography by this function. But angle data is not stable and not correctly. Function should be more improved by other method.