lshillman / generation-ship-calculator

A tool for calculating generation ship feasibility, given several user-defined factors.
https://lshillman.github.io/generation-ship-calculator/
0 stars 0 forks source link

As a user, I need to calculate the resources I have access to so that I can see a list of possible candidate worlds. #3

Open lshillman opened 2 years ago

lshillman commented 2 years ago

We're going to collect the GDP of the user's country from the World Bank API. We need to use that amount, the % the user gives us, and the timeframe the user gives us, to calculate the total amount of money we have to work with.

Basically,

GDP percent yearsUntilLaunch

so a GDP of $10,000 with 5% devoted to the project over 50 years would be: 10000 .05 50 = $25,000