Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Johan ARCILE
/
VerifCar
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Johan ARCILE
2019-01-08 14:59:06 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f11692582884c57a33877c5adb9dd2001ef920fd
f1169258
1 parent
1fd8b439
Update VerifCar_template_decision_algorithm.xml
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
VerifCar_template_decision_algorithm.xml
VerifCar_template_decision_algorithm.xml
View file @
f116925
...
...
@@ -408,8 +408,14 @@ int time_to_collision(RangeId id1, RangeId id2){
else X_in := 0;
// X_out if faster B
if(vx_a
<
vx_b){
if(((px_b-px_a-C_len)*GranX)/((vx_b-vx_a)*GranV)
<
100) X_out := ((px_b-px_a-C_len)*GranX*scale)/((vx_b-vx_a)*GranV);
else X_out := 100*scale;
if(px_b-px_a-C_len
>
0){
if(((px_b-px_a-C_len)*GranX)/((vx_b-vx_a)*GranV)
<
100) X_out := ((px_b-px_a-C_len)*GranX*scale)/((vx_b-vx_a)*GranV);
else X_out := 100*scale;
}
else{
if(((C_len-(px_b-px_a))*GranX)/((vx_b-vx_a)*GranV)
<
100) X_out := ((C_len-(px_b-px_a))*GranX*scale)/((vx_b-vx_a)*GranV);
else X_out := 100*scale;
}
}
// X_out if equal speed
else{
...
...
Please
register
or
login
to post a comment