Commit graph

310 commits

Author SHA1 Message Date
afischerdev
ae7411d4a0 added nogo for heading calc 2024-01-19 10:16:42 +01:00
simdens
2f1422352e
Add "DIVIDE" command and new "maxslope" and "maxslopecost" parameters (#642)
* Added 'DIV' expression for profiles

* Added 'uphillmaxbuffercost' and 'downhillmaxbuffercost' parameter. This makes it possible to penalize very steep path sections

* Added 'div by zero' check in BExpression.java DIV command

* Simplify maxbuffercostdiv logic

* Added documentation about new features

* Fix typo

* Rename new DIV command

* Redesign the new commands
- Allow to set both the maxslope and the maxslopecost in the way context separately for uphill and downhill
- New names for the new commands that better reflect what they actually do

* Adapt the profile developers guide to the latest changes

* Improve wording

---------

Co-authored-by: quaelnix <122357328+quaelnix@users.noreply.github.com>
2024-01-17 16:34:52 +01:00
afischerdev
cb0b1d8855 removed unused formatting 2023-11-21 14:05:19 +01:00
afischerdev
8a7fa9fa81 changes for engineMode 2 2023-11-21 13:26:05 +01:00
afischerdev
fcbaf598aa moved some format routines 2023-11-21 13:00:39 +01:00
afischerdev
ad3db9c004 updated output for command line 2023-11-20 17:33:09 +01:00
afischerdev
c47444e0f8 enabled functions for public 2023-11-20 17:09:14 +01:00
afischerdev
56dbd52065 added new format classes 2023-11-20 17:08:20 +01:00
afischerdev
90cc045404 moved string control to app worker 2023-10-05 12:48:06 +02:00
afischerdev
3acb0b1fdb updated doc entries 2023-09-30 11:13:57 +02:00
afischerdev
fe08674632 added test if nogo array exists 2023-09-30 11:04:34 +02:00
afischerdev
42f0ac6627 added app specific vars 2023-09-30 11:01:21 +02:00
afischerdev
6b3cfb4c91 added a parameter test 2023-08-24 10:06:00 +02:00
afischerdev
ed7f473556 added one place for parameter 2023-08-24 10:05:38 +02:00
afischerdev
5ed5259912 reworked command line start 2023-08-24 10:04:08 +02:00
afischerdev
dad4ea583c change version number 2023-08-17 18:03:03 +02:00
afischerdev
71dfbac13c check for NPE on badWays 2023-07-31 10:24:14 +02:00
afischerdev
f14b8795ea change new version number and date 2023-07-18 12:53:27 +02:00
afischerdev
22cf0bba68
Merge pull request #594 from rkflx/PR/only-revert-voicehint-reindexing
Revert voice hint reindexing
2023-07-17 12:49:07 +02:00
afischerdev
3706c0cb57 update to new beta version 2023-07-16 12:52:47 +02:00
Henrik Fehlauer
d98b1060d4
Explicitly map internal voice hint ids to external JSON API ids
As c9ae7c8 showed, changing internal ids without being aware of the
possible impact might easily lead to break the external API.

While ids could be fixated by adding respective tests, an even more
elegant solution is to make the mapping from internal ids to external
ids explicit, similar how it is already done for other voice hint
formats.

To underline the purpose of the mapping even more, the
respective method is renamed appropriately.

Test Plan:
  - `./gradlew test`
  - Export a complex route in BRouter-Web and check voice hints have not
  been changed.
2023-07-12 08:59:12 +00:00
Henrik Fehlauer
82fecf95f6
Revert voice hint indexing change in JSON API to restore compatibility
a9e8731 made voice hints available from `formatAsGeoJson()`, which is
used both in the GeoJSON HTTP API and in the JSON Java API. To indicate
a specific type of voice hint, it was chosen to include its numeric id
in the output JSON array among other data. The full list of available
ids was defined in `class VoiceHint`, e.g. `static final int C = 1;`.

Consumers of the API now depended on the mapping from id to intended
voice hint not changing, since otherwise incorrect voice hints could be
displayed. Unfortunately that API contract was broken in c9ae7c8, where
instead of assigning unused ids to new commands, the meaning of existing
ids was changed. This broke compatibility: Clients adapted to the change
did not work with the old indexing anymore, and clients not yet adapted
would break with newer BRouter releases, e.g. they would suddenly
display "Off route" for a "right u-turn".

To restore compatibility, the indexing is reverted to its old state.

This will unbreak GeoJSON/JSON API users no yet adapted to BRouter 1.7.0
or 1.7.1, e.g. BRouter-Web as well as unmaintained clients. While API
users which already patched ids would need to undo or special-case their
changes, the impact is believed to be low, as no such users are
currently known and the breakage was released only recently.

The changed meaning of `TU` in output formats (before: `u-turn-left`,
now: `u-turn-180`) has not been reverted for now, since either that
command is mapped to fallback solutions anyway (e.g. Orux, old Locus,
Gpsies), the change has already been implemented in clients (new Locus,
Cruiser) or was only planned to be implemented in the future (OsmAnd).

Fixes #584

Test Plan:
  - `./gradlew test`
  - Run BRouter with an unpatched BRouter-Web and confirm voice hint
  ids have been restored to the same ones as emitted by BRouter 1.6.3.
2023-07-11 17:57:14 +00:00
afischerdev
6084db93d3 new version 1.7.1 2023-07-10 18:18:10 +02:00
afischerdev
cc265269e6 change finish route parameters 2023-07-08 18:17:06 +02:00
afischerdev
488d37b070 used greater diff value 2023-07-08 09:57:50 +02:00
Arndt Brenschede
de0acb77c5 optimizing constant expressions in profile parsing 2023-06-25 12:51:10 +02:00
Manuel Fuhr
d508337d7e Fix tests with elevation data 2023-05-22 13:54:14 +02:00
afischerdev
64cabbe42f
Update RoutingEngine.java 2023-05-21 11:23:38 +02:00
afischerdev
fcab1a31fd
Merge branch 'master' into engine-mode 2023-05-21 11:14:00 +02:00
afischerdev
4e9d3d90eb re formatting entry point 2023-05-16 10:35:41 +02:00
afischerdev
3c5ac660bf get elevaton single point 2023-05-14 16:36:52 +02:00
Manuel Fuhr
28f205c1ad Enable PMD rule PrimitiveWrapperInstantiation and fix violations 2023-05-09 23:11:14 +02:00
Manuel Fuhr
7a6d3bd9d9 Enable PMD rule UseDiamondOperator and fix violations 2023-05-09 23:11:14 +02:00
afischerdev
3dffea1753 introducing engineMode for future use 2023-05-09 12:26:54 +02:00
afischerdev
43ea1ef054 rework start inside roundabout, turnInstructionRoundabouts 2023-05-04 12:28:05 +02:00
afischerdev
2c707c977b
Merge pull request #542 from moving-bits/blockformatting
Unify brackets for opening blocks with comments
2023-04-30 10:33:54 +02:00
moving-bits
79b1eda1ed Unify brackets for opening blocks with comments 2023-04-29 19:04:52 +02:00
moving-bits
52185f9860 fix some spellings 2023-04-29 18:38:16 +02:00
afischerdev
80d9a47927 version 1.7.0 2023-04-29 12:17:54 +02:00
afischerdev
b7422c0ca7 smaller rework on elev and energy values 2023-04-24 13:41:29 +02:00
afischerdev
1779b1d3b5 update misplace check routine for roundabouts 2023-04-22 13:17:52 +02:00
afischerdev
8190aaa92d update new exports 2023-04-22 12:45:36 +02:00
quaelnix
4c75de08c6
Cleanup recalcTrack 2023-04-18 15:11:24 +02:00
quaelnix
f5f3a7a6d6 Remove FastMath.exp
FastMath.exp was neither continuous nor strictly monotonically increasing for x < -1 and therefore inappropriate for the intended purpose.
2023-04-10 11:48:35 +02:00
afischerdev
4147405362
Merge branch 'abrensch:master' into fix-nogos 2023-03-28 09:33:04 +02:00
abrensch
dc5602b816
Merge pull request #497 from quaelnix/cost-cutoff-way-context
Allow hill cost and hill cutoff in way context
2023-03-27 09:20:35 +02:00
afischerdev
b225dd22d9 do not remove wpt in weighted nogos 2023-03-25 12:12:29 +01:00
afischerdev
fc22892a66
Merge pull request #511 from afischerdev/app-update
App update
2023-03-20 16:59:13 +01:00
afischerdev
0b3e6b19b0 add check wpt vs nogos 2023-03-19 13:58:32 +01:00
afischerdev
25be21fec9 reduze exception info 2023-03-14 14:27:57 +01:00