icon TrekBuddy
www.trekbuddy.net
Outdoor companion.
  • bluetooth / serial / internal GPS, simulator
  • offline raster maps (common grids and projections)
  • smart GPX / raw NMEA logs
  • waypoints and simple navigation
  • ... and more
  • MIDP and Symbian phones
  • Blackberry
  • Android
  • Windows Mobile 5.x/6.x
  • Windows Phone coming
Visit our wiki to see all features, guides and howtos. Project tracker.

Partners:    (Polish/Polski)(Polski) Compass mapy      (Polish/Polski)(Polski) Galileos mapy      (Polish/Polski)(Polski) CartoMedia      (Czech/Èesky)(Èesky) Eaglesoft trasy      (Polish/Polski)(Polski) ExpressMap     

 FAQFAQ   SearchSearch   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Any way to get altitude in feet?

 
Post new topic   Reply to topic    TrekBuddy Forum Index -> Themes
View previous topic :: View next topic  
Author Message
nayot



Joined: 17 Dec 2010
Posts: 2

PostPosted: Sun Apr 24, 2011 5:26 pm    Post subject: Any way to get altitude in feet? Reply with quote

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
View user's profile Send private message
thomast



Joined: 16 Jan 2009
Posts: 101

PostPosted: Tue Apr 26, 2011 8:26 am    Post subject: Reply with quote

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
View user's profile Send private message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5088

PostPosted: Tue Apr 26, 2011 8:29 am    Post subject: Reply with quote

You can also use imperial units

Code:
<cms ...
   <units system="imperial"/>
...
Back to top
View user's profile Send private message
nayot



Joined: 17 Dec 2010
Posts: 2

PostPosted: Wed Apr 27, 2011 3:53 pm    Post subject: Reply with quote

Vow! Both methods work. Thanks!
Back to top
View user's profile Send private message
scimitar



Joined: 31 Jul 2008
Posts: 2

PostPosted: Wed Jul 27, 2011 5:29 pm    Post subject: Reply with quote

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
View user's profile Send private message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5088

PostPosted: Thu Jul 28, 2011 6:02 pm    Post subject: Reply with quote

Hi, this is a bug and will be fixed in the next (1.0.17) version.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    TrekBuddy Forum Index -> Themes All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group