Author Topic: Display of both C and F  (Read 4031 times)

senorwx

  • Gentle Breeze
  • **
  • Posts: 27
    • KNHKEENE28
  • Station Details: Davis VantagePro2 - iMac 2.4 GHz Intel Core 2 Duo - 6 GB Memory - OS X v 10.13.6
Display of both C and F
« on: July 15, 2013, 06:34:07 PM »
 I'm in Mexico with local nationals, U.S. and Canadian citizens relying on my site. I'd like to display my WC data with metric and english readings...either both at once, or give the viewer the option to switch between the two.

Any ideas?

 [sweat]

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6686
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Could convert with JavaScript (Re: Display of both C and F)
« Reply #1 on: July 15, 2013, 09:28:55 PM »
Dear SenorWX and WeatherCat fans,

I'm in Mexico with local nationals, U.S. and Canadian citizens relying on my site. I'd like to display my WC data with metric and english readings...either both at once, or give the viewer the option to switch between the two.

I've also suggested this because we have relatives in France who might enjoy knowing what the weather is here in California.  For them, I pointed them to my Weather Underground page which does all that sort of converting for you.  However, I assume that isn't what you want.

I assume this will eventually make it onto Stu's to-do list, but I think demand isn't every high for it, so it might not get implemented very soon.

If you are willing to put some effort into your website, you could instead do the conversions on the website itself using JavaScript.  It isn't that complicated because the math is very elementary.  Alas, I couldn't find any examples on the web and I don't have the time to come up with this right now.  Could someone else come up with a quickie JavaScript example?

Cheers, Edouard  [cheers1]


ELO

  • Gentle Breeze
  • **
  • Posts: 75
    • KCOBRECK14
    • Weather in the Highlands
  • Station Details: Old Davis WMII, Heated Rain Collector, Mac Mini
Re: Display of both C and F
« Reply #2 on: July 16, 2013, 03:10:03 AM »
Another relatively easy solution is to implement the Steel Gauges javascript files and display for your site. They allow users to select either ?F or ?C along with different pressure & wind units for display as well as to easily switch between them. See my site at wx.oshlo.net as one of many examples out there.

Rick
 

senorwx

  • Gentle Breeze
  • **
  • Posts: 27
    • KNHKEENE28
  • Station Details: Davis VantagePro2 - iMac 2.4 GHz Intel Core 2 Duo - 6 GB Memory - OS X v 10.13.6
Re: Display of both C and F
« Reply #3 on: July 17, 2013, 09:57:50 PM »
Thanks! Nor could I find a javascript for this online...but I think I may go with Elo's approach below!

http://athena.trixology.com/Smileys/default/sun_emoticon.png