我正在构建一个需要确定旅程在白天和/或黑暗中度过的分钟数的应用程序。
我可以访问:出发地和目的地的纬度/经度,以及两者的日期时间(以及总持续时间和粗略距离)。
我已经能够使用PHP的太阳功能来发现日出/套装,但是我正在寻找一种方法来确定一种方法来确定白天/黑夜的比例(即你可以在白天开始并结束黑暗,所以在它之间的某个时刻转向“夜晚”,我需要找到那个位置)
最值得赞赏的任何帮助。
INSERT INTO testcomment (commentid, createtime, requestid, activityid, activitytype, authortype, author, principal, messageid, sequencenumber, commenttext) VALUES ('0ef2b7afdb0648bf8fbcc7ad49bd9a3a', '2017-07-06 14:07:10.594', 'c9020d235b7a46fe81703945a55dc397', 'Activity12', 0, 'User', 'IDMProv', NULL, 'User_Task_Timedout', 1499364430594, 'User_Task_Timedout|System');
INSERT INTO testcomment (commentid, createtime, requestid, activityid, activitytype, authortype, author, principal, messageid, sequencenumber, commenttext) VALUES ('07e38a77b68b469abb55d5fa0560f3b4', '2017-01-11 10:23:40.873', 'ddaec20367be4247ac34c94249827b1e', 'Activity13', 0, 'System', 'IDMProv', 'System', 'Workflow_Forwarded', 1484148220873, 'Workflow_Forwarded');
其中
$originSunrise = self::sunrise($flight->date_depart, $airportDepart->airportLat, $airportDepart->airportLong);
$originSunset = self::sunset($flight->date_depart, $airportDepart->airportLat, $airportDepart->airportLong);
$destinationSunrise = self::sunrise($flight->date_arrive, $airportArrive->airportLat, $airportArrive->airportLong);
$destinationSunset = self::sunset($flight->date_arrive, $airportArrive->airportLat, $airportArrive->airportLong);