Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SensorManager what is the GRAVITY_EARTH?

I found this values in sources.

 /** Standard gravity (g) on Earth. This value is equivalent to 1G */
    public static final float STANDARD_GRAVITY = 9.80665f;

    /** Sun's gravity in SI units (m/s^2) */
    public static final float GRAVITY_SUN             = 275.0f;
    /** Mercury's gravity in SI units (m/s^2) */
    public static final float GRAVITY_MERCURY         = 3.70f;
    /** Venus' gravity in SI units (m/s^2) */
    public static final float GRAVITY_VENUS           = 8.87f;
    /** Earth's gravity in SI units (m/s^2) */
    public static final float GRAVITY_EARTH           = 9.80665f;
    /** The Moon's gravity in SI units (m/s^2) */
    public static final float GRAVITY_MOON            = 1.6f;
    /** Mars' gravity in SI units (m/s^2) */
    public static final float GRAVITY_MARS            = 3.71f;
    /** Jupiter's gravity in SI units (m/s^2) */
    public static final float GRAVITY_JUPITER         = 23.12f;
    /** Saturn's gravity in SI units (m/s^2) */
    public static final float GRAVITY_SATURN          = 8.96f;
    /** Uranus' gravity in SI units (m/s^2) */
    public static final float GRAVITY_URANUS          = 8.69f;
    /** Neptune's gravity in SI units (m/s^2) */
    public static final float GRAVITY_NEPTUNE         = 11.0f;
    /** Pluto's gravity in SI units (m/s^2) */
    public static final float GRAVITY_PLUTO           = 0.6f;
    /** Gravity (estimate) on the first Death Star in Empire units (m/s^2) */
    public static final float GRAVITY_DEATH_STAR_I    = 0.000000353036145f;
    /** Gravity on the island */
    public static final float GRAVITY_THE_ISLAND      = 4.815162342f;

But i can't find any usages of this.
What the goal to use this values?

like image 324
Sergey Shustikov Avatar asked Jul 19 '15 22:07

Sergey Shustikov


Video Answer


2 Answers

I'm pretty sure these are meant as jokes. I think it's unlikely that you'll find an Android device running on the Death Star I, mostly because the spaceship was blown up in the Battle of Yavin:

Death Star

The STANDARD_GRAVITY value is the amount of gravity you'll find on Earth, which is a bit more useful. All of these can be used with the gravity sensor (Sensor.TYPE_GRAVITY): your sensor should pick up about STANDARD_GRAVITY worth of gravity in one direction.

For more about the gravity sensor, see the Android developer documentation. For more about the Death Star, see Wikipedia, and for more about this mysterious island, try Google.

like image 52
Wander Nauta Avatar answered Oct 17 '22 00:10

Wander Nauta


These are the gravitational constants for the various planets.

Objects, when dropped, accelerate at the rate of 9.8 m/s^2 on earth (independent of mass, in a vacuum). This is basic physics.

For example, after two seconds, in the absence of air resistance, an object reaches a speed of 9.8 m/s^2 * 2 s = 19.6 m/s.

like image 23
Merk Avatar answered Oct 17 '22 02:10

Merk