Re: Math expression help
Re: Math expression help
- Subject: Re: Math expression help
- From: Doug McNutt <email@hidden>
- Date: Tue, 9 May 2006 14:59:56 -0600
At 16:42 -0400 5/9/06, Dale J Martin wrote:
>
>set HA to 256.84 * 3.1415926535 / 180 --in radians
>set Dec to 29.82 * 3.1415926535 / 180 --in radians
>set latitude to 42.55574 * 3.1415926535 / 180 --latitude location in radians.
I'd use pi rather than the decimal. At least be sure they're all the same.
4 * atan(1) is another option to avoid decimal to binary errors.
>set Dz to cos (latitude - pi / 2) * (cos (Dec) * (cos (-HA) + (sin (latitude - pi / 2) * (sin (Dec)))))
set Dz to cos (latitude - pi / 2) * { cos (Dec) * [ cos (-HA) + < sin (latitude - pi / 2) * sin (Dec) > ] }
>display dialog "Dz " & Dz
>
>set x1 to cos (latitude - pi / 2)
>set x2 to cos (Dec)
>set x3 to cos (-HA)
>set x4 to x1 * x2 * x3
>set x5 to sin (latitude - pi / 2)
>set x6 to sin (Dec)
>set x7 to x5 * x6
This one is not the same as the long form. Donno which is correct though
Vectors are easier for me than spherical trig.
You need an editor that selects matching parentheses on double click.
>set x8 to x4 + x7 --> x4 + x7 * cos (latitude - pi / 2)
>
>display dialog "C " & x8
--
--> From the U S of A, the only socialist country that refuses to admit it. <--
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden