Program to convert kts to mph

This is the general tropical discussion area. Anyone can take their shot at predicting a storms path.

Moderator: S2k Moderators

Forum rules

The posts in this forum are NOT official forecasts and should not be used as such. They are just the opinion of the poster and may or may not be backed by sound meteorological data. They are NOT endorsed by any professional institution or STORM2K. For official information, please refer to products from the National Hurricane Center and National Weather Service.

Help Support Storm2K
Message
Author
User avatar
JamesFromMaine2
Category 4
Category 4
Posts: 989
Joined: Tue Jul 19, 2005 1:38 am
Location: Portland Maine USA
Contact:

Program to convert kts to mph

#1 Postby JamesFromMaine2 » Tue Jan 31, 2006 10:53 am

Heres a small simple program I wrote in C++ to convert kts to MPH. When it asks you for windspeed in kts put in the wind speed then press enter and it will tell you the wind speed in MPH. heres the download link http://www.yourfilelink.com/get.php?fid=14855
0 likes   

JonathanBelles
Professional-Met
Professional-Met
Posts: 11430
Age: 35
Joined: Sat Dec 24, 2005 9:00 pm
Location: School: Florida State University (Tallahassee, FL) Home: St. Petersburg, Florida
Contact:

#2 Postby JonathanBelles » Tue Jan 31, 2006 2:49 pm

the link doesnt work
0 likes   

User avatar
angelwing
S2K Supporter
S2K Supporter
Posts: 4462
Age: 64
Joined: Tue Jan 18, 2005 3:06 pm
Location: Kulpsville, PA

#3 Postby angelwing » Tue Jan 31, 2006 3:00 pm

Worked here
0 likes   

User avatar
JamesFromMaine2
Category 4
Category 4
Posts: 989
Joined: Tue Jul 19, 2005 1:38 am
Location: Portland Maine USA
Contact:

#4 Postby JamesFromMaine2 » Tue Jan 31, 2006 3:50 pm

the link worked fine when I tryed it.

Also I am going to be making a more complex program using Java. What are some things you guys would like added to the program? I will be putting the kts to Mph and anything else please let me know!
0 likes   

User avatar
Tampa Bay Hurricane
Category 5
Category 5
Posts: 5597
Age: 37
Joined: Fri Jul 22, 2005 7:54 pm
Location: St. Petersburg, FL

#5 Postby Tampa Bay Hurricane » Tue Jan 31, 2006 4:28 pm

AWESOME I love programming I did C++ a while back
0 likes   

User avatar
JamesFromMaine2
Category 4
Category 4
Posts: 989
Joined: Tue Jul 19, 2005 1:38 am
Location: Portland Maine USA
Contact:

#6 Postby JamesFromMaine2 » Tue Jan 31, 2006 4:49 pm

yeah I am just learning how to program in diffrent languages. I am trying to work up to be able to program PC games mostly MMORPGs. So far I have taught my self html which even though its not a language to develop programs it is still a computer language. then I taught my self Jave script which is another internet language and then I know some python, C, C++, Java, and Lua. but most of them I am still just learning and I don't know them well enough to really do anything with them yet. however I am working on them! lol
0 likes   

User avatar
MGC
S2K Supporter
S2K Supporter
Posts: 5907
Joined: Sun Mar 23, 2003 9:05 pm
Location: Pass Christian MS, or what is left.

#7 Postby MGC » Tue Jan 31, 2006 7:40 pm

Why a program? Simple math yield the solution. KTS X 1.15=MPH
0 likes   

User avatar
WindRunner
Category 5
Category 5
Posts: 5806
Age: 34
Joined: Fri Jul 29, 2005 8:07 pm
Location: Warrenton, VA, but Albany, NY for school
Contact:

#8 Postby WindRunner » Tue Jan 31, 2006 9:11 pm

How about a recon parser? Java could do that fairly easily, and I've actually thought about that several times . . . I might get around to it this summer when I have some time.

And not bad for some basic C++, it's been forever since I used that . . . and now I'm much more proficient with Java anyways.
0 likes   

Scorpion

#9 Postby Scorpion » Tue Jan 31, 2006 9:16 pm

Ive already memorized all the conversions in 5 mph/5 kt intervals. Pretty good idea though for people just getting into it.
0 likes   

User avatar
Hurritrax
S2K Supporter
S2K Supporter
Posts: 37
Joined: Tue Aug 03, 2004 4:27 pm
Location: Edenton, North Carolina
Contact:

#10 Postby Hurritrax » Thu Feb 02, 2006 6:11 pm

How about a millibar to inches converter for barometric pressure?
0 likes   

Coredesat

#11 Postby Coredesat » Thu Feb 02, 2006 7:08 pm

1 mb = .03 inHg

Simply multiply the pressure in mb by .03 to get the pressure in inHg.
0 likes   

Scorpion

#12 Postby Scorpion » Thu Feb 02, 2006 7:11 pm

Wow, I didn't know about the pressure converstion. Makes things alot easier.
0 likes   

User avatar
senorpepr
Military Met/Moderator
Military Met/Moderator
Posts: 12542
Age: 43
Joined: Fri Aug 22, 2003 9:22 pm
Location: Mackenbach, Germany
Contact:

#13 Postby senorpepr » Thu Feb 02, 2006 8:51 pm

Actually... the 1mb = .03" is a bad conversion.

Consider this... 1013.2mb x 0.03" = 30.396"
1013.2 x 0.029529884" = 29.920"

That's a HUGE difference.

I perfer using the latter calculation. Do it enough and you'll memorize the number.
0 likes   

Scorpion

#14 Postby Scorpion » Thu Feb 02, 2006 8:54 pm

Lol there is no way I will ever memorize that. Guess I gotta go back to using the online converter.
0 likes   

User avatar
senorpepr
Military Met/Moderator
Military Met/Moderator
Posts: 12542
Age: 43
Joined: Fri Aug 22, 2003 9:22 pm
Location: Mackenbach, Germany
Contact:

#15 Postby senorpepr » Thu Feb 02, 2006 9:01 pm

Here's another tip of advance. Don't convert at all if you don't need to. Think of speeds in knots or in mph, but not both. Think of temperatures in °C or in °F, but not both. Think of pressure in millibars or in inches of mercury, but not both. That proved very successful while I lived in Europe. When I dealt with American items, I used ounces and used liters for European iteam. While driving, I thought of distances and speeds in kilometers rather than converting to miles.
0 likes   

User avatar
btangy
Professional-Met
Professional-Met
Posts: 758
Joined: Fri Sep 19, 2003 11:06 pm
Location: Boulder, CO
Contact:

#16 Postby btangy » Fri Feb 03, 2006 9:30 pm

I just use Google's calculator to perform unit conversions. Go to Google and search "50knots to mph". It's a beautiful thing.
0 likes   

User avatar
CentralFlGal
S2K Supporter
S2K Supporter
Posts: 573
Joined: Mon May 16, 2005 9:32 pm
Location: Cocoa Beach, FL

Re: Program to convert kts to mph

#17 Postby CentralFlGal » Sat Feb 04, 2006 11:54 am

JamesFromMaine2 wrote:Heres a small simple program I wrote in C++ to convert kts to MPH. When it asks you for windspeed in kts put in the wind speed then press enter and it will tell you the wind speed in MPH. heres the download link http://www.yourfilelink.com/get.php?fid=14855


James, from one budding coder to another - looks great! I recognize and applaud the effort you put into this.

You asked for suggestions on the program, I'd add a space after kts for readability, and "mph" after the answer for the user. Possibly even a description/name of the program to appear in the title bar. I'm all about fluffy perks.

Without access to the source code to see if you attempted error handling, I'd add it to ensure numeric input by the user. I'd also add a module to release the memory and exit from within the program.

Self-taught? This is excellent. I've taken C++, VB and Java courses for my MIS degree, though I'm not sure which is my favorite yet. VB does look purty, uses relatively less typing time with it's happy and friendly GUI, and eventually when I have the time I'll head to the store and pick up some .NET material.

MMORPGs? ::perks up:: We *must* talk... up for a study group? :lol:
0 likes   

Margie

#18 Postby Margie » Sat Feb 04, 2006 12:07 pm

senorpepr wrote:Here's another tip of advance. Don't convert at all if you don't need to. Think of speeds in knots or in mph, but not both. Think of temperatures in °C or in °F, but not both. Think of pressure in millibars or in inches of mercury, but not both. That proved very successful while I lived in Europe. When I dealt with American items, I used ounces and used liters for European iteam. While driving, I thought of distances and speeds in kilometers rather than converting to miles.


Yes that works very well, especially for driving. I have to say though that when I was living in Antwerpen I got to where I was automatically converting in my head between franks (BEF) and guilders and US$ (this was before the euro), even marks, when I visited Germany. But what was funny was, I was converting the marks in my head to BEF, to figure out the cost, not US$!
0 likes   


Return to “Talkin' Tropics”

Who is online

Users browsing this forum: No registered users and 65 guests