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
10
11
12
13
14
15
16 public class LinearDensityUnit extends Unit<LinearDensityUnit>
17 {
18
19 private static final long serialVersionUID = 20141111L;
20
21
22 public static final Quantity<LinearDensityUnit> BASE = new Quantity<>("LinearDensity", "m-1");
23
24
25 public static final LinearDensityUnit SI = new LinearDensityUnit().build(new Unit.Builder<LinearDensityUnit>()
26 .setQuantity(BASE).setId("/m").setName("per meter").setUnitSystem(UnitSystem.SI_DERIVED)
27 .setSiPrefixes(SIPrefixes.PER_UNIT, 1.0).setScale(IdentityScale.SCALE).setAdditionalAbbreviations("/m", "1/m"));
28
29
30 public static final LinearDensityUnit PER_METER = SI;
31
32
33 public static final LinearDensityUnit PER_MICROMETER = PER_METER.deriveLinear(1.0E6, "/mum", "per micrometer",
34 UnitSystem.SI_DERIVED, "/\u03BCm", "/mum", "1/\u03BCm", "1/mum");
35
36
37 public static final LinearDensityUnit PER_MILLIMETER =
38 PER_METER.deriveLinear(1.0E3, "/mm", "per millimeter", UnitSystem.SI_DERIVED, "/mm", "1/mm");
39
40
41 public static final LinearDensityUnit PER_CENTIMETER =
42 PER_METER.deriveLinear(100.0, "/cm", "per centimeter", UnitSystem.SI_DERIVED, "/cm", "1/cm");
43
44
45 public static final LinearDensityUnit PER_DECIMETER =
46 PER_METER.deriveLinear(10.0, "/dm", "per decimeter", UnitSystem.SI_DERIVED, "/dm", "1/dm");
47
48
49 public static final LinearDensityUnit PER_DECAMETER =
50 PER_METER.deriveLinear(0.1, "/dam", "per decameter", UnitSystem.SI_DERIVED, "/dam", "1/dam");
51
52
53 public static final LinearDensityUnit PER_HECTOMETER =
54 PER_METER.deriveLinear(0.01, "/hm", "per hectometer", UnitSystem.SI_DERIVED, "/hm", "1/hm");
55
56
57 public static final LinearDensityUnit PER_KILOMETER =
58 PER_METER.deriveLinear(0.001, "/km", "per kilometer", UnitSystem.SI_DERIVED, "/km", "1/km");
59
60
61 public static final LinearDensityUnit PER_FOOT =
62 PER_METER.deriveLinear(1.0 / 0.3048, "/ft", "per foot", UnitSystem.IMPERIAL, "/ft", "1/ft");
63
64
65 public static final LinearDensityUnit PER_INCH =
66 PER_FOOT.deriveLinear(12.0, "/in", "per inch", UnitSystem.IMPERIAL, "/in", "1/in");
67
68
69 public static final LinearDensityUnit PER_YARD =
70 PER_FOOT.deriveLinear(1.0 / 3.0, "/yd", "per yard", UnitSystem.IMPERIAL, "/yd", "1/yd");
71
72
73 public static final LinearDensityUnit PER_MILE =
74 PER_FOOT.deriveLinear(1.0 / 5280.0, "/mi", "per mile", UnitSystem.IMPERIAL, "/mi", "1/mi");
75
76
77 public static final LinearDensityUnit PER_NAUTICAL_MILE =
78 PER_METER.deriveLinear(1.0 / 1852.0, "/NM", "per Nautical Mile", UnitSystem.OTHER, "/NM", "1/NM");
79
80
81 public static final LinearDensityUnit PER_ASTRONOMICAL_UNIT =
82 PER_METER.deriveLinear(1.0 / 149597870700.0, "/AU", "per Astronomical Unit", UnitSystem.OTHER, "/AU", "1/AU");
83
84
85 public static final LinearDensityUnit PER_LIGHTYEAR =
86 PER_METER.deriveLinear(1.0 / 9460730472580800.0, "/ly", "per lightyear", UnitSystem.OTHER, "/ly", "1/ly");
87
88
89 public static final LinearDensityUnit PER_PARSEC =
90 PER_LIGHTYEAR.deriveLinear(Math.PI / 648000.0, "/pc", "per parsec", UnitSystem.OTHER, "/pc", "1/pc");
91
92
93 public static final LinearDensityUnit PER_ANGSTROM =
94 PER_METER.deriveLinear(1.0E-10, "/A", "per Angstrom", UnitSystem.OTHER, "/\u212B", "/A", "1/\u212B", "1/A");
95
96 }