| View previous topic :: View next topic |
| Author |
Message |
nayot
Joined: 17 Dec 2010 Posts: 2
|
Posted: Sun Apr 24, 2011 5:26 pm Post subject: Any way to get altitude in feet? |
|
|
Hi
I'm very new but enthusiastic to TrekBuddy. I'm currently using BB Bold Theme for Paramotoring. I need the altitude displayed in 'feet' not 'meters'. Is there anyway I can modify CMS to fit that? Or anyway I can use HECL to perform unit conversion?
Many thanks |
|
| Back to top |
|
 |
thomast
Joined: 16 Jan 2009 Posts: 101
|
Posted: Tue Apr 26, 2011 8:26 am Post subject: |
|
|
have a look at this theme:
http://www.trekbuddy.net/forum/viewtopic.php?t=3177
in the top right is altitude in feet.
Just add some lines in youre hecl script:
at the begin define a global variable:
var air::altft 0
in the "onLocationUpdated" proc add this comand:
set air::altft [round [* $cms::alt 3.28084]]
in the onTrackingStart proc add:
set air::altft 0
now you can use the new variable inside youre xml file eg:
<area x="170" y="3" w="60" h="16" font="smurf_digi_sm" align="right">
<value>{$air::altft}</value>
</area>
Thomas |
|
| Back to top |
|
 |
kruch Site Admin
Joined: 02 Jul 2006 Posts: 5096
|
Posted: Tue Apr 26, 2011 8:29 am Post subject: |
|
|
You can also use imperial units
| Code: |
<cms ...
<units system="imperial"/>
... |
|
|
| Back to top |
|
 |
nayot
Joined: 17 Dec 2010 Posts: 2
|
Posted: Wed Apr 27, 2011 3:53 pm Post subject: |
|
|
| Vow! Both methods work. Thanks! |
|
| Back to top |
|
 |
scimitar
Joined: 31 Jul 2008 Posts: 2
|
Posted: Wed Jul 27, 2011 5:29 pm Post subject: |
|
|
I have been puzzling over this as well since the CMS variables change units when the Trekbuddy units setting is changed but within HECL the units are always metric. I would rather not have to code the units conversion if possible so the "units system="imperial"" code seems ideal - however Ihave put this into the XML and nothing seems to change. Can anybody help me?
Thanks,
Dave |
|
| Back to top |
|
 |
kruch Site Admin
Joined: 02 Jul 2006 Posts: 5096
|
Posted: Thu Jul 28, 2011 6:02 pm Post subject: |
|
|
| Hi, this is a bug and will be fixed in the next (1.0.17) version. |
|
| Back to top |
|
 |
|