This first level of this puzzle is in fact pretty easy: you just need to decide which thrust to apply. With 3 you will slightly accelerate and with 4 you will decelerate. If the (absolute) speed is greater than 40 you should decelerate.
How do I find the coordinates of the landing surface from it’s beginning to it’s end?
You don’t need to compute the coordinates of the landing surface for the first level. For the other levels, you need to find two consecutive points with the same height: they are the left and right borders of the landing surface.
long long ago, in the topic far far away, @Florent was looking for some
here we go:
-
liquid oxygene/kerosene fuel pair has flow speed from engine like 3510 m/s, so 1 ton (approximately) landing crane/platform with rover will have acceleration 3.51 m/(s^2) for every kilo of burned propellant/oxidiser mixture, with max acceleration of 14,04 m/(s^2), what is enough for everything i will say further, but can be extended
-
we landed 100 kilometres away from desired landing site - how much fuel will it take to take off, accelerate in desired direction, slow down horizontal speed near target and land with minimal vertical speed? on such small distance we can assume the surface is flat
-
we landed 1000 kilometers away - we can no longer assume that surface is flat on such scale, we need to take curvature into account
-
we landed on other side of planet - we need now not just take off and land, we need to achieve orbital speed, wait until we near desired place, and only then land (including orbit pertrubations from mascons)
-
we need to go home with gathered samples! why not? it is as easy as:
- going to orbit (part 4)
- reaching L1 point of Sun-Mars system
- accelerating towards L2 point of Sun-Earth system
- bracking there
- going to Earth orbit
- landing on Earth (with parachutes, inflatable bumpers, aerodynamical surfaces whatever)
-
how did we get to Mars? all the part 5 in reverse
-
really, why the acceleration is so low? is this task’s lander fuelled with wet firewood?
Appealing, but still lacking zombies… or nazi flying saucers of the dark side of the moon, I’m not narrow minded. But I like the space theme anyway. I’ve discovered the whole Honor Harrington serie not so long ago and that reminds me of all the space battle descriptions where the crew calculates the best course for their waves of missiles. Not realistic I think, but cool as well and, let’s not forget it, make things explode is an objective, not a failure! An asteroid-like multiplayers battle for the next challenge maybe?
If any one can post the fuel remaining on each exercice, it would be nice. Mine are 247, 354, 452, 465 and 580.
interesting
i assume these are data for level 2 puzzle
so my results are 56, 90, 24, 174 and 607
UPD slightly corrected
now my values are 96, 158, 154, 318 and 607
but looks like too low comparing to your result
Thanx for answering !
I work on a new approach and get (much) better values : 329, 359, 496, 516 and 710.
Just 58 l more to save to be first !
i achieved results 242, 282, 444, 507 and 613 - looks much like where you started, but there are also much hardcoding already
Have you improved your score since your post? You are now just before me in the ranking…
Mine: 327, 357, 512, 495, 707 = 2398
Yes, I worked on a new approach and get (much) better values : 329, 359, 496, 516 and 710 = 2410.
I can’t figure out how you get 512 at the third exercice. Congratulations !
Mars Lander puzzle level 1 & 2 are buggy in C++. I didn’t try level 3 yet.
Inputs are complete non-sense!
Here is an output example for MarsLander Level 2 - 2nd test case.
Game information:
Landing in progress...
X=5452m, Y=2733m, HSpeed=-102m/s VSpeed=-7m/s
Fuel=566l, Angle=-22°, Power=4 (4.0m/s2)
Standard Error Stream:
(X,Y) = (574,-22)
HS = 4
VS = 5555
F = 2741
P = -7
R = -105
I have read the values with:
int X;
int Y;
int HS; // the horizontal speed (in m/s), can be negative.
int VS; // the vertical speed (in m/s), can be negative.
int F; // the quantity of remaining fuel in liters.
int R; // the rotation angle in degrees (-90 to 90).
int P; // the thrust power (0 to 4).
cin >> R >> P >> X >> Y >> HS >> VS >> F; cin.ignore();
cerr << "(X,Y) = (" << X << "," << Y << ")" << endl;
cerr << "HS = " << HS << endl;
cerr << "VS = " << VS << endl;
cerr << "F = " << F << endl;
cerr << "P = " << P << endl;
cerr << "R = " << R << endl;
Am I the only one have this problem ?
After going through the whole thread I found out that there are 2 kinds of people on this post
- People who know to code but don’t understand physics.
- People who know physics but don’t understand coding.
“Mars Lander - Fuel optimization” game seems to feed incorrect lines to the program. In test 1 R and P come before X Y and in test 2 X Y is swapped with the speeds other tests are broken too for me, does anybody have this problem too?
Hello,
I thiink there is a problem with the parsing code in javascript :
var inputs = readline().split(); //didn’t work as expected
Must be replace by :
var inputs = readline().split(’ ');
It could be hard to fix for a beginner.
BR.
Same here, cannot get the achievement validated… :-\
Sorry, I had not seen CvxFous’s reply.
I set the angle is always 0 and I increase the engine power.
I calculate the vspeed in step 5 before the start:
a_fall=g-a_power
vspeed_step5 = a_fall_step1-a_fall_step2-a_fall_step3-a_fall_step4
-3.711-2.711-1.711-0.711=-8,844m/s
I start a test and I see:
step | power | vspeed
1 0 0
2 1 -3
3 2 -4
4 3 -5
5 4 -5
why vspeed -5 m/s in step 5?