cgeo / cgeo-guide

Snapshot of the c:geo DokuWiki user guide
https://manual.cgeo.org
3 stars 0 forks source link

Add parsing formula to parsing waypoint section #34

Closed murggel closed 3 years ago

murggel commented 3 years ago

In the section of parsing waypoint from note / export waypoint to note the syntax for the formula should be added. (taken from the PR 9633 (https://github.com/cgeo/cgeo/pull/9633, related to https://github.com/cgeo/cgeo/pull/9211)

Supported syntax: Like the "normal" waypoint-syntax, use (F-PLAIN) to indicate the plain-formula (like (NO-COORD) for empty coords), then the formula string with both coordinates and (optional) already known variables / equations separated with "|". If all variables are known, the coordinates of the waypoint are calculated and stored in the waypoint.

An existing formula will be exported to the PN, if not all variables are defined. Otherwise only the coordinates are exported like a "normal" waypoint.

Example: @Final (F) (F-PLAIN) N48 AB.(C*D/2) E 9 (C-D).(A+B) |A=a+b|a=5|

Only upper-case letters are allowed in the formula.

murggel commented 3 years ago

Erster Entwurf für die Erweiterung des Kapitels https://manual.cgeo.org/de/notecoords#erweiterte_wegpunkt-syntax

Die Screenshots der bisherigen Beschreibung fehlen hier natürlich, die neuen Screenshots mache ich dann noch.


<p>
Vielleicht hast du bemerkt, dass Wegpunkte, die aus der persönlichen Notiz erstellt wurden, mit Standardnamen wie z.B. <code>Persönliche Notiz 2</code> angelegt werden. Wenn du mehr Möglichkeiten für Wegpunkte aus der persönlichen Notiz nutzen möchtest, kannst du die erweiterte Wegpunkt-Syntax nutzen.
Damit kannst du:
...
...
...
</p>
<ul>

<li class="level1"><div class="li"> <strong>Koordinate</strong>: Es gelten die gleichen Regeln wie in den oberen Kapiteln beschrieben. Zusätzlich gibt es die spezielle Markierung <code>(NO-COORD)</code>, die genutzt werden kann um eine leere Koordinate zu erzeugen (dies wird im seltenen Fall benötigt, dass man eine eigene Notiz zu einem existierenden vordefinierten Wegpunkt hinzufügen möchte, der keine Koordinate hat).</div>

<li class="level1"><div class="li"> <strong>Formel</strong>: Die Markierung (F-PLAIN) kann genutzt werden, um die Koordinaten des Wegpunktes mit dem Koordinatenformat &quot;Schlicht&quot; zu berechnen (dies kann sinnvoll zum Speichern angefangener Formeln sein oder wenn in der Beschreibung Wegpunkte mit komplexen Formeln angegeben sind, bei denen die Eingabe im Wegpunkt-Rechner mühsam ist). Oft enthalten Cachebeschreibungen bereits Koordinaten in diesem erwarteten Format. Dann kann die Koordinaten-Formel - so wie sie ist - aus der Beschreibung übernommen werden. Evtl schon bekannte Werte der Variablen können getrennt mit dem &quot;|&quot;-Symbol angegeben werden.

Die Formel muss den Kriterien wie unter 
https://manual.cgeo.org/en/coordinatedialog#using_plain_coordinate_format 
https://manual.cgeo.org/de/coordinatedialog#nutzung_des_schlicht_koordinaten-formats
 beschrieben entsprechen.

Sollen die Variablen nach und nach ermittelt werden und über die Persönliche Notiz eingegeben werden und nicht über den Formel-Editor, so empfiehlt es sich, die Extraktion der Wegpunkte zu verhindern, bis alle Variablen in der Persönlichen Notiz eingegeben wurden. Dann kann der Wegpunkt mit allen Werten erzeugt werden und es werden auch gleich die Koordinaten berechnet.
</div>

<p>
Bei der Veränderung eines Wegpunktes werden die folgenden Regeln angewandt:
</p>
<ul>
<li class="level1"><div class="li"> Für vom Owner vorgegebene Wegpunkte können nur die Koordinate (wenn vom Owner leer gelassen) und die eigene Notiz angepasst werden.</div>
</li>
<li class="level1"><div class="li"> In bestehenden Wegpunkten werden Daten nur überschrieben, wenn diese entweder leer oder mit dem Standardwert (z.B. systemgenerierter Wegpunktname) gefüllt sind.</div>
</li>
</ul>

<p>
Die folgenden Beispiele zeigen unterschiedliche Texte (links) und die daraus automatisch erstellten Wegpunkte (rechts):
</p>
<div class="table sectionedit9"><table class="inline">
    <thead>
    <tr class="row0">
        <th class="col0"> Text der persönlichen Notiz </th><th class="col1"> Generierter Wegpunkt </th>
    </tr>
    </thead>
    <tr class="row1">
        <td class="col0"> <code>@ A good parking place N50 11.456 E010 35.345 park under the oak tree</code> </td><td class="col1"> <a href="/_detail/en/parkingplace.png?id=de%3Anotecoords" class="media" title="en:parkingplace.png"><img src="/_media/en/parkingplace.png" class="media" alt="" /></a></td>
    </tr>
    <tr class="row2">
        <td class="col0"> <code>@ (X) marks the spot N50 12.010 E010 33.783</code> </td><td class="col1"><a href="/_detail/en/marksthespot.png?id=de%3Anotecoords" class="media" title="en:marksthespot.png"><img src="/_media/en/marksthespot.png" class="media" alt="" /></a> </td>
    </tr>
    <tr class="row3">
        <td class="col0"> <code>@[S5]Station 5 (X) (NO-COORD) „We have to think about this later“</code> <br/>
<br/>
<em>Hinweis: Dieses Beispiel nimmt an, dass es einen vom Owner vorgegebenen Wegpunkt mit dem Präfix S5 im Geocache gibt</em></td><td class="col1"><a href="/_detail/en/station5.png?id=de%3Anotecoords" class="media" title="en:station5.png"><img src="/_media/en/station5.png" class="media" alt="" /></a> </td>
    </tr>
    <tr class="row4">
        <td class="col0"> <code>@Final (F) (F-PLAIN) N48 AB.(C*D/2) E 9 (C-D).(A+B) |A=a+b|a=5| </code>  <br/>
<br/>
<em>Hinweis: Im Wegpunkt-Rechner ist die Formel dann eingetragen:
<a href="/_detail/en/finalformulacalculator.png?id=de%3Anotecoords" class="media" title="en:finalformulacalculator.png"><img src="/_media/en/finalformulacalculator.png" class="media" alt="" /></a>
</em></td><td class="col1"><a href="/_detail/en/finalformula.png?id=de%3Anotecoords" class="media" title="en:finalformula.png"><img src="/_media/en/finalformula.png" class="media" alt="" /></a> </td>
    </tr>   
</table></div>
Lineflyer commented 3 years ago

Hi @murggel ,

that does not help in html. Better I create an account for you and you can simply add it in wikistyle markdown directly?!

murggel commented 3 years ago

Ok, then I missunderstood. I thought the repo here is only a Screenshot and changes go directly in html.

So I can do the change directly here in the repo?

murggel commented 3 years ago

And is German or English master for translation?

Lineflyer commented 3 years ago

You are partly right:

I already created a user for you, I just triggered sending a password (reset) again. Please check your mails and try if you can login.

In https://manual.cgeo.org/en/translation you will find a first HowTo. Its easy.

English is master, whereas this "only" means, that after editing the English version it will mark all other languages as "outdated". So its wise to do English first and German afterwards only for that reason.

murggel commented 3 years ago

Ah, ok, thanks. The mail was unfortunately marked as spam 😲

Now I see the 'edit' buttons. I will try in the next days...

murggel commented 3 years ago

Added english and german description for the tag (F-PLAIN) in the chapter https://manual.cgeo.org/../notecoords