Skip to content

Commit

Permalink
Merge pull request #86 from digitalfabrik/bugfix/linters
Browse files Browse the repository at this point in the history
Fix djlint & pylint
  • Loading branch information
svenseeberg authored Dec 3, 2023
2 parents 4c0add9 + ac925e5 commit 125d5ec
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 19 deletions.
4 changes: 2 additions & 2 deletions opendrift_leeway_webgui/leeway/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<meta name="keywords"
content="OpenDrift, Leeway, SAR, Search, Rescue, Simulation, Drift" />
<title>Leeway Simulation</title>
<link rel="stylesheet" href="{% static 'css/style.css' %}"/>
<link rel="stylesheet" href="{% static 'css/style.css' %}" />
</head>
<body>
<main>
Expand All @@ -24,7 +24,7 @@
<p>
<a href="https://github.com/digitalfabrik/opendrift-leeway-webgui">Source Code</a>
{% if user.is_authenticated %}
| <a href="{% url "simulation_documentation" %}">Documentation</a> | <a href="{% url "simulation_list" %}">List of simulations</a> | <a href="{% url "simulation_form" %}">New Simulation</a> | <a href="{% url "logout" %}">Logout</a>
| <a href="{% url "simulation_documentation" %}">Documentation</a> | <a href="{% url "simulation_list" %}">List of simulations</a> | <a href="{% url "simulation_form" %}">New Simulation</a> | <a href="{% url "logout" %}">Logout</a>
{% endif %}
</p>
</main>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,41 @@
{% block content %}
<h2>Leeway Simulation Documentation</h2>
<h3>Background</h3>
<p>This software acts as a web user interface for the <a href="https://opendrift.github.io/gallery/example_leeway.html">OpenDrift Leeway</a> model. The basis for the simulation are experiments performed by the US Coast Guard in 1999. The results are published on <a href="https://ntrl.ntis.gov/NTRL/dashboard/searchResults/titleDetail/ADA366414.xhtml">https://ntrl.ntis.gov</a>, which include desriptions of the objects that were tested (2-13 and following pages).</p>
<p>
This software acts as a web user interface for the <a href="https://opendrift.github.io/gallery/example_leeway.html">OpenDrift Leeway</a> model. The basis for the simulation are experiments performed by the US Coast Guard in 1999. The results are published on <a href="https://ntrl.ntis.gov/NTRL/dashboard/searchResults/titleDetail/ADA366414.xhtml">https://ntrl.ntis.gov</a>, which include desriptions of the objects that were tested (2-13 and following pages).
</p>
<h3>E-Mail Interface</h3>
<p>If you have a low bandwidth connection, you can use the e-mail interface. The simulation parameters can be set in the e-mail subject. Your e-mail address needs to be registered for you user account in this tool first. The result of the simulation will be sent to your e-mail address within a couple of minutes.</p>
<p>
If you have a low bandwidth connection, you can use the e-mail interface. The simulation parameters can be set in the e-mail subject. Your e-mail address needs to be registered for you user account in this tool first. The result of the simulation will be sent to your e-mail address within a couple of minutes.
</p>
<ol>
<li>Create a new e-mail</li>
<li>Enter simulation parameters with adjusted values in the subject: <pre>latitude=33.333;longitude=14.444;duration=48;start_time=2022-12-10 00:00:00;object_type=27</pre></li>
<li>Send the mail to <pre>{{ SERVER_EMAIL }}</pre></li>
<li>Create a new e-mail</li>
<li>
Enter simulation parameters with adjusted values in the subject: <pre>latitude=33.333;longitude=14.444;duration=48;start_time=2022-12-10 00:00:00;object_type=27</pre>
</li>
<li>
Send the mail to <pre>{{ SERVER_EMAIL }}</pre>
</li>
</ol>
The default object type for simulatoins is a life raft (ID: 27). Some alternatives are:
<ul>
<li>Person in Water (unknown state): 1</li>
<li>Person in Water (conscious): 2</li>
<li>Person in water (deceased): 6</li>
<li>Life raft: 27</li>
<li>Skif, V-hull: 45</li>
<li>Person in Water (unknown state): 1</li>
<li>Person in Water (conscious): 2</li>
<li>Person in water (deceased): 6</li>
<li>Life raft: 27</li>
<li>Skif, V-hull: 45</li>
</ul>
<h3>Interpreting Simulation Result</h3>
<p>When the simulation is finished, you will receive an e-mail that contains an attached image with the simulation results.</p>
<p>The simulation will randomly distribute 100 test particles around your entered coordinates. The default radius for distributing the particles is 1000 meters. If the coordinates are not very clear, you can increase this radius.</p>
<p>The starting points of the simulated particles are marked with green dots. If the particle ends up floating in water at the end of the simulation, the particle is marked blue. If the particle ends up on shore, it is marked green.</p>
<p>The image shows the trajectories of particles from the starting points to the ending points. The color of the trajectories incdicates the position of a particle at a given time. For example the color green always shows the position of the particles after ~50% of the simulated time range, while orange shows the positions at ~75%.</p>
<p>
When the simulation is finished, you will receive an e-mail that contains an attached image with the simulation results.
</p>
<p>
The simulation will randomly distribute 100 test particles around your entered coordinates. The default radius for distributing the particles is 1000 meters. If the coordinates are not very clear, you can increase this radius.
</p>
<p>
The starting points of the simulated particles are marked with green dots. If the particle ends up floating in water at the end of the simulation, the particle is marked blue. If the particle ends up on shore, it is marked green.
</p>
<p>
The image shows the trajectories of particles from the starting points to the ending points. The color of the trajectories incdicates the position of a particle at a given time. For example the color green always shows the position of the particles after ~50% of the simulated time range, while orange shows the positions at ~75%.
</p>
{% endblock content %}
2 changes: 1 addition & 1 deletion opendrift_leeway_webgui/leeway/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class LeewaySimulationDocumentation(TemplateView):
template_name = "leeway/leewaysimulation_documentation.html"

def get_context_data(self, **kwargs):
context = super(LeewaySimulationDocumentation, self).get_context_data(**kwargs)
context = super().get_context_data(**kwargs)
context["SERVER_EMAIL"] = settings.SERVER_EMAIL
return context

Expand Down
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ multi_line_output = 3
jobs = 0
load-plugins = [
"pylint_django",
"pylint.extensions.emptystring",
"pylint.extensions.comparetozero",
"pylint.extensions.comparison_placement",
"pylint.extensions.for_any_all",
"pylint.extensions.consider_ternary_expression",
Expand Down

0 comments on commit 125d5ec

Please sign in to comment.