Skip to content

Commit

Permalink
added field documentation to LDTData
Browse files Browse the repository at this point in the history
  • Loading branch information
luithefirst committed Jul 17, 2024
1 parent 315b48c commit bb44633
Show file tree
Hide file tree
Showing 2 changed files with 175 additions and 10 deletions.
181 changes: 173 additions & 8 deletions src/Aardvark.Data.Photometry/LDTData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,36 @@ namespace Aardvark.Data.Photometry
{
public class LDTLampData
{
/// <summary>
/// Number of lamps:
/// For absolute photometry, number is negative
/// </summary>
public int Number;

/// <summary>
/// Type of lamps
/// </summary>
public string Type;

/// <summary>
/// Total luminous flux of lamps (lm):
/// For absolute photometry, this field is Total Luminous Flux of Luminaire
/// </summary>
public double TotalFlux;

/// <summary>
/// Color appearance / color temperature of lamps
/// </summary>
public string Color;

/// <summary>
/// Color rendering group / color rendering index
/// </summary>
public string ColorRendering;

/// <summary>
/// Wattage including ballast (W)
/// </summary>
public double Wattage;
}

Expand Down Expand Up @@ -73,35 +98,175 @@ public static LDTData ParseMeta(string filename)
public LDTData() { }

/// <summary>
/// Intensity distribution normalized to cd per 1000 lumen
/// Company identification/databank/version/format identification (Max 78)
/// </summary>
public string CompanyName { get; set; }

/// <summary>
/// Ityp - Type indicator
///
/// 0 - point source with no symmetry
/// 1 - symmetry about the vertical axis
/// 2 - linear luminaire
/// 3 - point source with any other symmetry.
///
/// Note: only linear luminaires, Ityp = 2, are being subdivided in longitudinal and transverse directions
/// </summary>
public LDTItype Itype { get; set; }

/// <summary>
/// lsym - Symmetry indicator
///
/// 0 ... no symmetry
/// 1 - symmetry about the vertical axis
/// 2 - symmetry to plane C0-C180
/// 3 - symmetry to plane C90-C270
/// 4 - symmetry to plane C0-C180 and to plane C90-C270
/// </summary>
public LDTSymmetry Symmetry { get; set; }

/// <summary>
/// Mc - Number of C-planes between 0 and 360 degrees (usually 24 for interior, 36 for road lighting luminaires)
/// </summary>
public Matrix<double> Data { get; set; }
public double[] VerticleAngles { get; set; }
public double[] HorizontalAngles { get; set; }
public int PlaneCount { get; set; }

/// <summary>
/// Dc - Distance between C-planes (Dc = 0 for non-equidistantly available C-planes)
/// </summary>
public double HorAngleStep { get; set; }

/// <summary>
/// Ng - Number of luminous intensities in each C-plane (usually 19 or 37)
/// </summary>
public int ValuesPerPlane { get; set; }

/// <summary>
/// Dg - Distance between luminous intensities per C-plane (Dg = 0 for non-equidistantly available luminous intensities in C-planes)
/// </summary>
public double VertAngleStep { get; set; }
public LDTSymmetry Symmetry { get; set; }
public LDTItype Itype { get; set; }
public string CompanyName { get; set; }

/// <summary>
/// Measurement report number (Max 78)
/// </summary>
public string MeasurementReportNumber { get; set; }

/// <summary>
/// Luminaire name (Max 78)
/// </summary>
public string LuminaireName { get; set; }

/// <summary>
/// Luminaire number (Max 78)
/// </summary>
public string LuminaireNumber { get; set; }

/// <summary>
/// File name (8)
/// </summary>
public string FileName { get; set; }

/// <summary>
/// Date/user (Max 78)
/// </summary>
public string DateUser { get; set; }

/// <summary>
/// Length/diameter of luminaire (mm)
/// </summary>
public int LengthLuminaire { get; set; }

/// <summary>
/// b - Width of luminaire (mm) (b = 0 for circular luminaire)
/// </summary>
public int WidthLuminaire { get; set; }

/// <summary>
/// Height of luminaire (mm)
/// </summary>
public int HeightLuminare { get; set; }

/// <summary>
/// Length/diameter of luminous area (mm)
/// </summary>
public int LengthLuminousArea { get; set; }

/// <summary>
/// b1 - Width of luminous area (mm) (b1 = 0 for circular luminous area of luminaire)
/// </summary>
public int WidthLuminousArea { get; set; }

/// <summary>
/// Height of luminous area C0-plane(mm)
/// </summary>
public int HeightLuminousAreaC0 { get; set; }

/// <summary>
/// Height of luminous area C90-plane (mm)
/// </summary>
public int HeightLuminousAreaC90 { get; set; }

/// <summary>
/// Height of luminous area C180-plane (mm)
/// </summary>
public int HeightLuminousAreaC180 { get; set; }

/// <summary>
/// Height of luminous area C270-plane (mm)
/// </summary>
public int HeightLuminousAreaC270 { get; set; }

/// <summary>
/// DFF - Downward flux fraction(%)
/// </summary>
public double DownwardFluxFraction { get; set; }

/// <summary>
/// LORL - Light output ratio luminaire (%)
/// </summary>
public double LightOutputRatioLuminaire { get; set; }

/// <summary>
/// Conversion factor for luminous intensities(depending on measurement)
/// </summary>
public double ConversionIntensity { get; set; }
public double Tilt { get; set; }

/// <summary>
/// Standard sets of lamps (optional, also extendable on company-specific basis)
/// For absolute photometry, there is only one entry
/// Lamp attributes:
/// a: Number of lamps: For absolute photometry, number is negative
/// b: Type of lamps
/// c: Total luminous flux of lamps (lm): For absolute photometry, this field is Total Luminous Flux of Luminaire
/// d: Color appearance / color temperature of lamps
/// e: Color rendering group / color rendering index
/// f: Wattage including ballast (W)
/// </summary>
public LDTLampData[] LampSets { get; set; }

/// <summary>
/// Tilt of luminaire during measurement(road lighting luminaires)
/// </summary>
public double Tilt { get; set; }

/// <summary>
/// DR - Direct ratios for room indices k = 0.6 ... 5 (for determination of luminaire numbers according to utilization factor method)
/// </summary>
public double[] DirectRatios { get; set; }

/// <summary>
/// Angles C (beginning with 0 degrees)
/// </summary>
public double[] HorizontalAngles { get; set; }

/// <summary>
/// Angles G (beginning with 0 degrees)
///
/// </summary>
public double[] VerticleAngles { get; set; }

/// <summary>
/// Luminous intensity distribution normalized to cd per 1000 lumen (cd/1000 lumens)
/// </summary>
public Matrix<double> Data { get; set; }
}
}
4 changes: 2 additions & 2 deletions src/Aardvark.Data.Photometry/LDTParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ private LDTData ReadMeta(StreamReader sr)
// 6-10
ldt.ValuesPerPlane = ReadIntLine(sr);
ldt.VertAngleStep = ReadDoubleLine(sr);
var measurementReportNumber = sr.ReadLine();
ldt.MeasurementReportNumber = sr.ReadLine();
ldt.LuminaireName = sr.ReadLine();
ldt.LuminaireNumber = sr.ReadLine();
// 11-15
ldt.FileName = sr.ReadLine();
var dateUser = sr.ReadLine();
ldt.DateUser = sr.ReadLine();
ldt.LengthLuminaire = ReadIntLine(sr);
ldt.WidthLuminaire = ReadIntLine(sr);
ldt.HeightLuminare = ReadIntLine(sr);
Expand Down

0 comments on commit bb44633

Please sign in to comment.