Ok, I had a look because I would like to generate a report in imperial units.
It seems that the values come from the stats of ODM and then are passed to the OpenSFM report module which is responsible for the “title of the lines/columns” including the unit.
My problem here is that it bothers me to add a parameter and pass it down to the OpenSFM module.
Do you think this would be useful ? Do you think this is the correct way of doing it ?
I think it might be useful for some folks to have the report in imperial units.
To do it “cleanly” I think it needs a major change of how/where we generate the report (you would need to move it out of OpenSfM), generate the report data in JSON and then have WebODM export it to metric/imperial on demand (so generate the PDF on demand). The tricky part are images and figures, OpenSfM generates a few of those, and the previews we generate (for the DEMs) are in metric.
To do it less “cleanly” you would need to add parameters to OpenSfM, add a config to ODM and trickle it down the pipeline (e.g. --report-imperial). I don’t like this one too much since unit conversions should be a post-processing task, not a pipeline task?
Clean option is clearly a too big project for me at this point I think. Even if I agree with the architecture which I understand I am not much python fluent (more a cpp guy). I will need more time to dig into the architecture of ODM in order to understand it more.
The only picture that do not use pixels as unit is the first on on the summary page which represent computed position vs real position if I make no mistake.
And yes for me too if units are not an input parameters of all the calculations everything should be computed in meters (as it is now) and then during a post-processing stage all should be converted if needed.