dim GravParam = Length^3 / Time^2; type TransferResult { TransferResult(dv1: Velocity, dv2: Velocity, total_dv: Velocity, tof: Time), } const node r_earth: Length = 6371.0 km; const node gm_earth: GravParam = 3.986004418e5 km^3/s^2; param parking_alt: Length = 200.0 km; param target_alt: Length = 35786.0 km; node r1: Length = @r_earth + @parking_alt; node r2: Length = @r_earth + @target_alt; node a: Length = (@r1 + @r2) / 2.0; node v1: Velocity = sqrt(@gm_earth / @r1); node v2: Velocity = sqrt(@gm_earth / @r2); node dv1: Velocity = sqrt(2.0 * @gm_earth * @r2 / (@r1 * (@r1 + @r2))) - @v1; node dv2: Velocity = @v2 - sqrt(2.0 * @gm_earth * @r1 / (@r2 * (@r1 + @r2))); node transfer: TransferResult = TransferResult( dv1: @dv1, dv2: @dv2, total_dv: @dv1 + @dv2, tof: PI * sqrt(@a ^ 3 / @gm_earth), ); node total_dv: Velocity = @transfer.total_dv; node tof_hours: Time = @transfer.tof -> h;