# The Sword and Laser discussion

This topic is about The Martian
112 views
2014 Reads > TM: calculating the location of the spaceship

message 1: by (new)

If a spaceship is constantly accelerating, isn't finding its location a simple Calc I formula? Why did Andy Weir have to write a program to simulate it?

message 2: by (new)

Go look at the Google Author Talk video. Near the beginning, he shows the software he created. I think it's way cool.

message 3: by (last edited May 05, 2014 02:05PM) (new)

Yep, I saw that. I think the formula to calculate the location is

s(t) = (1/2)a_0t^2 + v_0t + s_0

message 4: by (new)

Yeah, after I posted I was thinking it doesn't answer your question, which is why is it hard?

I'm thinking that the simulator helps with the problem of finding the *best* orbit when Earth, Mars, and Hermes are all moving in different directions and with different velocities or accelerations. That is, if you know you want to intersect Mars when it's at point A, it's an easy calculation; if you want to know when the best point to intersect Mars is, stay there for a month, and come back to earth with a minimum of fuel expenditure, it's more complex.

message 5: by (new)

As I recall from physics and astronomy class. A simulation works best because you have to calculate where the target will be in the future.

If you want to fly from earth to mars you need to know how fast the ship can travel and then determine the optimal point in earths orbit when that ship will intersect with mars during its orbit in the shortest possible time.

According to google this happens at 24 months intervals.

message 6: by (new)

Alexander wrote: "As I recall from physics and astronomy class. A simulation works best because you have to calculate where the target will be in the future.

If you want to fly from earth to mars you need to know..."

Serendi wrote: "Yeah, after I posted I was thinking it doesn't answer your question, which is why is it hard?

I'm thinking that the simulator helps with the problem of finding the *best* orbit when Earth, Mars, ..."

Yeah, this isn't all that complex of a calculation. The complex parts all have to do with making the ship.

message 7: by (new)

That formula only works with constant acceleration, when going around a planet his acceleration isn't constant because the combination of the acceleration due to gravity and due to the spaceship's ion drive (i think that's what it was called) constantly changes.

message 8: by (new)

And don't forget that you can't just consider the ship's acceleration as only from the engines as every other planet in our system is affecting it too.

message 9: by (new)

"And don't forget that you can't just consider the ship's acceleration as only from the engines as every other planet in our system is affecting it too. "

And then if you really wanted to be anal about it, as the ship gets faster there are relativistic effects to consider as well. Really small until one gets REALLY fast, but if precision is what you're going for... ;)

message 10: by (last edited May 07, 2014 09:16AM) (new)

Really, these are equations college freshmen and sophomores are expected to do in calculus class. I'm not saying everyone can do them (I belive the freshman failure/drop the course percentage is somthing over 50% for calculus) but it's not rocket science. Well, it IS rocket science, just not real advanced rocket science. :)

message 11: by (new)

LOL I was just going to post that this is the one time it's some of rocket science.

That said, I'm still not sure why he felt a need/needed to create his own program to do it. There are any number of commercial products that do this, many with free trials...though most industry people I see (at least in my sector) seem to homebrew their own perfected maneuver strategies to optimize things and plug into the commercial software. But I guess good on him for doing it?

message 12: by (new)

terpkristin wrote: I'm still not sure why he felt a need/needed to create his own program to do it.

Well, if I have an interesting idea for a program, I just want to write it, to see if I can. Maybe Andy Weir feels the same way.