Skip to content

Commit

Permalink
Cleaning the code
Browse files Browse the repository at this point in the history
  • Loading branch information
jesusBV20 committed Aug 16, 2022
1 parent 27cad8d commit 9f8a349
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/widgets/map/gvf_trajectories/gvf_traj_sin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void GVF_traj_sin::genVField() {
float bound_area = pow(dx,2) + pow(dy,2); // to scale the arrows

emit DispatcherUi::get()->gvf_defaultFieldSettings(ac_id, bound_area, 25, 25);
xy_mesh = meshGrid(); //4*bound_area TODO: Fix auto scale method
xy_mesh = meshGrid();

foreach (const QPointF &point, xy_mesh) {
double xs = (point.x() - a)*sin(course) - (point.y() - b)*cos(course);
Expand Down
7 changes: 2 additions & 5 deletions src/widgets/map/mapwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1227,11 +1227,8 @@ void MapWidget::onGVF(QString sender, pprzlink::Message msg) {
// GVF_PARAMETRIC
else if (msg.getDefinition().getName() == "GVF_PARAMETRIC") {
QList<float> phi = {0.0}; // Error signals
//float wb;

msg.getField("traj", traj);
//msg.getField("s", direction);
//msg.getField("w", wb);
msg.getField("p", param);
msg.getField("phi", phi);

Expand All @@ -1241,11 +1238,11 @@ void MapWidget::onGVF(QString sender, pprzlink::Message msg) {
gvf_traj = new GVF_traj_trefoil(sender, param, phi, gvf_trajectories_config[sender]);
break;
}
case 1: { // Ellipse 3D (TODO)
case 1: { // Ellipse 3D
gvf_traj = new GVF_traj_3D_ellipse(sender, param, phi, gvf_trajectories_config[sender]);
break;
}
case 2: { // Lissajous 3D (TODO)
case 2: { // Lissajous 3D
gvf_traj = new GVF_traj_3D_lissajous(sender, param, phi, gvf_trajectories_config[sender]);
break;
}
Expand Down

0 comments on commit 9f8a349

Please sign in to comment.