I know there have been several threads around this topic, yet I have not seen a proposal how to implement a calculator in SkyDemon without putting the burden on SkyDemon to creating and maintaining the data. So I would want to make a practical proposal for implementation:
First of all, no matter if the data is given as a table or graph, as far as I have seen the calculation follows alway the same logic:
1) Determine in dependency of weight, temperature and pressure altitude a normal distance for dry even asphalt runway without wind (typically also for distance over obstacle, some exceptions like Aquilla though)
2) Apply correction factors for wind or use as table for that (mostly this correction is fairly linear)
3) Apply correction factors for grass, wet, snow, slope…
4) If not given in 1) use a graph to determine the distance over obstacle based on the ground roll distance (only seen that in the Aquilla so far though)
In order to keep the implementation simple I would provide a possibility to create 2 tables for the user:
1) Ground roll distance: you can set as many values you like in dependence on weight, pressure altitude and temperature
2) Distance over obstacle: same as 1) - if you happen to have an Aquilla just read out and enter the values based on no wind
3) Linear correction factors, the user can set for wind, grass, wet, etc.
This is a little bit tedious but for the user it is just reading out values from the graph and entering it into a table - this has do be done anyway if you do the calculation with the POH. However you could create a database for that for the community to share this tables.
The implementation in SkyDemon than is fairly straightforward. You incorporate a linear Nd interpolation algorithm - should be readily available as libraries. Then you calculate the pressure altitude, weight and temperature to do the interpolation (make sure to check we are not outside the given values). After that you apply the correction factors and it’s done. As long as the correction factors are implemented linear, this method should work for most aircraft. The complication is if e.g. any of the correction factor like wind is non-linear but I have rarely seen that so far. However, you should always keep some safety margin anyway, as this e.g. the wind is not constant, etc. So I don‘t see that as an issue.
A proposal for the user interface: In the route info section, where you see fuel, mass, etc. you add a row at the bottom (which can be enabled by an option so it‘s hidden for people who don‘t use it). There you show a takeoff distance row, with a select runway button. If you click on it you open a dialog, to select the runway, confirm the factors (like wet etc.) and select a nearest meter from a drop-down list. Then the dialog closes and you see instead of the button the RW selected, the wind, takeoff distance ground roll and over obstacle as well as the runway length. If you click on it again you can change the values for recalculation.
What do you guys think about this? When enabling this option you could also incorporate a pop-up dialogue that warns the user to be aware that it is the responsibility of the pilot to make sure the calculation of SkyDemon is compatible with the POH and needs to be verified before use. If for some special cases this logic does not work you can not use this option. I used to do some SW programming myself. Although I am not an expert I do think that the effort is limited, if you take the approach I outlined above.
Happy to further engage in this topic. I would love to see that feature implemented one day so I can delete my various excel files