Speed Calculator v1.2

new.PNG

Hi guys ;)

 

Back again with something cool for you... so here it is...

This is a program to calculate:

  • speed - knowing your wheel diameter and rpm
  • wheel diameter - knowing the speed and rpm,
  • RPM - knowing the speed and wheel diameter.
  • as a disadvantage is that at the moment he can work only with millimeters :(
  • now working with both mm and inches

 

Disadvantages

  • usese a little bit of memory
  • unfortunatly as coded in Visual c++ with CLR type, it needs .NET Frameworks 3.5 so if you got error mesage, download .NET Frameworks

Why is this so good?

  • Because you don't have to mess up with formulas and nerves calculating theese things when a simple tiny program can do it for you.
  • Because I made this for you and it's absolutly FREE to download
  • Easy to use
  • Tiny program (1,6 Mb)

 

What you should do for me because I made this program?

  • Nothing. I'm happy that I have time to help you, maybe all I want from you is to help me too when I got problems ;)

 

Where to download?

  • Just ask me and i'll send it via email
  • Click here and you are ready to download.

 

Updates:

  • Added a menu
  • Added check possibility of calculating inches and millimeters...
  • BugFIX: Added avoidance of double check... (both mm and inches were checked but the program didn't cared)

Nice! Thanks :slight_smile:

Nice! Thanks :slight_smile:

updated

hi… just updated… working with millimeters and inches too :wink:

any way of getting this to

any way of getting this to work on linux? I have Ubuntu 9.10 if its help.

Maybe you can try Wine. With

Maybe you can try Wine. With the right libs I think it would work…or if there was a port to java, that would be cross platform…

Hi… As see it was compiled

Hi… As see it was compiled on Visual environment… Maybe it will work with Wine but you will need .NET Frameworks 2.0 which is a Windows Platform based add-on. That all that I can say… I’m not a cross platform professional…

Mono

maybe try out with Mono

question…

Could you open up, as open source,? Maybe I could port it to Mac and Linux…

yes I could but its Visual

yes I could but its Visual C++ 2008 on .NET application platform :slight_smile: so btw

 

the main code here:

 

#pragma endregion
    private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e)
             {
                 MessageBox::Show(“Speed Solver v1.0\nBuilt: 06.May.2010\nAuthor: Nagy István\nUniversity of Oradea.\ncontact: [email protected]”,“About”);
             }

private: System::Void exitToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e)
         {
              Windows::Forms::DialogResult answer;

                answer = MessageBox::Show(“Are you sure?”, “Exit…”,
                                            MessageBoxButtons::YesNo,
                                            MessageBoxIcon::Question,
                                            MessageBoxDefaultButton::Button1 );

            if( answer== Windows::Forms::DialogResult::Yes )
                this->Close();
         }
private: System::Void howToUseToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e)
         {
             w2->ShowDialog(this);
         }
private: System::Void abToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e)
         {
             w3->ShowDialog(this);
         }
private: System::Void releaseNotesToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e)
         {
             w1->ShowDialog(this);
         }
private: System::Void toolStripMenuItem2_Click(System::Object^  sender, System::EventArgs^  e)
         {
             this->Opacity=1;
             toolStripMenuItem2->Checked=true;
             toolStripMenuItem3->Checked=false;
             toolStripMenuItem4->Checked=false;
             toolStripMenuItem5->Checked=false;
             toolStripMenuItem6->Checked=false;
             toolStripMenuItem7->Checked=false;
         }
private: System::Void toolStripMenuItem3_Click(System::Object^  sender, System::EventArgs^  e)
         {
             this->Opacity=0.90;
             toolStripMenuItem2->Checked=false;
             toolStripMenuItem3->Checked=true;
             toolStripMenuItem4->Checked=false;
             toolStripMenuItem5->Checked=false;
             toolStripMenuItem6->Checked=false;
             toolStripMenuItem7->Checked=false;
         }
private: System::Void toolStripMenuItem4_Click(System::Object^  sender, System::EventArgs^  e)
         {
             this->Opacity=0.80;
             toolStripMenuItem2->Checked=false;
             toolStripMenuItem3->Checked=false;
             toolStripMenuItem4->Checked=true;
             toolStripMenuItem5->Checked=false;
             toolStripMenuItem6->Checked=false;
             toolStripMenuItem7->Checked=false;
         }
private: System::Void toolStripMenuItem5_Click(System::Object^  sender, System::EventArgs^  e)
         {
             this->Opacity=0.70;
             toolStripMenuItem2->Checked=false;
             toolStripMenuItem3->Checked=false;
             toolStripMenuItem4->Checked=false;
             toolStripMenuItem5->Checked=true;
             toolStripMenuItem6->Checked=false;
             toolStripMenuItem7->Checked=false;
         }
private: System::Void toolStripMenuItem6_Click(System::Object^  sender, System::EventArgs^  e)
         {
             this->Opacity=0.50;
             toolStripMenuItem2->Checked=false;
             toolStripMenuItem3->Checked=false;
             toolStripMenuItem4->Checked=false;
             toolStripMenuItem5->Checked=false;
             toolStripMenuItem6->Checked=true;
             toolStripMenuItem7->Checked=false;
         }
private: System::Void toolStripMenuItem7_Click(System::Object^  sender, System::EventArgs^  e)
         {
             this->Opacity=0.30;
             toolStripMenuItem2->Checked=false;
             toolStripMenuItem3->Checked=false;
             toolStripMenuItem4->Checked=false;
             toolStripMenuItem5->Checked=false;
             toolStripMenuItem6->Checked=false;
             toolStripMenuItem7->Checked=true;
         }
private: System::Void whatsThisToolStripMenuItem1_Click(System::Object^  sender, System::EventArgs^  e)
         {
             w4->ShowDialog(this);
         }

private: System::Void toolStripButton1_Click(System::Object^  sender, System::EventArgs^  e)
         {
             w2->ShowDialog(this);
         }
private: System::Void toolStripButton2_Click(System::Object^  sender, System::EventArgs^  e)
         {
             Windows::Forms::DialogResult answer;
             answer = MessageBox::Show(“Are you sure?”, “Exit…”,
                                            MessageBoxButtons::YesNo,
                                            MessageBoxIcon::Question,
                                            MessageBoxDefaultButton::Button1 );
             if( answer== Windows::Forms::DialogResult::Yes )
                this->Close();
         }
private: System::Void toolStripButton3_Click(System::Object^  sender, System::EventArgs^  e)
         {
             w3->ShowDialog(this);
         }
private: System::Void whatsThisToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e)
         {

         }

private: System::Void checkBox1_CheckedChanged(System::Object^  sender, System::EventArgs^  e)
         {
             if(checkBox1->Checked)
                 if(checkBox2->Checked==false)
                 {
                 label2->Text=“Vehicle speed (cm/s)”;
                 label4->Text=“Wheel diameter (mm)”;
                 textBox1->Clear();
                 textBox2->Clear();
                 textBox3->Clear();
                 }
                 else
                 {
                 checkBox2->Checked=false;
                 label2->Text=“Vehicle speed (cm/s)”;
                 label4->Text=“Wheel diameter (mm)”;
                 textBox1->Clear();
                 textBox2->Clear();
                 textBox3->Clear();
                 }
             else
             {
                 checkBox1->Checked=false;
                 label2->Text=“Vehicle speed”;
                 label4->Text=“Wheel diameter”;
                 textBox1->Clear();
                 textBox2->Clear();
                 textBox3->Clear();
             }
         }

private: System::Void checkBox2_CheckedChanged(System::Object^  sender, System::EventArgs^  e)
         {
             if(checkBox2->Checked)
                 if(checkBox1->Checked==false)
                 {
                 label2->Text=“Vehicle speed (in/s)”;
                 label4->Text=“Wheel diameter (in)”;
                 textBox1->Clear();
                 textBox2->Clear();
                 textBox3->Clear();
                 }
                 else
                 {
                 checkBox1->Checked=false;
                 label2->Text=“Vehicle speed (in/s)”;
                 label4->Text=“Wheel diameter (in)”;
                 textBox1->Clear();
                 textBox2->Clear();
                 textBox3->Clear();
                 }
             else
                 {
                 checkBox2->Checked=false;
                 label2->Text=“Vehicle speed”;
                 label4->Text=“Wheel diameter”;
                 textBox1->Clear();
                 textBox2->Clear();
                 textBox3->Clear();
                 }
         }

private: System::Void radioButton3_CheckedChanged(System::Object^  sender, System::EventArgs^  e)
         {
             if(radioButton3->Checked)
             {
                 textBox1->BackColor=Color::LightGray;
                 textBox1->ReadOnly=true;
                 textBox1->BorderStyle=System::Windows::Forms::BorderStyle::FixedSingle;
                 textBox2->BackColor=Color::White;
                 textBox2->ReadOnly=false;
                 textBox2->BorderStyle=System::Windows::Forms::BorderStyle::Fixed3D;
                 textBox3->BackColor=Color::White;
                 textBox3->ReadOnly=false;
                 textBox3->BorderStyle=System::Windows::Forms::BorderStyle::Fixed3D;
                 textBox1->Clear();
                 textBox2->Clear();
                 textBox3->Clear();

             }
         }
private: System::Void radioButton4_CheckedChanged(System::Object^  sender, System::EventArgs^  e)
         {
             if(radioButton4->Checked)
             {
                 textBox2->BackColor=Color::LightGray;
                 textBox2->ReadOnly=true;
                 textBox2->BorderStyle=System::Windows::Forms::BorderStyle::FixedSingle;
                 textBox1->BackColor=Color::White;
                 textBox1->ReadOnly=false;
                 textBox1->BorderStyle=System::Windows::Forms::BorderStyle::Fixed3D;
                 textBox3->BackColor=Color::White;
                 textBox3->ReadOnly=false;
                 textBox3->BorderStyle=System::Windows::Forms::BorderStyle::Fixed3D;
                 textBox1->Clear();
                 textBox2->Clear();
                 textBox3->Clear();
             }
         }
private: System::Void radioButton5_CheckedChanged(System::Object^  sender, System::EventArgs^  e)
         {
             if(radioButton5->Checked)
             {
                 textBox3->BackColor=Color::LightGray;
                 textBox3->ReadOnly=true;
                 textBox3->BorderStyle=System::Windows::Forms::BorderStyle::FixedSingle;
                 textBox1->BackColor=Color::White;
                 textBox1->ReadOnly=false;
                 textBox1->BorderStyle=System::Windows::Forms::BorderStyle::Fixed3D;
                 textBox2->BackColor=Color::White;
                 textBox2->ReadOnly=false;
                 textBox2->BorderStyle=System::Windows::Forms::BorderStyle::Fixed3D;
                 textBox1->Clear();
                 textBox2->Clear();
                 textBox3->Clear();
             }
         }
private: System::Void button2_Click(System::Object^  sender, System::EventArgs^  e)
         {
            double speed,rpm,dia;
            float pi;
            String^ msg;
            pi=3,1416;
             if(checkBox1->Checked==false&&checkBox2->Checked==false)
                 MessageBox::Show(“Please select a measure unit!”, “Warning!”);
             else
             if(radioButton3->Checked==false&&radioButton4->Checked==false&&radioButton5->Checked==false)
                 MessageBox::Show(“Please select what you want to resolve!”, “Warning!”);
             else

            if(checkBox1->Checked)
            {
                if(radioButton3->Checked)
            {
                Double::TryParse(textBox2->Text,rpm);
                Double::TryParse(textBox3->Text,dia);
                speed=(rpm*(diapi)/60)/10;
                msg=Convert::ToString(speed);
                textBox1->Text=msg;
            }
            else
                if(radioButton4->Checked)
                {
                    Double::TryParse(textBox1->Text,speed);
                    Double::TryParse(textBox3->Text,dia);
                    rpm=((60
speed10)/(diapi));
                    msg=Convert::ToString(rpm);
                    textBox2->Text=msg;
                }
                else
                    if(radioButton5->Checked)
                    {
                        Double::TryParse(textBox1->Text,speed);
                        Double::TryParse(textBox2->Text,rpm);
                        dia=((60speed10)/rpm/pi);
                        msg=Convert::ToString(dia);
                        textBox3->Text=msg;
                    }
            }
            else
                if(checkBox2->Checked)
                {
                    if(radioButton3->Checked)
            {
                Double::TryParse(textBox2->Text,rpm);
                Double::TryParse(textBox3->Text,dia);
                speed=(rpm*(diapi)/60);
                msg=Convert::ToString(speed);
                textBox1->Text=msg;
            }
            else
                if(radioButton4->Checked)
                {
                    Double::TryParse(textBox1->Text,speed);
                    Double::TryParse(textBox3->Text,dia);
                    rpm=((60
speed)/(diapi));
                    msg=Convert::ToString(rpm);
                    textBox2->Text=msg;
                }
                else
                    if(radioButton5->Checked)
                    {
                        Double::TryParse(textBox1->Text,speed);
                        Double::TryParse(textBox2->Text,rpm);
                        dia=((60
speed)/rpm/pi);
                        msg=Convert::ToString(dia);
                        textBox3->Text=msg;
                    }
                }
         }
};
}


ok… RSC v1.3

Good. I´ve finished it. Here are the new versions for:

Windows XP,2000,Vista
MacOSX (ppc / intel)
Gnu/Linux GTK+2

https://secure.filesanywhere.com/fs/v.aspx?v=8972678b5b6375b09ea7

nice :smiley: huge drop in size

nice :smiley: huge drop in size but there are some bugs :slight_smile: in the Win version of course… :slight_smile: I was developing this through a university semester :slight_smile: I suggest keep a track on this…

bugs:

changing in from cm to mm - take a note on my code, how is that functioning and how is yours

ohm, when changing from speed, rpm and wheel diam, when swhitching to wheel diameter a curious -1.#IND appeard (or somthing like this)

suuggestion is that making the visual elements as was at me is goog I think :slight_smile:

 

Maybe if you want and help me you can help me with developping a new function to this, the gear ratio

Correct

I noted a few bugs, working on that. The same in Linux, I´m not sure why the function reacts strange in win and Linux… re-writing the code…

can you reupload the code

can you reupload the code please???

my code is upper… if you

my code is upper… if you need spacebird’s code… than ask him on prv pls :smiley: