IfcCompoundPlaneAngleMeasure

IfcCompoundPlaneAngleMeasure是以度、分、秒和可选的百万分之一秒弧为单位的平面角的复合度量。

注ifccompondPlaneAngleMeasure用于需要精确到百万分之一度的角度并用弧的一部分表示的情况。它可用于测量员的角度测量或其他要求精度的角度测量。另一种用法是根据地理坐标系使用经纬度精确或近似全球定位。

注:虽然IfcPlaneAngleMeasure类型的测量单位取决于单位分配(弧度或度或其他派生单位;在ifcproject全局或在IfcMeasureWithUnit中局部),但IfcCompoundPlaneAngleMeasure的单位始终是度、分、秒和百万分之一秒,而不考虑单位分配。

IFC1.5.1中增加的新类型。

类型:整数列表[3:4]

取值范围说明:

①第一个整数度量是度数,通常不受范围限制。然而,当使用ifccompondeplaneanglemeasure来表示地理坐标时,实际上只使用了【-90,90】的纬度和[-180,180】的经度。

②第二个整数度量是分钟数,并且应该在范围(-60,60)内。

③第三个整数度量是秒数,且应在范围(-60,60)内。

④可选的第四个整数度量值是百万分之一秒,并且应在范围(-1 000 000,1 000 000)内。

所有测量部件都有相同的符号(正或负)。因此,在浮点表示法(十进制度数)和复合表示法之间进行转换非常简单,而不管角度是大于还是小于零。例子:

LOCAL
  a : IfcPlaneAngleMeasure := -50.975864;  (* decimal degrees, -50° 58' 33" 110400 *)
  b : IfcPlaneAngleMeasure;
  c : IfcCompoundPlaneAngleMeasure;
  s : IfcText;
END_LOCAL;

(* convert from float to compound *)
  c[1] :=    a;                                           -- -50
  c[2] :=   (a - c[1]) * 60;                              -- -58
  c[3] :=  ((a - c[1]) * 60 - c[2]) * 60;                 -- -33
  c[4] := (((a - c[1]) * 60 - c[2]) * 60 - c[3]) * 1.e6;  -- -110400

(* convert from compound to float *)
  b := c[1] + c[2]/60. + c[3]/3600. + c[4]/3600.e6;       -- -50.975864

在字符串表示中使用

当一个复合平面角度测量被格式化为显示或打印输出时,分数部分的符号通常会被丢弃,因为对于读者来说,第一个分量的符号表明了角度的意义:

(* convert from compound to human-readable string *)
  s := FORMAT(c[1], '+##')     + "000000B0"
     + FORMAT(ABS(c[2]), '##') + ''''
     + FORMAT(ABS(c[3]), '##') + '"'
     + FORMAT(ABS(c[4]), '##');  -- -50° 58' 33" 110400

另一个经常遇到的纬度和经度的显示格式是省略符号并打印N、S、E、W指示器,例如,50°58'33“S。但是,当存储为IFCCompondPlaneAngleMeasure时,总是有符号的复合平面角度测量,所有组件的符号都相同。

Formal Propositions

RuleDescription
MinutesInRange The second measure (minutes) shall be between -60 exclusive and 60 exclusive.
SecondsInRange The third measure (seconds) shall be between -60 exclusive and 60 exclusive.
MicrosecondsInRange The forth measure (millionth-seconds), if asserted, shall be between -1e6 exclusive and 1e6 exclusive.
ConsistentSign All non-zero measure components shall have the same sign (positive or negative).
 

EXPRESS Specification

TYPE IfcCompoundPlaneAngleMeasure = LIST [3:4] OF INTEGER;
 WHERE
  MinutesInRange : ABS(SELF[2]) < 60
  SecondsInRange : ABS(SELF[3]) < 60
  MicrosecondsInRange : (SIZEOF(SELF) = 3) OR (ABS(SELF[4]) < 1000000)
  ConsistentSign : ((SELF[1] >= 0) AND (SELF[2] >= 0) AND (SELF[3] >= 0) AND ((SIZEOF(SELF) = 3) OR (SELF[4] >= 0))) OR ((SELF[1] <= 0) AND (SELF[2] <= 0) AND (SELF[3] <= 0) AND ((SIZEOF(SELF) = 3) OR (SELF[4] <= 0)))
END_TYPE;
原文地址:https://www.cnblogs.com/herd/p/14168747.html