Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @author Jake
- */
- public class Jumpcalc {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- // Figuring out the jerk.
- double jerk = 1/1800.0; //average jerk
- double acceleration = 10; //starting acceleration
- double velocity = 0; //we start at a standstill
- double position = 0; //on the surface of the earth
- double time = 0; //time from drop
- while(position < 8800000){ //number of meters to earth's core (roughly)
- System.out.println(position);
- acceleration -= jerk;
- velocity += acceleration;
- position += velocity;
- time++;
- }
- System.out.println(acceleration);
- System.out.println(velocity);
- System.out.println(position);
- System.out.println(time);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement