Skip to content

Commit

Permalink
hover first version
Browse files Browse the repository at this point in the history
  • Loading branch information
SamH1608 committed Jun 9, 2021
1 parent 67c17b1 commit 5918327
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions app/src/main/java/src/land/LandingController.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package src.land;

import src.peng.Vector2d;
import src.univ.CelestialBody;

public class LandingController {

public LandingController() {

}
public void thrustAt(LanderSettings setting, CelestialBody target, double height, Vector2d thrust) {
double probeHeight = setting.probeCurrentPosition.getY();
double targetHeight = target.location.getY();
double currentHeight = probeHeight - targetHeight;
if (currentHeight == height) {
setting.setProbeVelocity(setting.probeCurrentVelocity.add(thrust));
}
}
}

0 comments on commit 5918327

Please sign in to comment.