Made HorseGrade into Mobil App

HorseGrade

Horse Grade is a app which compares winning time against track record and grades performance. The closest to 100% or greater the better the performance. You can view source and project at http://jtltgl.github.com/Grade/. Click Here Here are example data to try out app.

ORB Race 12 PIMLICO for 1 1/4 mile

Win = 202.89(convert 2:0289 equals 202.89)

Loss = (leave this blank if horse wins race)

Record = 201.4

Press Calculate

Horse Grade is 99.27

note: Track records can be found on Web

OXBOW Race 12 PIMLICO for 1 1/4 mile

Win = 202.89

Loss = 9.5 (convert 9½ equals 9.5)

Record = 201.4

Press Calculate

Horse Grade is 98.35

HorseGrade

Grade

 

For fun I made a horse Grade Calculator which will compare track record against horse time and grade the performance. The closest to track record the better performance. Track records  like this from  Churchill Downs  can be found  by searching Web.

Churchill Downs Track Records
DISTANCE	HORSE			AGE	WGT.	TIME	DATE
4 1/2 Fur.	Notonthesamepage	2	118	:50.12	April 30, 2008
5 Fur.		Hot Dixie Chick 	2 	118	:56.48	June 13, 2009
5 1/2 Fur.	Cashier's Dream		2	118	1:02.52	July 7, 2001
6 Fur.		Indian Chant		4	120	1:07.55	July 8, 2007
6 1/2 Fur.	Love At Noon		3	121	1:14.34	May 5, 2001
7 Fur.		Groupie Doll		4	123	1:20.44	May 5, 2012
7 1/2 Fur.	Greater Good		4	120	1:27.97	July 3, 2006
1 Mile		Infrattini		4	121	1:33.31	Nov. 22, 2012
1 1/16 Miles	Successful Dan		6	118	1:41.04	May 4, 2012
1 1/8 Miles	Victory Gallop		4	120	1:47.28	June 12, 1999
1 3/16 Miles	Tritap			3	118	1:58.12	Nov. 17, 2012
1 1/4 Miles	Secretariat		3	126	1:59.40	May 5, 1973
1 1/2 Miles	A Storm Is Brewing	4	112	2:32.02	June 17, 2001
1 5/8 Miles	Tupolev			5	112	2:49.40	July 23, 1983
1 3/4 Miles	Eldaafer		5	126	2:59.62	Nov. 5, 2010
2 Miles		Libertarian		4	113	3:22.26	Nov. 28, 1998

Matt Winn Turf Course
DISTANCE	HORSE			AGE	WGT.	TIME	DATE
5 Fur.		Silver Timber		7	124	:55.45	April 30, 2010
1 Mile		Jaggery John		4	113	1:33.78	July 4, 1995
1 1/16 Miles	Wise River		6	120	1:39.83	April 26, 2009
1 1/8 Miles	Lure			4	123	1:46.34	April 30, 1993
1 3/8 Miles	Snake Eyes		7	123	2:13.00	May 22, 1997
1 1/2 Miles	Tikkanen		3	122	2:26.50	Nov. 5, 1994

To use calculator just enter the winning time, loss length and track record for the distance of race. Please convert loss length to decimal format so 5 ½ will equal 5.50. After all data filled in  hit Calculate and it will grade the performance. I used this in the recent Kentucky Derby but no luck. On most racing forms time is written like 1:10²³, please enter time without colon and add decimal point for superscript fractions given so example is written like 110.23. One more reminder if the horse wins don’t  enter any length loss.

JSCalc Calculator

JSCalc

JSCalc is a calculator which has all the math functions of JavaScript. Just enter a formula using Javascript  math functions format. So Math.sqrt(16) will returns square root of 16. There are shortcuts for all  function without entering Math.blah use lowercase object name, example type “sqrt ” (note: you need space without quotes) . Once you enter the lowercase object name with a space it will be replaced with Math.object_name. Enjoy how simple just entering a formula, making this a easy and a very powerful calculator. The picture shows the formula for volume of a cylindrical canister with radius 7 cm and height 12 cm. You enter the formula (Math.PI.toFixed(3)*Math.pow(7,2)*12).toFixed(2) and press Calculate, don’t forget brackets.

Solution:

Image2616

 

 

 

So, the volume of the canister is 1847.50 cm. You can find this example at.Click Here

Notes :

var x = Math.PI; // Returns PI = (3.14159265358979)
var y = Math.sqrt(16); // Returns the square root of 16 = (4)
Instead of typing Math.blah use lowercase property plus a space name ex. "e " equals Math.E (approx. 2.718)
Declare variable with var and separate your variables by a semicolon ex. var x = 10;var y = 5;x*y

Math Object Properties
Property			Description
E			Returns Euler's number (approx. 2.718)
LN2			Returns the natural logarithm of 2 (approx. 0.693)
LN10			Returns the natural logarithm of 10 (approx. 2.302)
LOG2E			Returns the base-2 logarithm of E (approx. 1.442)
LOG10E			Returns the base-10 logarithm of E (approx. 0.434)
PI			Returns PI (approx. 3.14)
SQRT1_2			Returns the square root of 1/2 (approx. 0.707)
SQRT2			Returns the square root of 2 (approx. 1.414)

Math Object Methods		Method Description
abs(x)			Returns the absolute value of x
acos(x)			Returns the arccosine of x, in radians
asin(x)			Returns the arcsine of x, in radians
atan(x)			Returns the arctangent of x as a numeric value between -PI/2 and PI/2 radians
atan2(y,x)		Returns the arctangent of the quotient of its arguments
ceil(x)			Returns x, rounded upwards to the nearest integer
cos(x)			Returns the cosine of x (x is in radians)
exp(x)			Returns the value of Ex
floor(x)		Returns x, rounded downwards to the nearest integer
log(x)			Returns the natural logarithm (base E) of x
max(x,y,z,...,n)	Returns the number with the highest value
min(x,y,z,...,n)	Returns the number with the lowest value
pow(x,y)		Returns the value of x to the power of y
random()		Returns a random number between 0 and 1
round(x)		Rounds x to the nearest integer
sin(x)			Returns the sine of x (x is in radians)
sqrt(x)			Returns the square root of x
tan(x)			Returns the tangent of an angle

Number rounding two methods

Method One :

var original=28.453

1) 	//round "original" to two decimals
	var result=Math.round(original*100)/100  //returns 28.45

2) 	// round "original" to 1 decimal
	var result=Math.round(original*10)/10  //returns 28.5

3) 	//round 8.111111 to 3 decimals
	var result=Math.round(8.111111*1000)/1000  //returns 8.111

The formula to round any number to x decimal points is:

1) Multiple the original number by 10^x (10 to the power of x)
2) Apply Math.round() to the result
3) Divide result by 10^x

Method Two:

Definition and Usage

The .toFixed() method converts a number into a string, keeping a specified number of decimals.

Syntax

number.toFixed(x)

Example

Convert a number into a string, keeping only two decimals:

var num = 5.56789;
var n=num.toFixed(2);

The result of n will be:

5.57