I need to have fields in my database for the following:
- RA (
hh:mm:ss.00
) - Dec (
Degrees:arcseconds:arcminutes.00
)
I need to have the facility to search for a range within each field.
Any ideas?
I need to have fields in my database for the following:
hh:mm:ss.00
)Degrees:arcseconds:arcminutes.00
)I need to have the facility to search for a range within each field.
Any ideas?
If you just want to store the coordinates, for later searching, your best bet is to convert from degrees-minutes-seconds to decimal degrees, and store as DECIMAL. Here is an answer giving mysql functions that do that conversion, in both directions.
If you want to do more complex things like "Is this point within the constellation Orion" then you probably need to use spatial data extensions, as @RLF suggested in a comment. http://dev.mysql.com/doc/refman/5.0/en/spatial-extensions.html http://dev.mysql.com/doc/refman/5.0/en/using-spatial-data.html