Good Evening,
On Monday I noticed there were ripe salmon berries. Gray jays tend
them closely but had missed a few days. On Tuesday I saw, and heard, a
gray streak drop to the ground with a thump. On Wednesday the thumping
continued on my roof. Yesterday I saw an immature gray jay eating those
neglected salmon berries. He was learning how to take off from a low,
inverted position. He was successful about half of the time.
The sun is supposed to be quiet for a few days. There are no CMEs
on the way. And, the sunspot groups exposed to us are stable. That
should allow the ionosphere to stabilize. Lower QSB would be nice.
Stronger signals would be OK too.
Please join us on (or near):
14050 kHz at 2200z Sunday (3 PM PDT Sunday)
7047 kHz at 0000z Monday (5 PM PDT Sunday)
73,
Kevin. KD5ONS
-
I needed to find the distance between points on a sphere.
Vectors made the solution simple.
// Distance between points A & B somewhere on a sphere of radius r
float arcLen( float r, struct pt A, struct pt B )
{ // Calculate cosine with the dot product of unit vectors
return r * acos( vecDotVec( normalize( A ), normalize( B ) ) );
}
Helper functions:
// Transform spherical data into a Cartesian vector
struct pt S2C( float rho, float theta, float phi ) // Radius,
elevation, azimuth
{
struct pt VT;
VT.x = rho *cos( theta*RAD *sin( phi*RAD ) );
VT.y = rho *sin( theta*RAD *sin( phi*RAD ) );
VT.z = rho *cos( phi*RAD );
return VT;
}
// Transform spherical vector into a Cartesian vector
struct pt S2C( struct pt VS )
{
struct pt VT;
VT.x = VS.x *cos( VS.y*RAD ) *sin( VS.z*RAD );
VT.y = VS.x *sin( VS.y*RAD ) *sin( VS.z*RAD );
VT.z = VS.x *cos( VS.z*RAD );
return VT;
}
int main( void )
{
float r = 100.0;
struct pt A, B, C;
srand( (unsigned) time( NULL ) ); // Seed random
number generator
// Create two random vectors A & B somewhere on a sphere of
radius r
// Convert vectors from spherical coordinates to Cartesian
A = S2C( vector( r, 180.0 * fRan(), 360.0 * fRan() ) ); //
Radius, elevation, azimuth
B = S2C( vector( r, 180.0 * fRan(), 360.0 * fRan() ) );
C = S2C( vector( r, 180.0 * fRan(), 360.0 * fRan() ) );
printf("A %8.3f %8.3f %8.3f\n", A.x, A.y, A.z );
printf("B %8.3f %8.3f %8.3f\n", B.x, B.y, B.z );
printf("C %8.3f %8.3f %8.3f\n", C.x, C.y, C.z );
printf("Distances between points and in the opposite direction
around the sphere\n");
printf("AB %8.3f %8.3f\n", arcLen( r, A, B ), 2*PI*r - arcLen( r,
A, B ) );
printf("AC %8.3f %8.3f\n", arcLen( r, A, C ), 2*PI*r - arcLen( r,
A, C ) );
printf("BC %8.3f %8.3f\n", arcLen( r, B, C ), 2*PI*r - arcLen( r,
B, C ) );
}
______________________________________________________________
Elecraft mailing list
Home: http://mailman.qth.net/mailman/listinfo/elecraft
Help: http://mailman.qth.net/mmfaq.htm
Post: mailto:Elecraft@mailman.qth.net
This list hosted by: http://www.qsl.net
Please help support this email list: http://www.qsl.net/donate.html
Message delivered to arch...@mail-archive.com