Go Back   Infamous Nissan - Hardbody / Frontier Forums > Model Specific > Hardbody Forum (D21)

Thread Tools Display Modes
Old 05-05-2018, 05:54 AM   #11
4/86 SE-V6 2 tone 4x4 HB
Deerhurst's Avatar
Join Date: Apr 2013
Location: Oregon
Posts: 5,408
Vehicle: 1986.5 Hardbody
Thanks: 734
Thanked 523 Times in 482 Posts

Originally Posted by jp2code View Post
Holy crap! HandsOn and FM, those are certainly some extreme calculators!

The cool thing about these Fiddle sites:
  1. You can make whatever changes you want to the code on the screen. When you exit, it will ask if you want to save your changes. If you answer YES, it will branch off the original code and make a copy based on your changes ...and give you a slightly different URL.
  2. You do not need a compiler to make it run. It should run on the screen.
I'm not always online. I'm more familiar with visual studio though. Used it for a few years writing C++. Simple programe.
1986.5 SE-V6 4X4 D21 Hardbody
Pacesetter Long Tube Headers
Morimoto Mini D2S HID Projectors and Hella 500s
Deerhurst is offline   Reply With Quote
Old 05-11-2018, 11:13 AM   #12
Software Developer
jp2code's Avatar
Join Date: Dec 2011
Location: Longview, TX [USA]
Age: 49
Posts: 9,032
Vehicle: 94 LB 2x4 Manual VG33e
Thanks: 1,347
Thanked 1,138 Times in 1,008 Posts

Some of you have mentioned in another thread that the numbers are off for your vehicles.

Does anyone see what needs to be changed in the calculation?

private const int INCHES_PER_MILE = 63360;
private const int MINUTES_PER_HOUR = 60;
public static double CalculateMPH(int revolutionsPerMinute, double tireHeightInInches, double axleRatio)
  double result = 0;
  if ((0 < revolutionsPerMinute) && (0 < tireHeightInInches) && (0 < axleRatio))
    double tireHeightToMilesAround = Math.PI * tireHeightInInches / INCHES_PER_MILE;
    double revolutionsPerHour = MINUTES_PER_HOUR * revolutionsPerMinute;
    result = tireHeightToMilesAround * revolutionsPerHour / axleRatio;
return result;
Joe (not a mechanic!) Don't have an account? EMAIL ME
Factory Service Manuals: https://www.nicoclub.com/FSM/Hardbody/
Walk-through: Checking Nissan Trouble Codes
1994 VG30E to VG33E with H256 Cams

jp2code is online now   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 01:01 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.