View Javadoc
1   package org.djunits.unit;
2   
3   import org.djunits.quantity.Quantity;
4   import org.djunits.unit.scale.IdentityScale;
5   import org.djunits.unit.si.SIPrefixes;
6   import org.djunits.unit.unitsystem.UnitSystem;
7   
8   /**
9    * Standard solid angle unit.
10   * <p>
11   * Copyright (c) 2015-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
12   * BSD-style license. See <a href="https://djunits.org/docs/license.html">DJUNITS License</a>
13   * </p>
14   * @author <a href="https://www.tudelft.nl/averbraeck">Alexander Verbraeck</a>
15   */
16  public class SolidAngleUnit extends Unit<SolidAngleUnit>
17  {
18      /** */
19      private static final long serialVersionUID = 20140607L;
20  
21      /** The base, with "sr" as the SI signature. */
22      public static final Quantity<SolidAngleUnit> BASE = new Quantity<>("SolidAngle", "sr");
23  
24      /** The SI unit for solid angle is steradian. */
25      public static final SolidAngleUnit SI =
26              new SolidAngleUnit().build(new Unit.Builder<SolidAngleUnit>().setQuantity(BASE).setId("sr").setName("steradian")
27                      .setUnitSystem(UnitSystem.SI_DERIVED).setSiPrefixes(SIPrefixes.NONE, 1.0).setScale(IdentityScale.SCALE));
28  
29      /** steradian. */
30      public static final SolidAngleUnit STERADIAN = SI;
31  
32      /** square degree. */
33      public static final SolidAngleUnit SQUARE_DEGREE =
34              STERADIAN.deriveLinear((Math.PI / 180.0) * (Math.PI / 180.0), "sq.deg", "square degree");
35  
36  }