Giter VIP home page Giter VIP logo

coordinatejoker's Introduction

Coordinate Joker

A geocaching add-on – Generates waypoints from formulas with up to 2 variables

Get it on Google Play Get it on F-Droid

Copyright (c) 2018-2024 by siggel [email protected]

This file is part of Coordinate Joker.

Coordinate Joker is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Coordinate Joker is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Coordinate Joker.  If not, see <http://www.gnu.org/licenses/>.

coordinatejoker's People

Contributors

bubendorf avatar dependabot[bot] avatar izzysoft avatar poussinou avatar siggel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

coordinatejoker's Issues

Issue with Coordinates that has a 0 in the beginning

There is an issue.
I have this formula: N48° 23.044+x

If I put 50 in the field for x than the result is not correct. Coordinate jokes's result is N48° 23.940 but the right result should be N48° 23.094.

So there is an issue if the first number after the dot would be zero.
I hope this could be solved.

Extend multi-variable possibilities

Just a first vague idea for better usability now that we have two variables...
Not really sure yet if it really simplifies usability:

IS: Given listing formula like (A+B) * B * B, with B being known (e.g. 7), A unknown, you need to pre-solve the formula for given B or insert B three times

GOAL: What about just taking the formula as it is and selecting letter A range 0-9, letter B range 7 (one single value range), then pressing show button. Letters could be offered in dropdown depending on what is contained in the formula, to keep it faster than entering three times B manually.

I should take care not to destroy functions like exp, abs etc. if letters can be chosen freely instead of just x, y

auto-clear unused variable

Currently the help says you should leave the second variable empty, if the formulas contain only one variable. It would be nice, if this would be detected and be deleted automatically

Add second variable: y

Often not only one stage/answer is unknown, but two.
It would be fine to have an additional variable, y.
y should have its own range / discrete values.

Waypoints are then generated for all combinations of all x and y values. Of course there must be an upper limit of the number of generated waypoints.

Optional: A third variable z. But this is only seldom necessary!

Limit x-range

limit x-range to avoid getting unreasonably many points

Add thx page

Thx page to all contributors
8jasuli8 for logo design
bubendorf for new features, see #18, #19, parenthesis handling

Reduce apk size

remove unused libs, enable minimization > reduces size to nearly 1/2
adjust open source info to changed libs

simplify use of cgeo

cgeo obviously is offered when no mime type is provided, so add this option to settings and cgeo preset and simplify intro (no need for using a filemanager anymore)

Parsing error when input contains newline

html input produces N 53° 12.345'\nE 10° 12.345'
The first ' prevents correct parsing.

Solution: Pattern.compile(pattern, Pattern.DOTALL), i.e. dot matches newline too.

F-droid inclusion

Great work on Coordinate Joker, it fits a need I had more than once. Would you mind your app being served through the opensource/free repository f-droid.org? I think the app fits perfectly the f-droid requirements (no closed source dependencies, copyleft licence).

storage issue for new range fields

noticed that my edited range was not stored. maybe simply due to the removed finish(), but I had already refactored everything when I realized that :(
Model now holds the raw range definition only and IntegerRange.getValues() now became a static function for on-the-fly string to value list conversion.

Unexpected calculation results

See this test as an example:
assertEquals(10.0, Calculator.evaluate("abs(y(x+1))", x:-12, y:1));

The formula evaluates to abs(1(-12+1)) = abs(1-11) = 10

I would rather consider this an error case because -11 has an unary minus which must not be interpreted as a two input minus operator.

The desired behavior would be that such cases result in an exception - maybe later on in ExpressionBuilder's evaluation, e.g. by keeping it abs(1(-11)). That way such points would be sorted out while correct ones will still be calculated.

Probably geocachers won't check beforehand for single digit terms like (x-3) that the input range for x should not start at 0, so this may become relevant in practice.

Cascaded pattern matching

regex ([N,S])([^°])°([^'])'?.([E,W])([^°])°([^']*)'? requires ° in string
Idea is to match xxx m or ft xxx ° TN or vice versa at the end of the string too
Next try without projection, but with °
Next try without °
Next try without ° and without projection
or similar.
So first try is most strict
then some patterns that deliver less results or have higher risk to produce a wrong match. If those later tries produce the correct result, the user is happy, otherwise he can edit it to match the strict format.

Multiline result fields in import?

I think to have seen multiline extraction results on some device but with alpha 1.2.19 long results instead reached over the right screen end on my device.
To be investigated

Refactor reading in change notes

smell: duplicate code

should be done automatically instead: from currentVersion downto previousVersion ignoring non-existent files. Special treatment only for "14_and_before".

Typos in German help

Wenn die gewünschte App dort nicht aufgeführt ist, kannst stattdessen die Experteneinstellungen verwendet werden.
...
Das genau Vorgehen variiert für unterschiedliche Android-Versionen und Varianten.

Don't break if some points are invalid

Example:
N 53 11.(x/4)23 results in N 53 11.0.2523 for x=1
Currently all calculations are stopped and an invalid formula message appears. Obviously this could be avoided by running x=0-36#4 but the app should also work, if the user did not think about valid x values.
Instead such points (like x=1,2,3 in the above example) should simply be omitted, just resulting in a warning, that not all points resulted in valid coordinates.

Refactor webview only activities

The activities

  • help
  • terms of service
  • privacy policy
  • open source licenses

have same layout and similar code, so let them share the same layout and move common code to base class

Import from clipboard

Es wäre hilfreich wenn man die Formel als ganzes aus dem Listing kopieren könnte statt einzelner Felder.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.