Avamander / arducam-osd

Automatically exported from code.google.com/p/arducam-osd
1 stars 0 forks source link

show decimals like 0.6m for the altitude. #75

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This is enhancement suggestion:
Is it possible to show decimals like 0.6m for altitude?
For all flying multicopters alt above the ground is critical. Most of flight 
controllers are using MS5611 pressure sensor with 0.1m resolution. It will be 
great to see decimals of altitude if it is, lets say less then 10m above the 
ground level (home altitude). This range and decimal option can be configurable.

Original issue reported on code.google.com by i...@koronker.ru on 22 Oct 2013 at 12:54

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
To enable decimals in alt to be shown <10m the following changes in code need 
to be done: in OSD_Panels.ino line 429 
    osd.printf("%c%5.0f%c",0xE7, (double)((osd_alt - osd_home_alt) * converth), high);
should be changed to 
//    if Altitude closer to home/ground then 10 meters show decimal in home 
altitude
    if (abs(osd_alt - osd_home_alt) < 10 )  { osd.printf("%c%5.1f%c",0xE7, (double)((osd_alt - osd_home_alt) * converth), high);}
        else  { osd.printf("%c%5.0f%c",0xE7, (double)((osd_alt - osd_home_alt) * converth), high);}

Please include it into next version.

Original comment by i...@koronker.ru on 24 Oct 2013 at 2:46