- heuristic: haversine distance between current and target node
## Start the application in Docker
To start the appliaction in Docker, you have to clone the repositories of [map-data-parser](https://git.imp.fu-berlin.de/swp-datenverwaltung-navigation-2023/map-data-parser), [metric-builder](https://git.imp.fu-berlin.de/swp-datenverwaltung-navigation-2023/metric-builder) and routing-service (the one you are on right now) into your local system. Inside the headfolders of these repositories, there are Docker Image files named <servicename>.tar. You have to load these images into your local Docker enviroment. This can be easily done by pasting
```sh
docker load < <servicename>.tar
```
into your bash or
```sh
docker load -i <servicename>.tar
```
into your Windows command line. After that you are ready to start the Backend application. To do this you have to run the docker-compose.yml. To do this run the following commands.
```sh
cd /your/path/to/the/routing-service-head-directory
docker-compose up
```
This will start the Docker services network on your local machine. To effectively use the app, you first have to create the needed resources like the road network or the metrics. This is done automatically by Cronjobs, but if you can't wait a day, there is also a way to do it manually. For that you need to go into the bash shell of your running containers. Depending on your installed Docker version, this can be done in different ways so check out the Docker documentation if you have questions. Once you found out, go to the bash shell of the map-builder and run the following command.
```sh
java -jar-Xmx4G app.jar
```
This command will start the map-builder function and create a road network for you. Be prepared to wait about 15 to 30 minutes though as this process can consume lots of resources. Once the process terminates, checkout if everything went smoothely. The process will write how many nodes, ways and turn restrictions were created into your console. If it shows values biggger than 0, it worked. After that you can create the metrics for the weather information. To do that, go into the bash shell of the metric-builder and run the following command.
```sh
java -jar-Xmx4G app.jar
```
This command will start the metric-builder. The process of creating the metrics will only last for a minute and if your road network was created successfully, there should not be any problem. Once the process finished, the application is ready to run. When you want to test the app locally with an emulator, you can just start it. Otherwise you maybe need to change the host adress of the server inside the flutter code. Checkout the [navigation-app](https://git.imp.fu-berlin.de/swp-datenverwaltung-navigation-2023/navigation-app) for more information.