Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rv2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Phyks
rv2
Commits
b40aeac2
Commit
b40aeac2
authored
Jan 15, 2015
by
Jean-Benoist Leger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
documenting get_route
parent
2c94fdb3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
179 additions
and
5 deletions
+179
-5
howto_compile.md
howto_compile.md
+1
-1
src/get_route.cc
src/get_route.cc
+1
-4
using_get_route.md
using_get_route.md
+177
-0
No files found.
howto_compile.md
View file @
b40aeac2
...
...
@@ -46,5 +46,5 @@ are available:
-
route_query_nodes_database: query nodes db in route db to have informations
about given nodes id.
-
route: Give a route between given coordinated. The goal of the project.
-
get_
route: Give a route between given coordinated. The goal of the project.
src/get_route.cc
View file @
b40aeac2
...
...
@@ -31,7 +31,7 @@ std::list<std::list<route_point_t> > get_routes(
if
(
nids_it_next
!=
nids
.
end
())
{
if
(
state_status_on_stderr
)
fprintf
(
stderr
,
"## stat
us
: routing_track %lu
\n
"
,
track
);
fprintf
(
stderr
,
"## stat
e
: routing_track %lu
\n
"
,
track
);
std
::
list
<
route_point_t
>
current_route
=
get_route_between_nids
(
...
...
@@ -41,9 +41,6 @@ std::list<std::list<route_point_t> > get_routes(
*
nids_it_next
,
state_status_on_stderr
);
ret
.
push_back
(
current_route
);
if
(
state_status_on_stderr
)
fprintf
(
stderr
,
"## status: end_track %lu
\n
"
,
track
);
if
(
stdout_output
==
RV_STDOUT_OUTPUT_TEXT
)
write_to_stdout
(
route_db
,
track
,
current_route
);
...
...
using_get_route.md
0 → 100644
View file @
b40aeac2
First
=====
You must have a route_db.
Input
=====
Parameters
----------
The
`get_route`
program read parameters and route point in stdin. Each parameter
is given in a line, the parameter name separated from the value by a single
space.
Each non-given parameter is used as its default value. See
`./src/read_from_stdin.cc`
.
Available parameters are:
-
`mass`
(in kg): the total mass (bicycle + human) (default: 90)
-
`power`
(in W): the reference biking power (default: 140)
-
`SCx`
(in m^2): the equivalent surface for wind (default: .45)
-
`Cr`
: the resistance of the road (default: .008)
-
`velocity_nopower`
(in m.s^-1): when we stop giving power (default: 9.7)
-
`velocity_brake`
(in m.s^-1): when we start to brake (default: 13.9)
-
`velocity_equilibrium`
(in m.s^-1): when we walk (default: 1.4)
-
`power_walk`
(in W): power used for walk (default: 140)
-
`lateral_acceleration`
(in
`g`
.
`g=9.81m.s^-2`
): maximum lateral acceleration (default: .5)
-
`walk_penalty`
: multiplicative penalty for walking (default: 1, meaning no penalty)
-
`Cw`
: resistance of road for walking (default: .03)
-
`criterion`
: (default:
`energy`
) valid values are:
-
`energy`
: the total energy is minimized
-
`energy_d`
: the total energy is minimzed using Dijkstra algorithm. Only for
test. This must not be availble to final users.
-
`time`
: the total time is minimized
-
`time_d`
: the total time is minimzed using Dijkstra algorithm. Only for
test. This must not be availble to final users.
-
`distance`
: the total distance is minimized
Help choosing parameters
------------------------
To choose the
`power`
parameter, let
`velocity`
(in m.s^-1) the constant speed on
a flat road,
`g=9.81 m.s^-2`
,
`rho=1.204 km.m^-3`
:
power = mass * g * Cr * velocity + 1/2 * rho * SCx * velocity^3
To choose the
`power_walk`
parameter, choosing the same value as
`power`
is a
good idea.
To choose
`lateral_acceleration`
. The first for a road with width 2.5m, the
curvature radius of a perpendicular turn is
`Rc=8.5m`
. Let
`velocity`
the speed
in a turn with this curvature radius:
lateral_acceleration (in m.s^-2) = velocity^2 / Rc
Then
lateral_acceleration (in g) = [lateral_acceleration (in m.s^-2)] / g
Routing points
--------------
Before starting giving routing points. The line
`points`
must be given on stdin.
Each line is a point, lon and lat are given (in this order) separated by a
space.
Starting
--------
To start the routing, the line
`route`
must be given on stdin.
Example of input
----------------
mass 112.0
criterion energy
SCx .40
walk_penalty 2
points
0.
044 45.661
0.
169 45.648
0.
240 45.737
0.
335 46.599
route
stderr
======
The program give on stderr two type do message. One message per line.
state
-----
This line is formated as following
## state: <state name> [args]
`<state name>`
can be
-
`failed`
.
`args`
explain why.
-
`lookup`
.
-
`routing_track`
. The
`args`
contain the track id.
status
------
This line is formated as following
## status: <integer>
The status indicate where the algorithm is for the current track routing process
(see
`routing_track`
state message).
The integer is between
`0`
and
`RV_STATUS_SCALE`
(1000). Warning: the status is
always increasing inside a track routing, but not by steps of 1.
stdout
======
Results are given on
`stdout`
. For each track, the output is the following:
begin track <track id>
<point>
...
<point>
end track <track id>
Each point is described as a line with the following formating:
<key>:<value> <key>:<value> ... <key>:<value>
The keys are:
-
`nid`
: the node id
-
`lon`
: the longitude of the node
-
`lat`
: the latitude of the node
-
`elevation`
: the elevation of the node
-
`velocity`
: the instant velocity (in m.s^-1) on this node
-
`distance`
: the distance (in m) since the begining of the track
-
`energy`
: the used energy (in J) since the begining of the track
-
`time`
: the time (in s) since the begining of the track
-
`power`
: the mean power (in W) on the edge between previous node and this one.
-
`walk`
:
`yes`
or
`no`
indicate if we walk from the previous node.
Warning: cumulated values (
`distance`
,
`energy`
, and
`time`
) are reinitalized to
0 at the beginning of each track.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment