Internal consistency is an important part of any story. In science fiction and fantasy, this usually means deciding how some fictional technology works. The reader doesn’t have to know all the ins and outs of the magical energies at the wizard’s fingertips, but the writer does, or the story suffers.

In Flying Pirate Ships! this has come to mean a lot of math.  Math the reader will never see. With the map, curved longitude lines were calculated by graphing cosine along latitude. You know, “simple” three dimensional geometry. A crash refresher course needed to make an accurate map.

It’s the physics of fictional things where math gets really interesting.

You can “eyeball it” for the sake of dramatic tension. The story demands that characters are far enough away to be cut off from help, but we’re not ready to kill all these guys, so something fast to rescue them right when it seems most dire. Eyeball method: Dragons are fast enough and magic enough to cross any distance in any needed time frame. Of course they do have to send for help, first. (What is the average airspeed velocity of a note-carrying raven? I guess it depends if it’s Essosan or Westerosi.)

Flight physics is a central part of Flying Pirate Ships! I mean, come on, “flying” is in the title. How do you make a ship fly? What are the limits of that technology? The answers could be anything of course. Society is fundamentally altered by the ability to move people and cargo through the air – and space – so the answers affect everything.

For this story, the answer is gravity. That helped because science has described a lot about how gravity affects things, and almost nothing about why. This is fertile ground for those who want to make up stuff. Central to spaceflight in the 19th Century is a rock which repels gravity, with the force exerted upon it. Hold on to one of these rocks and you feel it push against you. Let it go and it falls up. Acceleration due to gravity near the surface of Earth is 32 feet per second change per second of acceleration. How fast? 32 x time. How far? 16 x time squared.

But here it gets nasty.

As you travel through space, the gravity you left becomes weaker – acceleration from gravity “slows”. There are formulas for this, but there aren’t formulas for a space engine that works on this principle. How fast are you traveling? How long did it take you to get to this point? Well, falling from orbit you get a curve where… Sure, but what about starting at maximum acceleration and decreasing? No one has done it; no one would have a reason to bother – it is fictional technology.

Borrowing a page from Andy Weir (The Martian). I decided the best way to figure it out was to make a computer tell me…

$vel=start velocity (e.g. 0 m/s)
$tim=start time (e.g. 0 s)
$dist=starting distance (e.g. 0 m)
$maxd=distance to engine off (e.g. 60,500,000 m)
$incr=increment / fidelity (e.g. 30,000m)
$accel=base Acceleration due to gravity (e.g. 9.8 m/s²)
$rad=radius of gravity well (e.g. 6,371,000 m)

for ($i=$dist; $i -le $maxd; $i=$i+$incr) { $tim=$tim + ( ( (-1*$vel) + [math]::sqrt( [math]::pow($vel,2) + 2*($accel * [math]::pow( ($rad / ($rad + $i)) , 2))*$incr ) ) / ($accel * [math]::pow( ($rad / ($rad + $i)) , 2)) ) ;; $vel=$vel+( ( ( (-1*$vel) + [math]::sqrt( [math]::pow($vel,2) + 2*($accel * [math]::pow( ($rad / ($rad + $i)) , 2))*$incr ) ) / ($accel * [math]::pow( ($rad / ($rad + $i)) , 2)) ) * ($accel * [math]::pow( ($rad / ($rad + $i)) , 2)) ) } ;;write-host $tim $vel