-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AUV error management #9
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Some corrections need to be performed: I commented only one module, the suggestions apply to all.
Brava!
DESERT_Addons/uwauv/Makefile.am
Outdated
|
||
lib_LTLIBRARIES = libuwauv.la | ||
|
||
libuwauv_la_SOURCES = uwauv-module.cc uwauv-module.h uwauverror-module.cc uwauverror-module.h uwauverror-b-module.cc uwauverror-b-module.h uwauv-packet.h uwauvctr-module.cc uwauvctr-module.h uwauvctrer-module.cc uwauvctrer-module.h uwauvctrer-b-module.cc uwauvctrer-b-module.h initlib.cc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is fine, but in principle be aware that only the cc (or cpp) files need to be listed
DESERT_Addons/uwauv/uwauv-module.cc
Outdated
{ | ||
UWSMEPosition p = UWSMEPosition(); | ||
posit=&p; | ||
bind("ackTimeout_", (int*) &ackTimeout); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(int*) or (double*)?
DESERT_Addons/uwauv/uwauv-module.cc
Outdated
, out_file_stats(0) | ||
{ | ||
posit = p; | ||
bind("ackTimeout_", (int*) &ackTimeout); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
int or double?
DESERT_Addons/uwauv/uwauv-module.cc
Outdated
else if(argc == 3){ | ||
if (strcasecmp(argv[1], "setPosition") == 0) { | ||
UWSMEPosition* p = dynamic_cast<UWSMEPosition*> (tcl.lookup(argv[2])); | ||
posit=p; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check if cast succeded with
if(p) {posit = p; ...}
if it did not, print that it failed and return TCL_ERR
if (atof(argv[2]) == 3) { | ||
ackPolicy = ACK_PGBK_OR_TO; | ||
return TCL_OK; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add else {cerr<< "Policy not supported" << std::endl; return TCL_ERR;}
**/ | ||
virtual int command(int argc, const char *const *argv); | ||
|
||
virtual void setdest( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better doxygen (we will make it for smposition as well)
virtual void setdest( | ||
double x_dest, double y_dest, double z_dest, double spead); | ||
|
||
virtual void adddest( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addDest
|
||
virtual void adddest(double x_dest, double y_dest, double z_dest); | ||
|
||
virtual void setAlarm(bool alarm); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alarm for what? Add doxygen
protected: | ||
/** | ||
* Method that updates both the position coordinates | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doxygen @param now ..
|
||
private: | ||
|
||
std::vector<std::vector<double>> waypoints; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doxygen with
variable; /**< description here */
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check the intentation as in the old comment
DESERT_Addons/uwauv/uwauv-module.h
Outdated
#define HDR_UWAUV_MONITORING(p) (hdr_uwAUV_monitoring::access(p)) | ||
#define HDR_UWAUV_CTR(p) (hdr_uwAUV_ctr::access(p)) | ||
|
||
using namespace std; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, remove "using namespace std;"
DESERT_Addons/uwauv/Makefile.am
Outdated
@@ -0,0 +1,51 @@ | |||
# | |||
# Copyright (c) 2007 Regents of the SIGNET lab, University of Padova. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are trying to begin to be consistent on this, so i would put 2023 here. I know we never updated it, but we should start
DESERT_Addons/uwauv/uwauv-module.cc
Outdated
, ackPriority(0) | ||
, ackNotPgbk(0) | ||
, drop_old_waypoints(0) | ||
, log_flag(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would call it sth more consisent, like "log_on_file", this way is more clear for what is this flag (we all know it's a flag)
DESERT_Addons/uwauv/uwauv-module.cc
Outdated
ackPolicy = ACK_PGBK_OR_TO; | ||
return TCL_OK; | ||
}else{ | ||
cerr<<"Plicy not supported" << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cerr<<"Plicy not supported" << std::endl; | |
cerr<<"Policy not supported" << std::endl; |
|
||
void UwAUVModule::recv(Packet* p) { | ||
|
||
hdr_uwAUV_ctr* uwAUVh = hdr_uwAUV_ctr::access(p); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are ALL the packets travelling in the network with this header for sure?
@@ -0,0 +1,188 @@ | |||
import csv | |||
import matplotlib.pyplot as plt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this does not come with a standard python installation i guess. Did you installed a custom pip? if so, better write in a readme, so that someone else know in advance which deps he needs to be installed and how
@@ -0,0 +1,152 @@ | |||
import csv | |||
import matplotlib.pyplot as plt | |||
import tikzplotlib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as before
@@ -0,0 +1,173 @@ | |||
import csv | |||
import matplotlib.pyplot as plt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
@@ -0,0 +1,428 @@ | |||
import matplotlib.pyplot as plt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
@@ -99,3 +99,66 @@ | |||
2361.830056,-99.802673,-48.175367,-15.000000 | |||
2391.136904,-99.950656,-24.868989,-15.000000 | |||
2422.005942,-100.000000,-0.000000,-15.000000 | |||
2622.000000,100.000000,0.000000,-15.000000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@campagn1 is this used in other simulations? is this ok with the other tcl or do we have to do some no-regression on other tcls?
No description provided.