[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New PostgreSQL type, RADEC
Float4 while more compact will cause round-off errors and
prevent it's use on milliacrsecond level astometric catalogs.
While TASS observations don't go to the milliarcsend level
I think someday we may want to match TASS data
to a catalog that has this level of precision. That way we
can tell if we are looking at an unresolved double. So the
database _does_ need float8 even if TASS observations don't.
I think the best way to do it might be to make both a
RADEC4 and an RADEC8 and then define a type conversion
between them.
This is not double the work. All the functions could be defined
of float8 and the only difference between RADEC4 and RADEC8 would
be how the data are stored on disk.
I'd also thing the agragate functions like "sum" "average"
"Standard Dev." would return RADEC8 for either RADEC4 or RADEC8
arguments
--- Robert Creager <Robert_Creager@LogicalChaos.org> wrote:
>
> Hey folks,
>
> I've started down the road of implementing a new PostgreSQL type that
> I'm calling RADEC. This type will contain two floating point values
> (think complex number). I'm thinking they would be float4, and then
> we'd also want a float8 set (but without the geometric
> implementation)
> for managing partial sums(correct term?) to calculate the mean/sigma
> of
> a bunch of RADEC points which are used to 'create' a star.
>
> What is unique about this type is that the RA and DEC wrap will be
> managed (both numerically and proximally).
>
> To be able to use the R-Tree index, the following operators are
> considered:
> 1. << and >> (left of and right of - think points)
> 2. &< and >& (overlaps to left and overlaps to right - think circles)
> 3. @ (contained or on - think point contained or on circle )
> 4. && (overlaps - think circles)
> 5. =~ (same as)
>
> So, I believe that the main one we will want to use is 3.
> 1 and 2 would be interesting to define, and I'm thinking left if RA
> distance is < 0 and right if > 0 (the distance would always be < abs(
> 180 ) ). But, would anyone see any use for these, or any of them
> (other
> than 3)?
>
>
> Fishing for comments, before I write too much :-)
>
> Cheers,
> Rob
>
> --
> O_
>
> ATTACHMENT part 2 application/pgp-signature
=====
Chris Albertson
Home: 310-376-1029 chrisalbertson90278@yahoo.com
Cell: 310-990-7550
Office: 310-336-5189 Christopher.J.Albertson@aero.org
KG6OMK
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com