IfcCompoundPlaneAngleMeasure

IfcCompoundPlaneAngleMeasure

类型定义

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

 

注:如果复合平面角度测量用于需要精确到百万分之一度的角度描述,并表示为圆弧的一部分。它可用于测量员的角度测量或其他需要精度的角度测量。另一种用法是使用经纬度对地理坐标系进行精确或近似的全球定位。

注:虽然IfcPlaneAngleMeasure类型的测量单位取决于单位赋值(弧度或度数或其他派生单位;在IfcPoject全局或在IfcMeasureWithUnit局部),但无论单位赋值如何,IfcCompoundPlaneAngeMeasure的单位始终为度、分、秒和百万分之一秒。

IFC1.5.1中的新类型。

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

 

取值限制:

第一个整数度量是度数,通常不受范围限制。然而,当使用IfcCompoundPlaneAngleMeasure表示地理坐标时,实际上只使用[-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。然而,当存储为IfcCompoundPlaneAngleMeasure时,复合平面角度测量值总是有符号的,所有分量的符号都相同。

 

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;

 

 

#######################

posted @ 2022-10-02 17:24  西北逍遥  阅读(24)  评论(0编辑  收藏  举报