Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

1. Introductions and Background

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

...

.

 

1. Background

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

In my project, development environment is as follows.

IDE: Qt Creator

Language: C++

Added external library: libcitygml

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.

Image Added

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.

Image Added

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

Built function was tested using by two sample data. Sample data is as Fig.1 that picture is generated by FZK Viewer that is free software to read CityGML format. And call left picture sample 1 and right is sample 2 in Fig.1.

 Image Added

Fig.1 Data samples

Image Added

Fig.2 Data of sample 1

Fig.2 is view from above. In this experiments, I run two routes, (1) is from left to right and (2) is from bottom to top. Fig.3 and Fig.4 are results. Blue line is surface of ground by height data and red line is angle of between surface and normal vector. And, both results could reproduce characteristic of geographic. But angle data is not reflected characteristic of slope.

Image Added

Fig.3 Output results when moving followed to x-axis. (1)

Image Added

Fig.4 Output results when moving followed to y-axis. (2)

Fig.5 is another sample. Sample 2 was experimented like same, mentioned above.

Image Added

Fig.5 Data of sample 2

Image Added

Fig.6 Output results when moving followed to x-axis. (3)

Image Added

Fig.7 Output results when moving followed to y-axis. (4)

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.

2. Future Plans

I looked about libcitygml. It is C++ library for using CityGML data. CityGML data is a common information model that is a XML-based format.

I’m going to try for using library in develop environment of Visual Studio.

3. Questions

What data are you going to using for simulation?

 -> We’re going to use Helsinki city GML data. But at this time, I will use Berlin city data as sample.

How do you do synchronization to software of Euro Truck?

 -> Our object is to make Ambulance Simulator. We’re considering to use Mevea that is software for simulation. So don’t have to do synchronisation to Euro Truck.

What type output for simulation do you need?

 -> Anything is OK because we’re going to develop a system of all in environment of C++. 

What is essence as a study in this project?

 -> This project is a basic study for developing simulator. Because we have to consider what ways is valid for using 3D map data.

4. Reference

https://code.google.com/p/libcitygml/

http://www.opengeospatial.org/standards/citygml

http://www.mevea.com

OpenSceneGraph

osgEarth is a C++ terrain rendering SDK

...