Qalculate / libqalculate

Qalculate! library and CLI
https://qalculate.github.io/
GNU General Public License v2.0
1.72k stars 141 forks source link

Add planet(sun; mass) and other sun data #642

Open doronbehar opened 2 months ago

doronbehar commented 2 months ago

As the title suggests.. Any reason why these are not included?

hanna-kn commented 2 months ago

Any reason why these are not included?

Because the Sun is not a planet... If the Sun, and other non-planetary objects in the solar system, are added (Pluto was still considered a planet when the data set was created), the data set should at least use a different title. Another alternative would be create a new data set for stars.

The Planets data set was primarily intended as a proof of concept, and do not know which data are relevant and useful.

doronbehar commented 2 months ago

Haha.. Reminds me of this:

https://www.youtube.com/watch?v=aIVOIaYxaTo

Another alternative would be create a new data set for stars.

Yea sounds good to me, though there are so many of them.

and do not know which data are relevant and useful.

They are useful for me :)

hanna-kn commented 2 months ago

I've now added the Sun to the planets data set (despite my previous reservations). I've also added solar mass, radius (nominal), and luminosity (nominal) as units.

doronbehar commented 2 months ago

Thanks @hanna-kn ! I haven't tested the changes but I guess it should work. I was thinking though, what happens when someone writes: planet(earth; luminosity)?

foreachthing commented 2 months ago

This:

planet(earth, luminosity) error: Argument 2, Property, in planet() must be name of a data property (name, year, speed, eccentricity, inclination, satellites, mass, density, area, gravity, temperature, or radius). planet(earth, luminosity) = planet(earth, luminosity)

If I could make a wish: Please let the sun data be stored in, i.e., suns.xml Just like Hanna said... I'd never ever be looking in Planet() for Sun data.

Naruyoko commented 2 months ago

Since the sun is not a planet, I think putting them together as astronomical objects would be better, which can be asked for data common to all astronomical objects. Then, the planet set could answer to an extended set of properties but only understands planets.

P.S.: The latter half assumes that there are (interesting) properties that make sense for planets but not for any astronomical object.

hanna-kn commented 2 months ago

The placement of the Sun in the planets data set is a temporary solution. Luminosity is currently not a supported property for the Sun either (the nominal luminosity is however provided as a unit).

Vomet commented 1 month ago

I was wondering if we could rename the data set to "star" instead of "stars".

For example, compare the following to one another:

star(sun)
stars(sun)

Personally, I think star(sun) is more natural than stars(sun).

I'm also wondering if we should use Wikipedia to grab the data we need for stars.