Commit 88c614ad authored by Romain Courteaud's avatar Romain Courteaud

Drone simulator

See merge request !1674
parents 0e55c500 7a842b90
......@@ -36,6 +36,7 @@
<label data-i18n="Site:">Site:</label>
<select name="web_site">
<option>Text Editor</option>
<option>Drone Simulator</option>
<option>Smart Assistant</option>
<option>Media Player</option>
<option>Illustration Editor</option>
......
......@@ -235,7 +235,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1001.15759.21278.29644</string> </value>
<value> <string>1003.56328.46161.11110</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -253,7 +253,7 @@
</tuple>
<state>
<tuple>
<float>1659963257.75</float>
<float>1671129613.99</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -14,6 +14,11 @@
"storage_type": "precache",
"cache": precache_manifest
},
"Drone Simulator": {
"url": "officejs_drone_simulator/",
"storage_type": "precache",
"cache": precache_manifest
},
"Smart Assistant": {
"url": "officejs_smart_assistant/",
"storage_type": "precache",
......
......@@ -258,7 +258,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1001.15759.21278.29644</string> </value>
<value> <string>1003.56329.25576.20599</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -276,7 +276,7 @@
</tuple>
<state>
<tuple>
<float>1659963275.0</float>
<float>1671129664.38</float>
<string>UTC</string>
</tuple>
</state>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>2c89322c21320232368a413b72c62319</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/png</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>drone.png</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>filename</string> </key>
<value> <string>drone.png</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>512</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>drone_icon_png</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Image</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>513</int> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAc=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1666715587.71</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="7" aka="AAAAAAAAAAc=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1003.57663.27647.8772</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1666715580.59</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*global console*/
/*jslint nomen: true, indent: 2, maxlen: 80, white: true */
/************************** DRONE A AILE FIXE API ****************************/
var DroneAaileFixeAPI = /** @class */ (function () {
"use strict";
// var TAKEOFF_RADIUS = 60,
var LOITER_LIMIT = 30,
LOITER_RADIUS_FACTOR = 0.60,
LOITER_SPEED_FACTOR = 1.5;
//** CONSTRUCTOR
function DroneAaileFixeAPI(gameManager, drone_info, flight_parameters, id) {
this._gameManager = gameManager;
this._mapManager = this._gameManager._mapManager;
this._map_dict = this._mapManager.getMapInfo();
this._flight_parameters = flight_parameters;
this._id = id;
this._drone_info = drone_info;
this._loiter_radius = 0;
this._last_loiter_point_reached = -1;
//this._start_altitude = 0;
//this._last_altitude_point_reached = -1;
this._loiter_mode = false;
this._drone_dict_list = [];
}
/*
** Function called on start phase of the drone, just before onStart AI script
*/
DroneAaileFixeAPI.prototype.internal_start = function () {
return;
};
/*
** Function called on every drone update, right after onUpdate AI script
*/
DroneAaileFixeAPI.prototype.internal_update = function (drone) {
if (this._loiter_mode) {
this.loiter(drone);
}
/*if (this._start_altitude > 0) { //TODO move start_altitude here
this.reachAltitude(drone);
}*/
var _this = this, drone_position = drone.getCurrentPosition(), drone_info;
if (drone_position) {
drone_info = {
'altitudeRel' : drone_position.z,
'altitudeAbs' : this._mapManager.getMapInfo().start_AMSL +
drone_position.z,
'latitude' : drone_position.x,
'longitude' : drone_position.y
};
this._drone_dict_list[this._id] = drone_info;
//broadcast drone info using internal msg
this._gameManager._droneList.forEach(function (drone) {
if (drone.id !== _this._id) {
drone.internal_getMsg(drone_info, _this._id);
}
});
}
};
DroneAaileFixeAPI.prototype.internal_getMsg = function (msg, id) {
this._drone_dict_list[id] = msg;
};
DroneAaileFixeAPI.prototype.set_loiter_mode = function (radius) {
this._loiter_mode = true;
if (radius && radius > LOITER_LIMIT) {
this._loiter_radius = radius * LOITER_RADIUS_FACTOR;
this._loiter_center = this._last_target;
this._loiter_coordinates = [];
this._last_loiter_point_reached = -1;
var x1, y1, angle;
//for (var angle = 0; angle <360; angle+=8){ //counter-clockwise
for (angle = 360; angle > 0; angle-=8){ //clockwise
x1 = this._loiter_radius *
Math.cos(angle * (Math.PI / 180)) + this._loiter_center.x;
y1 = this._loiter_radius *
Math.sin(angle * (Math.PI / 180)) + this._loiter_center.y;
this._loiter_coordinates.push(
this.getCurrentPosition(x1, y1, this._loiter_center.z));
}
}
};
DroneAaileFixeAPI.prototype.internal_setTargetCoordinates =
function (drone, x, y, z, loiter) {
//this._start_altitude = 0;
//convert real geo-coordinates to virtual x-y coordinates
var coordinates = this.processCoordinates(x, y, z);
if (!loiter) {
this._loiter_mode = false;
drone._maxSpeed = this.getMaxSpeed();
//save last target point to use as next loiter center
this._last_target = coordinates;
}
this.internal_setVirtualPlaneTargetCoordinates(drone,
coordinates.x,
coordinates.y,
coordinates.z);
};
/*
** This expects x,y plane coordinates (not geo latitude-longitud)
*/
DroneAaileFixeAPI.prototype.internal_setVirtualPlaneTargetCoordinates =
function (drone, x, y, z) {
x -= drone._controlMesh.position.x;
y -= drone._controlMesh.position.z;
z -= drone._controlMesh.position.y;
drone.setDirection(x, y, z);
drone.setAcceleration(drone._maxAcceleration);
return;
};
DroneAaileFixeAPI.prototype.sendMsg = function (msg, to) {
var _this = this,
droneList = _this._gameManager._droneList;
_this._gameManager.delay(function () {
if (to < 0) {
// Send to all drones
droneList.forEach(function (drone) {
if (drone.infosMesh) {
try {
drone.onGetMsg(msg);
}
catch (error) {
console.warn('Drone crashed on sendMsg due to error:', error);
drone._internal_crash();
}
}
});
}
else {
// Send to specific drone
if (droneList[to].infosMesh) {
try {
droneList[to].onGetMsg(msg);
}
catch (error) {
console.warn('Drone crashed on sendMsg due to error:', error);
droneList[to]._internal_crash();
}
}
}
}, _this._flight_parameters.latency.communication);
};
DroneAaileFixeAPI.prototype.log = function (msg) {
console.log("API say : " + msg);
};
DroneAaileFixeAPI.prototype.getGameParameter = function (name) {
if (["gameTime", "map"].includes(name)) {
return this._gameManager.gameParameter[name];
}
};
/*
** Converts geo latitude-longitud coordinates (º) to x,y plane coordinates (m)
*/
DroneAaileFixeAPI.prototype.processCoordinates = function (lat, lon, z) {
if(isNaN(lat) || isNaN(lon) || isNaN(z)){
throw new Error('Target coordinates must be numbers');
}
var x = this._mapManager.longitudToX(lon, this._map_dict.width),
y = this._mapManager.latitudeToY(lat, this._map_dict.depth),
position = this._mapManager.normalize(x, y, this._map_dict),
processed_coordinates;
if (z > this._map_dict.start_AMSL) {
z -= this._map_dict.start_AMSL;
}
processed_coordinates = {
x: position[0],
y: position[1],
z: z
};
//this._last_altitude_point_reached = -1;
//this.takeoff_path = [];
return processed_coordinates;
};
DroneAaileFixeAPI.prototype.getCurrentPosition = function (x, y, z) {
return this._mapManager.convertToGeoCoordinates(x, y, z, this._map_dict);
};
DroneAaileFixeAPI.prototype.loiter = function (drone) {
if (this._loiter_radius > LOITER_LIMIT) {
var drone_pos = drone.getCurrentPosition(),
min = 9999, min_i, i, d, next_point;
//shift loiter circle to nearest point
if (this._last_loiter_point_reached === -1) {
if (!this.shifted) {
drone._maxSpeed = drone._maxSpeed * LOITER_SPEED_FACTOR;
for (i = 0; i < this._loiter_coordinates.length; i+=1){
d = this._mapManager.latLonDistance([drone_pos.x, drone_pos.y],
[this._loiter_coordinates[i].x,
this._loiter_coordinates[i].y]);
if (d < min) {
min = d;
min_i = i;
}
}
this._loiter_coordinates = this._loiter_coordinates.concat(
this._loiter_coordinates.splice(0,min_i));
this.shifted = true;
}
} else {
this.shifted = false;
}
//stop
if (this._last_loiter_point_reached ===
this._loiter_coordinates.length - 1) {
if (drone._maxSpeed !== this.getMaxSpeed()) {
drone._maxSpeed = this.getMaxSpeed();
}
drone.setDirection(0, 0, 0);
return;
}
//loiter
next_point =
this._loiter_coordinates[this._last_loiter_point_reached + 1];
this.internal_setTargetCoordinates(
drone, next_point.x, next_point.y, next_point.z, true);
if (this._mapManager.latLonDistance([drone_pos.x, drone_pos.y],
[next_point.x, next_point.y]) < 1) {
this._last_loiter_point_reached += 1;
if (this._last_loiter_point_reached ===
this._loiter_coordinates.length - 1) {
return;
}
next_point = this._loiter_coordinates[
this._last_loiter_point_reached + 1];
this.internal_setTargetCoordinates(
drone, next_point.x, next_point.y, next_point.z, true);
}
}
};
DroneAaileFixeAPI.prototype.getDroneAI = function () {
return null;
};
DroneAaileFixeAPI.prototype.setAltitude = function (altitude, drone) {
/*if (this._start_altitude === 0) {
this._start_altitude = 1;
}
this.takeoff_path = [];
if (skip_loiter) {*/
var drone_pos = drone.getCurrentPosition();
this.internal_setVirtualPlaneTargetCoordinates(drone,
drone_pos.x,
drone_pos.y,
altitude);
return;
/*}
var x1, y1,
LOOPS = 1,
CIRCLE_ANGLE = 8,
current_point = 0,
total_points = 360/CIRCLE_ANGLE*LOOPS,
initial_altitude = drone.getAltitudeAbs(),
center = {
x: drone.position.x,
y: drone.position.y,
z: drone.position.z
};
for (var l = 0; l <= LOOPS; l+=1){
for (var angle = 360; angle > 0; angle-=CIRCLE_ANGLE){ //clockwise sense
current_point++;
x1 = TAKEOFF_RADIUS * Math.cos(angle * (Math.PI / 180)) + center.x;
y1 = TAKEOFF_RADIUS * Math.sin(angle * (Math.PI / 180)) + center.y;
if (current_point < total_points/3) {
var FACTOR = 0.5;
x1 = center.x*FACTOR + x1*(1-FACTOR);
y1 = center.y*FACTOR + y1*(1-FACTOR);
}
this.takeoff_path.push({x: x1, y: y1, z: initial_altitude +
current_point * (altitude-initial_altitude)/total_points});
}
}*/
};
/*DroneAaileFixeAPI.prototype.reachAltitude = function (drone) {
function distance(p1, p2) {
return Math.sqrt(Math.pow(p1[0] - p2[0], 2) +
Math.pow(p1[1] - p2[1], 2));
}
//stop
if (this._last_altitude_point_reached === this.takeoff_path.length - 1) {
this._last_altitude_point_reached = -1;
this.takeoff_path = [];
this._start_altitude = 0;
drone.setDirection(0, 0, 0);
return;
}
//loiter
var drone_pos = {
x: drone.position.x,
y: drone.position.y,
z: drone.position.z
};
var next_point = this.takeoff_path[this._last_altitude_point_reached + 1];
this.internal_setVirtualPlaneTargetCoordinates(
next_point.x, next_point.y, next_point.z);
if (distance([drone_pos.x, drone_pos.y],
[next_point.x, next_point.y]) < 1) {
this._last_altitude_point_reached += 1;
if (this._last_altitude_point_reached === this.takeoff_path.length - 1) {
return;
}
next_point = this.takeoff_path[this._last_altitude_point_reached + 1];
this.internal_setVirtualPlaneTargetCoordinates(
next_point.x, next_point.y, next_point.z);
}
};*/
DroneAaileFixeAPI.prototype.getMaxSpeed = function () {
return this._flight_parameters.drone.maxSpeed;
};
DroneAaileFixeAPI.prototype.triggerParachute = function (drone) {
var drone_pos = drone.getCurrentPosition();
this.internal_setTargetCoordinates(drone, drone_pos.x, drone_pos.y, 5);
};
DroneAaileFixeAPI.prototype.landed = function (drone) {
var drone_pos = drone.getCurrentPosition();
return Math.floor(drone_pos.z) < 10;
};
DroneAaileFixeAPI.prototype.exit = function () {
return;
};
DroneAaileFixeAPI.prototype.getInitialAltitude = function () {
return 0;
};
DroneAaileFixeAPI.prototype.getAltitudeAbs = function (altitude) {
return altitude;
};
DroneAaileFixeAPI.prototype.getMinHeight = function () {
return 0;
};
DroneAaileFixeAPI.prototype.getMaxHeight = function () {
return 800;
};
DroneAaileFixeAPI.prototype.getFlightParameters = function () {
return this._flight_parameters;
};
return DroneAaileFixeAPI;
}());
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_page_drone_simulator_droneaaailefixe.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>drone_simulator_droneaaailefixe_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Drone A Aile Fixe (API)</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1664807682.76</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1004.62583.63891.22220</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1670856495.99</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>empty</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1664807031.69</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_page_drone_simulator_dronedummy.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>drone_simulator_dronedummy_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Drone Dummy (API)</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1664807685.95</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1004.693.34749.46916</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1667230280.59</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>empty</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1664807319.81</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*global console*/
/*jslint nomen: true, indent: 2, maxlen: 80, white: true */
/**************************** DRONE LOG FOLLOWER ******************************/
var DroneLogAPI = /** @class */ (function () {
"use strict";
//** CONSTRUCTOR
function DroneLogAPI(gameManager, drone_info, flight_parameters, id) {
this._gameManager = gameManager;
this._mapManager = this._gameManager._mapManager;
this._drone_info = drone_info;
this._flight_parameters = flight_parameters;
}
/*
** Function called at start phase of the drone, just before onStart AI script
*/
DroneLogAPI.prototype.internal_start = function () {
function getLogEntries(log) {
var i, line_list = log.split('\n'), log_entry_list = [], log_entry,
log_header_found;
for (i = 0; i < line_list.length; i += 1) {
if (!log_header_found && !line_list[i].includes("timestamp;")) {
continue;
}
log_header_found = true;
if (line_list[i].indexOf("AMSL") >= 0 ||
!line_list[i].includes(";")) {
continue;
}
log_entry = line_list[i].trim();
if (log_entry) {
log_entry_list.push(log_entry);
}
}
return log_entry_list;
}
var log = this._drone_info.log_content, entry_1, entry_2, interval,
map_dict = this._mapManager.getMapInfo(),
min_height = 15, converted_log_point_list = [],
i, splitted_log_entry, x, y, position, lat, lon, height, timestamp,
time_offset = 1, log_entry_list = getLogEntries(log);
//XXX: Patch to determine log time format (if this is standarized, drop it)
if (log_entry_list[0] && log_entry_list[1]) {
entry_1 = log_entry_list[0].split(";");
entry_2 = log_entry_list[1].split(";");
interval = parseInt(entry_2[0], 10) - parseInt(entry_1[0], 10);
//if interval > 1' then timestamp is in microseconds
if (Math.floor(interval / 1000) > 60) {
time_offset = 1000;
}
}
for (i = 0; i < log_entry_list.length; i += 1) {
splitted_log_entry = log_entry_list[i].split(";");
timestamp = parseInt(splitted_log_entry[0], 10);
lat = parseFloat(splitted_log_entry[1]);
lon = parseFloat(splitted_log_entry[2]);
x = this._mapManager.longitudToX(lon, map_dict.map_size);
y = this._mapManager.latitudeToY(lat, map_dict.map_size);
position = this._mapManager.normalize(x, y, map_dict);
height = parseFloat(splitted_log_entry[4]);
if (height < min_height) {
height = min_height;
}
converted_log_point_list.push([position[0],
position[1],
height, timestamp / time_offset]);
}
this._flight_parameters.converted_log_point_list = converted_log_point_list;
};
/*
** Function called on every drone update, right after onUpdate AI script
*/
DroneLogAPI.prototype.internal_update = function () {
return;
};
DroneLogAPI.prototype.internal_setTargetCoordinates =
function (drone, x, y, z) {
var coordinates = this.processCoordinates(x, y, z);
coordinates.x -= drone._controlMesh.position.x;
coordinates.y -= drone._controlMesh.position.z;
coordinates.z -= drone._controlMesh.position.y;
drone.setDirection(coordinates.x, coordinates.y, coordinates.z);
drone.setAcceleration(drone._maxAcceleration);
return;
};
DroneLogAPI.prototype.sendMsg = function (msg, to) {
return;
};
DroneLogAPI.prototype.log = function (msg) {
console.log("API say : " + msg);
};
DroneLogAPI.prototype.getGameParameter = function (name) {
if (["gameTime", "map"].includes(name)) {
return this._gameManager.gameParameter[name];
}
};
DroneLogAPI.prototype.processCoordinates = function (x, y, z) {
if(isNaN(x) || isNaN(y) || isNaN(z)){
throw new Error('Target coordinates must be numbers');
}
return {
x: x,
y: y,
z: z
};
};
//Internal AI: drone follows the flight log points
DroneLogAPI.prototype.getDroneAI = function () {
return 'function distance(p1, p2) {' +
'var a = p1[0] - p2[0],' +
'b = p1[1] - p2[1];' +
'return Math.sqrt(a * a + b * b);' +
'}' +
'me.onStart = function() {' +
'console.log("DRONE LOG START!");' +
'if (!me.getFlightParameters())' +
'throw "DroneLog API must implement getFlightParameters";' +
'me.flightParameters = me.getFlightParameters();' +
'me.checkpoint_list = me.flightParameters.converted_log_point_list;' +
'if (me.checkpoint_list.length === 0)' +
'throw "flight log is empty or it does not contain valid entries";' +
'me.startTime = new Date();' +
'me.initTimestamp = me.checkpoint_list[0][3];' +
'me.setTargetCoordinates(me.checkpoint_list[0][0], ' +
'me.checkpoint_list[0][1], me.checkpoint_list[0][2]);' +
'me.last_checkpoint_reached = -1;' +
'me.setAcceleration(10);' +
'};' +
'me.onUpdate = function(timestamp) {' +
'var next_checkpoint = me.checkpoint_list' +
'[me.last_checkpoint_reached+1];' +
'if (distance([me.position.x, me.position.y], next_checkpoint) < 12) {' +
'me.going = false;' +
'var log_elapsed = next_checkpoint[3] - me.initTimestamp,' +
'time_elapsed = new Date() - me.startTime;' +
'if (time_elapsed < log_elapsed) {' +
'me.setDirection(0, 0, 0);' +
'return;' +
'}' +
'if (me.last_checkpoint_reached + 1 === ' +
'me.checkpoint_list.length - 1) {' +
'me.exit(0);' +
'return;' +
'}' +
'me.last_checkpoint_reached += 1;' +
'next_checkpoint = me.checkpoint_list[me.last_checkpoint_reached+1];' +
'me.setTargetCoordinates(next_checkpoint[0], next_checkpoint[1], ' +
'next_checkpoint[2]);' +
'} else {' +
'if (!me.going) {' +
'me.setTargetCoordinates(next_checkpoint[0], next_checkpoint[1], ' +
'next_checkpoint[2]);' +
'me.going = true;' +
'}' +
'}' +
'};';
};
DroneLogAPI.prototype.getCurrentPosition = function (x, y, z) {
return {
x: x,
y: y,
z: z
};
};
DroneLogAPI.prototype.set_loiter_mode = function (radius, drone) {
return;
};
DroneLogAPI.prototype.setAltitude = function (altitude, drone) {
return;
};
DroneLogAPI.prototype.getMaxSpeed = function () {
return 3000;
};
DroneLogAPI.prototype.getInitialAltitude = function () {
return 0;
};
DroneLogAPI.prototype.getAltitudeAbs = function () {
return 0;
};
DroneLogAPI.prototype.getMinHeight = function () {
return 0;
};
DroneLogAPI.prototype.getMaxHeight = function () {
return 220;
};
DroneLogAPI.prototype.triggerParachute = function (drone) {
return;
};
DroneLogAPI.prototype.getFlightParameters = function () {
return this._flight_parameters;
};
DroneLogAPI.prototype.exit = function (drone) {
return;
};
return DroneLogAPI;
}());
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_page_drone_simulator_dronelogfollower.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>drone_simulator_dronelogfollower_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Drone Log Follower (API)</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1664807683.96</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1004.33468.24270.48913</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1669196851.18</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>empty</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1664807270.82</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*global BABYLON, RSVP, console, DroneAaileFixeAPI, DroneLogAPI, document*/
/*jslint nomen: true, indent: 2, maxlen: 80, white: true, todo: true,
unparam: true */
var GAMEPARAMETERS = {};
/******************************* DRONE MANAGER ********************************/
var DroneManager = /** @class */ (function () {
"use strict";
//** CONSTRUCTOR
function DroneManager(scene, id, API) {
this._mesh = null;
this._controlMesh = null;
this._canPlay = false;
this._canCommunicate = false;
this._maxAcceleration = 0;
this._maxSpeed = 0;
this._speed = 0;
this._acceleration = 0;
this._direction = BABYLON.Vector3.Zero();
this._maxOrientation = Math.PI / 4;
this._scene = scene;
this._canUpdate = true;
this._id = id;
this._leader_id = 0;
this._API = API; // var API created on AI evel
// Create the control mesh
this._controlMesh = BABYLON.Mesh.CreateBox(
"droneControl_" + id, 0.01, this._scene);
this._controlMesh.isVisible = false;
this._controlMesh.computeWorldMatrix(true);
// Create the mesh from the drone prefab
this._mesh = DroneManager.Prefab.clone("drone_" + id, this._controlMesh);
this._mesh.position = BABYLON.Vector3.Zero();
this._mesh.isVisible = false;
this._mesh.computeWorldMatrix(true);
// Get the back collider
this._mesh.getChildMeshes().forEach(function (mesh) {
mesh.isVisible = true;
});
if (!DroneManager.PrefabBlueMat) {
DroneManager.PrefabBlueMat =
new BABYLON.StandardMaterial("blueTeamMat", scene);
DroneManager.PrefabBlueMat.diffuseTexture =
new BABYLON.Texture("assets/drone/drone_bleu.jpg", scene);
}
}
DroneManager.prototype._swapAxe = function (vector) {
return new BABYLON.Vector3(vector.x, vector.z, vector.y);
};
Object.defineProperty(DroneManager.prototype, "leader_id", {
get: function () { return this._leader_id; },
enumerable: true,
configurable: true
});
Object.defineProperty(DroneManager.prototype, "drone_dict", {
get: function () { return this._API._drone_dict_list; },
enumerable: true,
configurable: true
});
Object.defineProperty(DroneManager.prototype, "can_play", {
get: function () { return this._canPlay; },
enumerable: true,
configurable: true
});
Object.defineProperty(DroneManager.prototype, "id", {
get: function () { return this._id; },
enumerable: true,
configurable: true
});
Object.defineProperty(DroneManager.prototype, "colliderMesh", {
get: function () { return this._mesh; },
enumerable: true,
configurable: true
});
Object.defineProperty(DroneManager.prototype, "infosMesh", {
get: function () { return this._controlMesh; },
enumerable: true,
configurable: true
});
Object.defineProperty(DroneManager.prototype, "position", {
get: function () {
if (this._controlMesh !== null) {
return this._swapAxe(this._controlMesh.position);
}
return null;
},
enumerable: true,
configurable: true
});
Object.defineProperty(DroneManager.prototype, "speed", {
get: function () { return this._speed; },
enumerable: true,
configurable: true
});
Object.defineProperty(DroneManager.prototype, "direction", {
get: function () { return this._swapAxe(this._direction); },
enumerable: true,
configurable: true
});
Object.defineProperty(DroneManager.prototype, "worldDirection", {
get: function () {
return new BABYLON.Vector3(
this._direction.x, this._direction.y, this._direction.z);
},
enumerable: true,
configurable: true
});
DroneManager.prototype.internal_start = function () {
this._maxAcceleration = GAMEPARAMETERS.drone.maxAcceleration;
this._maxSpeed = this._API.getMaxSpeed();
this._API.internal_start();
this._canPlay = true;
this._canCommunicate = true;
try {
return this.onStart();
} catch (error) {
console.warn('Drone crashed on start due to error:', error);
this._internal_crash(error);
}
};
/**
* Set a target point to move
*/
DroneManager.prototype.setTargetCoordinates = function (x, y, z) {
if (!this._canPlay) {
return;
}
return this._API.internal_setTargetCoordinates(this, x, y, z);
};
DroneManager.prototype.internal_update = function (delta_time) {
var context = this, updateSpeed;
if (this._controlMesh) {
context._speed += context._acceleration * delta_time / 1000;
if (context._speed > context._maxSpeed) {
context._speed = context._maxSpeed;
}
if (context._speed < -context._maxSpeed) {
context._speed = -context._maxSpeed;
}
updateSpeed = context._speed * delta_time / 1000;
if (context._direction.x !== 0 ||
context._direction.y !== 0 ||
context._direction.z !== 0) {
context._controlMesh.position.addInPlace(new BABYLON.Vector3(
context._direction.x * updateSpeed,
context._direction.y * updateSpeed,
context._direction.z * updateSpeed));
}
context._controlMesh.computeWorldMatrix(true);
context._mesh.computeWorldMatrix(true);
if (context._canUpdate) {
context._canUpdate = false;
return new RSVP.Queue()
.push(function () {
return context.onUpdate(context._API._gameManager._game_duration);
})
.push(function () {
context._canUpdate = true;
}, function (error) {
console.warn('Drone crashed on update due to error:', error);
context._internal_crash(error);
})
.push(function () {
context._API.internal_update(context);
});
}
return;
}
return;
};
DroneManager.prototype._internal_crash = function (error) {
this._canCommunicate = false;
this._controlMesh = null;
this._mesh = null;
this._canPlay = false;
if (error) {
this._API._gameManager.logError(this, error);
}
this.onTouched();
};
DroneManager.prototype.setStartingPosition = function (x, y, z) {
if(isNaN(x) || isNaN(y) || isNaN(z)){
throw new Error('Position coordinates must be numbers');
}
if (!this._canPlay) {
if (z <= 0.05) {
z = 0.05;
}
this._controlMesh.position = new BABYLON.Vector3(x, z, y);
}
this._controlMesh.computeWorldMatrix(true);
this._mesh.computeWorldMatrix(true);
};
DroneManager.prototype.setAcceleration = function (factor) {
if (!this._canPlay) {
return;
}
if (isNaN(factor)){
throw new Error('Acceleration must be a number');
}
if (factor > this._maxAcceleration) {
factor = this._maxAcceleration;
}
this._acceleration = factor;
};
DroneManager.prototype.setDirection = function (x, y, z) {
if (!this._canPlay) {
return;
}
if (isNaN(x) || isNaN(y) || isNaN(z)) {
throw new Error('Direction coordinates must be numbers');
}
this._direction = new BABYLON.Vector3(x, z, y).normalize();
};
/**
* Send a message to drones
* @param msg The message to send
* @param id The targeted drone. -1 or nothing to broadcast
*/
DroneManager.prototype.sendMsg = function (msg, id) {
var _this = this;
if (!this._canCommunicate) {
return;
}
if (!id || id < 0) {
id = -1;
}
if (_this.infosMesh) {
return _this._API.sendMsg(JSON.parse(JSON.stringify(msg)), id);
}
};
/**
* Handle internal get msg
* @param msg The message to send
* @param id of the sender
*/
DroneManager.prototype.internal_getMsg = function (msg, id) {
return this._API.internal_getMsg(msg, id);
};
/** Perform a console.log with drone id + the message */
DroneManager.prototype.log = function (msg) { return msg; };
DroneManager.prototype.getMaxHeight = function () {
return this._API.getMaxHeight();
};
DroneManager.prototype.getMinHeight = function () {
return this._API.getMinHeight();
};
DroneManager.prototype.getInitialAltitude = function () {
return this._API.getInitialAltitude();
};
DroneManager.prototype.getAltitudeAbs = function () {
if (this._controlMesh) {
var altitude = this._controlMesh.position.y;
return this._API.getAltitudeAbs(altitude);
}
return null;
};
/**
* Get a game parameter by name
* @param name Name of the parameter to retrieve
*/
DroneManager.prototype.getGameParameter = function (name) {
if (!this._canCommunicate) {
return;
}
return this._API.getGameParameter(name);
};
DroneManager.prototype.getCurrentPosition = function () {
if (this._controlMesh) {
return this._API.getCurrentPosition(
this._controlMesh.position.x,
this._controlMesh.position.z,
this._controlMesh.position.y
);
}
return null;
};
DroneManager.prototype.setAltitude = function (altitude) {
if (!this._canPlay) {
return;
}
return this._API.setAltitude(altitude, this);
};
/**
* Make the drone loiter (circle with a set radius)
*/
DroneManager.prototype.loiter = function (radius) {
if (!this._canPlay) {
return;
}
this._API.set_loiter_mode(radius);
};
DroneManager.prototype.getFlightParameters = function () {
if (this._API.getFlightParameters) {
return this._API.getFlightParameters();
}
return null;
};
DroneManager.prototype.getYaw = function () {
return 0;
};
DroneManager.prototype.triggerParachute = function () {
return this._API.triggerParachute(this);
};
DroneManager.prototype.exit = function () {
this._internal_crash();
return this._API.exit();
};
DroneManager.prototype.landed = function () {
return this._API.landed(this);
};
/**
* Set the drone last checkpoint reached
* @param checkpoint to be set
*/
DroneManager.prototype.setCheckpoint = function (checkpoint) {
return checkpoint;
};
/**
* Function called on game start
*/
DroneManager.prototype.onStart = function () { return;};
/**
* Function called on game update
* @param timestamp The tic value
*/
DroneManager.prototype.onUpdate = function () { return;};
/**
* Function called when drone crashes
*/
DroneManager.prototype.onTouched = function () { return;};
/**
* Function called when a message is received
* @param msg The message
*/
DroneManager.prototype.onGetMsg = function () { return;};
return DroneManager;
}());
/******************************************************************************/
/******************************** MAP MANAGER *********************************/
var MapManager = /** @class */ (function () {
"use strict";
function calculateMapInfo(map, map_dict, initial_position) {
var max_width = map.latLonDistance([map_dict.min_lat, map_dict.min_lon],
[map_dict.min_lat, map_dict.max_lon]),
max_height = map.latLonDistance([map_dict.min_lat, map_dict.min_lon],
[map_dict.max_lat, map_dict.min_lon]),
map_size = Math.ceil(Math.max(max_width, max_height)) * 0.6,
map_info = {
"depth": map_size,
"height": map_dict.height,
"width": map_size,
"map_size": map_size,
"min_x": map.longitudToX(map_dict.min_lon, map_size),
"min_y": map.latitudeToY(map_dict.min_lat, map_size),
"max_x": map.longitudToX(map_dict.max_lon, map_size),
"max_y": map.latitudeToY(map_dict.max_lat, map_size),
"start_AMSL": map_dict.start_AMSL
},
position = map.normalize(
map.longitudToX(initial_position.longitude, map_size),
map.latitudeToY(initial_position.latitude, map_size),
map_info);
map_info.initial_position = {
"x": position[0],
"y": position[1],
"z": initial_position.z
};
return map_info;
}
//** CONSTRUCTOR
function MapManager(scene) {
var _this = this, max_sky, skybox, skyboxMat, largeGroundMat,
largeGroundBottom, width, depth, terrain, max;
_this.map_info = calculateMapInfo(_this, GAMEPARAMETERS.map,
GAMEPARAMETERS.initialPosition);
max = _this.map_info.width;
if (_this.map_info.depth > max) {
max = _this.map_info.depth;
}
if (_this.map_info.height > max) {
max = _this.map_info.height;
}
max = max < _this.map_info.depth ? _this.map_info.depth : max;
// Skybox
max_sky = (max * 10 < 20000) ? max * 10 : 20000;
skybox = BABYLON.Mesh.CreateBox("skyBox", max_sky, scene);
skybox.infiniteDistance = true;
skybox.renderingGroupId = 0;
skyboxMat = new BABYLON.StandardMaterial("skybox", scene);
skyboxMat.backFaceCulling = false;
skyboxMat.disableLighting = true;
skyboxMat.reflectionTexture = new BABYLON.CubeTexture("./assets/skybox/sky",
scene);
skyboxMat.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
skyboxMat.infiniteDistance = true;
skybox.material = skyboxMat;
// Plane from bottom
largeGroundMat = new BABYLON.StandardMaterial("largeGroundMat", scene);
largeGroundMat.specularColor = BABYLON.Color3.Black();
largeGroundMat.alpha = 0.4;
largeGroundBottom = BABYLON.Mesh.CreatePlane("largeGroundBottom",
max * 11, scene);
largeGroundBottom.position.y = -0.01;
largeGroundBottom.rotation.x = -Math.PI / 2;
largeGroundBottom.rotation.y = Math.PI;
largeGroundBottom.material = largeGroundMat;
// Camera
scene.activeCamera.upperRadiusLimit = max * 4;
// Terrain
// Give map some margin from the flight limits
width = _this.map_info.width * 1.10;
depth = _this.map_info.depth * 1.10;
//height = _this.map_info.height;
terrain = scene.getMeshByName("terrain001");
terrain.isVisible = true;
terrain.position = BABYLON.Vector3.Zero();
terrain.scaling = new BABYLON.Vector3(depth / 50000, depth / 50000,
width / 50000);
}
MapManager.prototype.getMapInfo = function () {
return this.map_info;
};
MapManager.prototype.longitudToX = function (lon, map_size) {
return (map_size / 360.0) * (180 + lon);
};
MapManager.prototype.latitudeToY = function (lat, map_size) {
return (map_size / 180.0) * (90 - lat);
};
MapManager.prototype.latLonDistance = function (c1, c2) {
var R = 6371e3,
q1 = c1[0] * Math.PI / 180,
q2 = c2[0] * Math.PI / 180,
dq = (c2[0] - c1[0]) * Math.PI / 180,
dl = (c2[1] - c1[1]) * Math.PI / 180,
a = Math.sin(dq / 2) * Math.sin(dq / 2) +
Math.cos(q1) * Math.cos(q2) *
Math.sin(dl / 2) * Math.sin(dl / 2),
c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
return R * c;
};
MapManager.prototype.normalize = function (x, y, map_dict) {
var n_x = (x - map_dict.min_x) / (map_dict.max_x - map_dict.min_x),
n_y = (y - map_dict.min_y) / (map_dict.max_y - map_dict.min_y);
return [n_x * 1000 - map_dict.width / 2,
n_y * 1000 - map_dict.depth / 2];
};
MapManager.prototype.convertToGeoCoordinates = function (x, y, z, map_dict) {
var lon = x + map_dict.width / 2,
lat = y + map_dict.depth / 2;
lon = lon / 1000;
lon = lon * (map_dict.max_x - map_dict.min_x) +
map_dict.min_x;
lon = lon / (map_dict.width / 360.0) - 180;
lat = lat / 1000;
lat = lat * (map_dict.max_y - map_dict.min_y) +
map_dict.min_y;
lat = 90 - lat / (map_dict.depth / 180.0);
return {
x: lat,
y: lon,
z: z
};
};
return MapManager;
}());
/******************************************************************************/
/******************************** GAME MANAGER ********************************/
var GameManager = /** @class */ (function () {
"use strict";
// *** CONSTRUCTOR ***
function GameManager(canvas, game_parameters_json) {
var drone, header_list;
this._canvas = canvas;
this._scene = null;
this._engine = null;
this._droneList = [];
this._canUpdate = false;
this._max_step_animation_frame = game_parameters_json.simulation_speed;
if (!this._max_step_animation_frame) { this._max_step_animation_frame = 5; }
Object.assign(GAMEPARAMETERS, game_parameters_json);
this._game_parameters_json = game_parameters_json;
this._map_swapped = false;
this._log_count = [];
this._flight_log = [];
if (GAMEPARAMETERS.draw_flight_path) {
this._last_position_drawn = [];
this._trace_objects_per_drone = [];
header_list = ["timestamp;", "latitude;", "longitude;", "AMSL (m);",
"rel altitude (m);", "pitch (°);", "roll(°);",
"yaw(°);", "air speed (m/s);", "throttle(%);",
"climb rate(m/s)"];
for (drone = 0; drone < GAMEPARAMETERS.droneList.length; drone+=1) {
this._flight_log[drone] = [];
this._flight_log[drone].push(header_list);
this._log_count[drone] = 0;
this._last_position_drawn[drone] = null;
this._trace_objects_per_drone[drone] = [];
}
this._colors = [
new BABYLON.Color3(255, 165, 0),
new BABYLON.Color3(0, 0, 255),
new BABYLON.Color3(255, 0, 0),
new BABYLON.Color3(0, 255, 0),
new BABYLON.Color3(0, 128, 128),
new BABYLON.Color3(0, 0, 0),
new BABYLON.Color3(255, 255, 255),
new BABYLON.Color3(128, 128, 0),
new BABYLON.Color3(128, 0, 128),
new BABYLON.Color3(0, 0, 128)
];
}
this.APIs_dict = {
DroneAaileFixeAPI: DroneAaileFixeAPI,
DroneLogAPI: DroneLogAPI
};
}
Object.defineProperty(GameManager.prototype, "gameParameter", {
get: function () {
return this._gameParameter;
},
enumerable: true,
configurable: true
});
GameManager.prototype.run = function () {
var gadget = this;
return gadget._init()
.push(function () {
return gadget._flight_log;
});
};
GameManager.prototype.update = function () {
// time delta means that drone are updated every virtual second
// This is fixed and must not be modified
// otherwise, it will lead to different scenario results
// (as drone calculations may be triggered less often)
var _this = this,
TIME_DELTA = 1000 / 60;
// init the value on the first step
_this.waiting_update_count = _this._max_step_animation_frame;
function triggerUpdateIfPossible() {
if ((_this._canUpdate) && (_this.ongoing_update_promise === null) &&
(0 < _this.waiting_update_count)) {
_this.ongoing_update_promise = _this._update(
TIME_DELTA, (_this.waiting_update_count === 1))
.push(function () {
_this.waiting_update_count -= 1;
_this.ongoing_update_promise = null;
triggerUpdateIfPossible();
})
.push(undefined, function(error) {
console.log("ERROR on update:", error);
console.log("rejecting finish_deferred promise...");
_this.finish_deferred.reject.bind(_this.finish_deferred);
});
}
}
triggerUpdateIfPossible();
};
GameManager.prototype.delay = function (callback, millisecond) {
this._delayed_defer_list.push([callback, millisecond]);
};
GameManager.prototype.logError = function (drone, error) {
this._flight_log[drone._id].push(error.stack);
};
GameManager.prototype._checkDroneRules = function (drone) {
//TODO move this to API methods
if (drone.getCurrentPosition()) {
return drone.getCurrentPosition().z > 1;
}
return false;
};
GameManager.prototype._update = function (delta_time) {
var _this = this,
queue = new RSVP.Queue(),
i;
this._updateTimeAndLog(delta_time);
// trigger all deferred calls if it is time
for (i = _this._delayed_defer_list.length - 1; 0 <= i; i -= 1) {
_this._delayed_defer_list[i][1] =
_this._delayed_defer_list[i][1] - delta_time;
if (_this._delayed_defer_list[i][1] <= 0) {
queue.push(_this._delayed_defer_list[i][0]);
_this._delayed_defer_list.splice(i, 1);
}
}
this._droneList.forEach(function (drone) {
queue.push(function () {
drone._tick += 1;
if (_this._checkDroneRules(drone)) {
return drone.internal_update(delta_time);
}
//TODO error must be defined by the api?
drone._internal_crash('Drone touched the floor');
});
});
return queue
.push(function () {
if (_this._timeOut()) {
console.log("TIMEOUT!");
return _this._finish();
}
if (_this._allDronesFinished()) {
console.log("ALL DRONES EXITED");
return _this._finish();
}
});
};
GameManager.prototype._updateTimeAndLog =
function (delta_time) {
this._game_duration += delta_time;
var seconds = Math.floor(this._game_duration / 1000), drone,
drone_position, map_info, geo_coordinates, position_obj, material, color;
if (GAMEPARAMETERS.log_drone_flight || GAMEPARAMETERS.draw_flight_path) {
for (drone = 0; drone < GAMEPARAMETERS.droneList.length; drone+=1) {
if (this._droneList[drone].can_play) {
drone_position = this._droneList[drone].position;
if (GAMEPARAMETERS.log_drone_flight) {
map_info = this._mapManager.getMapInfo();
if (this._log_count[drone] === 0 ||
this._game_duration / this._log_count[drone] > 1) {
this._log_count[drone] += GAMEPARAMETERS.log_interval_time;
geo_coordinates = this._mapManager.convertToGeoCoordinates(
drone_position.x, drone_position.y, drone_position.z, map_info);
this._flight_log[drone].push(
[this._game_duration, geo_coordinates.x, geo_coordinates.y,
map_info.start_AMSL + drone_position.z, drone_position.z]);
}
}
if (GAMEPARAMETERS.draw_flight_path) {
//draw drone position every some seconds
if (seconds - this._last_position_drawn[drone] > 0.2) {
this._last_position_drawn[drone] = seconds;
position_obj = BABYLON.MeshBuilder.CreateBox("obs_" + seconds,
{ size: 1 },
this._scene);
position_obj.position = new BABYLON.Vector3(drone_position.x,
drone_position.z,
drone_position.y);
position_obj.scaling = new BABYLON.Vector3(4, 4, 4);
material = new BABYLON.StandardMaterial(this._scene);
material.alpha = 1;
color = new BABYLON.Color3(255, 0, 0);
if (this._colors[drone]) {
color = this._colors[drone];
}
material.diffuseColor = color;
position_obj.material = material;
if (GAMEPARAMETERS.temp_flight_path) {
if (this._trace_objects_per_drone[drone].length === 10) {
this._trace_objects_per_drone[drone][0].dispose();
this._trace_objects_per_drone[drone].splice(0, 1);
}
this._trace_objects_per_drone[drone].push(position_obj);
}
}
}
}
}
}
};
GameManager.prototype._timeOut = function () {
var seconds = Math.floor(this._game_duration / 1000);
return this._totalTime - seconds <= 0;
};
GameManager.prototype._allDronesFinished = function () {
var finish = true;
this._droneList.forEach(function (drone) {
if (drone.can_play) {
finish = false;
}
});
return finish;
};
GameManager.prototype._finish = function () {
console.log("Simulation finished");
this._canUpdate = false;
return this.finish_deferred.resolve();
};
GameManager.prototype._dispose = function () {
if (this._scene) {
this._scene.dispose();
}
};
GameManager.prototype._init = function () {
var _this = this, canvas, hemi_north, hemi_south, camera, on3DmodelsReady;
canvas = this._canvas;
this._delayed_defer_list = [];
this._dispose();
// Create the Babylon engine
this._engine = new BABYLON.Engine(canvas, true, {
//options for event handling
stencil: true,
disableWebGL2Support: false,
audioEngine: false
});
this._scene = new BABYLON.Scene(this._engine);
this._scene.clearColor = new BABYLON.Color4(88/255,171/255,217/255,255/255);
//removed for event handling
//this._engine.enableOfflineSupport = false;
//this._scene.collisionsEnabled = true;
// Lights
hemi_north = new BABYLON.HemisphericLight(
"hemiN", new BABYLON.Vector3(1, -1, 1), this._scene);
hemi_north.intensity = 0.75;
hemi_south = new BABYLON.HemisphericLight(
"hemiS", new BABYLON.Vector3(-1, 1, -1), this._scene);
hemi_south.intensity = 0.75;
camera = new BABYLON.ArcRotateCamera("camera", 0, 1.25, 800,
BABYLON.Vector3.Zero(), this._scene);
camera.wheelPrecision = 10;
//changed for event handling
//camera.attachControl(this._scene.getEngine().getRenderingCanvas()); //orig
camera.attachControl(canvas, true);
camera.maxz = 40000;
this._camera = camera;
// Render loop
this._engine.runRenderLoop(function () {
_this._scene.render();
});
// -------------------------------- SIMULATION - Prepare API, Map and Teams
on3DmodelsReady = function (ctx) {
// Get the game parameters
if (!ctx._map_swapped) {
GAMEPARAMETERS = ctx._getGameParameter();
ctx._map_swapped = true;
}
// Init the map
_this._mapManager = new MapManager(ctx._scene);
ctx._spawnDrones(_this._mapManager.map_info.initial_position,
GAMEPARAMETERS.droneList, ctx);
// Hide the drone prefab
DroneManager.Prefab.isVisible = false;
//Hack to make advanced texture work
var documentTmp = document, advancedTexture, count,
controlMesh, rect, label;
document = undefined;
advancedTexture = BABYLON.GUI.AdvancedDynamicTexture
.CreateFullscreenUI("UI", true, ctx._scene);
document = documentTmp;
for (count = 0; count < GAMEPARAMETERS.droneList.length; count+=1) {
controlMesh = ctx._droneList[count].infosMesh;
rect = new BABYLON.GUI.Rectangle();
rect.width = "10px";
rect.height = "10px";
rect.cornerRadius = 20;
rect.color = "white";
rect.thickness = 0.5;
rect.background = "grey";
advancedTexture.addControl(rect);
label = new BABYLON.GUI.TextBlock();
label.text = count.toString();
label.fontSize = 7;
rect.addControl(label);
rect.linkWithMesh(controlMesh);
rect.linkOffsetY = 0;
}
console.log("on3DmodelsReady - advaced textures added");
return ctx;
};
// ----------------------------------- SIMULATION - Load 3D models
return new RSVP.Queue()
.push(function () {
return new RSVP.Promise(function (resolve) {
return _this._load3DModel(resolve);
});
})
.push(function () {
on3DmodelsReady(_this);
var result = new RSVP.Queue();
result.push(function () {
return RSVP.delay(1000);
});
return result.push(_this._start.bind(_this));
});
};
GameManager.prototype._start = function () {
var _this = this, promise_list;
_this.waiting_update_count = 0;
_this.ongoing_update_promise = null;
_this.finish_deferred = RSVP.defer();
console.log("Simulation started.");
this._game_duration = 0;
this._totalTime = GAMEPARAMETERS.gameTime;
return new RSVP.Queue()
.push(function () {
promise_list = [];
_this._droneList.forEach(function (drone) {
drone._tick = 0;
promise_list.push(drone.internal_start());
});
return RSVP.all(promise_list);
})
.push(function () {
_this._canUpdate = true;
return _this.finish_deferred.promise;
});
};
GameManager.prototype._load3DModel = function (callback) {
var _this = this, droneTask, mapTask,
assetManager = new BABYLON.AssetsManager(this._scene);
assetManager.useDefaultLoadingScreen = true;
// DRONE
droneTask = assetManager.addMeshTask("loadingDrone", "", "assets/drone/",
"drone.babylon");
droneTask.onSuccess = function (task) {
task.loadedMeshes.forEach(function (mesh) {
mesh.isPickable = false;
mesh.isVisible = false;
});
DroneManager.Prefab = _this._scene.getMeshByName("Dummy_Drone");
DroneManager.Prefab.scaling = new BABYLON.Vector3(0.006, 0.006, 0.006);
DroneManager.Prefab.position = new BABYLON.Vector3(0, -5, 0);
};
droneTask.onError = function () {
console.log("Error loading 3D model for Drone");
};
// MAP
mapTask = assetManager.addMeshTask("loadingMap", "", "assets/map/",
"map.babylon");
mapTask.onSuccess = function (task) {
task.loadedMeshes.forEach(function (mesh) {
mesh.isPickable = false;
mesh.isVisible = false;
});
};
mapTask.onError = function () {
console.log("Error loading 3D model for Map");
};
assetManager.onFinish = function () {
return callback();
};
assetManager.load();
};
GameManager.prototype._getGameParameter = function () {
var parameter = {};
Object.assign(parameter, this._game_parameters_json);
this._gameParameter = {};
Object.assign(this._gameParameter, this._game_parameters_json);
return parameter;
};
GameManager.prototype._spawnDrones = function (center, drone_list, ctx) {
var position, i, position_list = [], max_collision = 10 * drone_list.length,
collision_nb = 0, api;
function checkCollision(position, list) {
var el;
for (el = 0; el < list.length; el += 1) {
if (position.equalsWithEpsilon(list[el], 0.5)) {
return true;
}
}
return false;
}
function spawnDrone(x, y, z, index, drone_info, api) {
var default_drone_AI = api.getDroneAI(), code, base, code_eval;
if (default_drone_AI) {
code = default_drone_AI;
} else {
code = drone_info.script_content;
}
code_eval = "let drone = new DroneManager(ctx._scene, " +
index + ', api);' +
"let droneMe = function(NativeDate, me, Math, window, DroneManager," +
" GameManager, DroneLogAPI, DroneAaileFixeAPI, BABYLON, " +
"GAMEPARAMETERS) {" +
"var start_time = (new Date(2070, 0, 0, 0, 0, 0, 0)).getTime();" +
"Date.now = function () {" +
"return start_time + drone._tick * 1000/60;}; " +
"function Date() {if (!(this instanceof Date)) " +
"{throw new Error('Missing new operator');} " +
"if (arguments.length === 0) {return new NativeDate(Date.now());} " +
"else {return new NativeDate(...arguments);}}";
// Simple desactivation of direct access of all globals
// It is still accessible in reality, but it will me more visible
// if people really access them
if (x !== null && y !== null && z !== null) {
code_eval += "me.setStartingPosition(" + x + ", " + y + ", " + z + ");";
}
base = code_eval;
code_eval += code + "}; droneMe(Date, drone, Math, {});";
base += "};ctx._droneList.push(drone)";
code_eval += "ctx._droneList.push(drone)";
/*jslint evil: true*/
try {
eval(code_eval);
}
catch (error) {
eval(base);
}
/*jslint evil: false*/
}
function randomSpherePoint(x0, y0, z0, rx0, ry0, rz0) {
var u = Math.random(), v = Math.random(),
rx = Math.random() * rx0, ry = Math.random() * ry0,
rz = Math.random() * rz0, theta = 2 * Math.PI * u,
phi = Math.acos(2 * v - 1),
x = x0 + (rx * Math.sin(phi) * Math.cos(theta)),
y = y0 + (ry * Math.sin(phi) * Math.sin(theta)),
z = z0 + (rz * Math.cos(phi));
return new BABYLON.Vector3(x, y, z);
}
for (i = 0; i < drone_list.length; i += 1) {
position = randomSpherePoint(center.x + i, center.y + i, center.z + i,
0, 0, 0);
if (checkCollision(position, position_list)) {
collision_nb += 1;
if (collision_nb < max_collision) {
i -= 1;
}
}
else {
position_list.push(position);
api = new this.APIs_dict[drone_list[i].type](
this, drone_list[i], GAMEPARAMETERS, i);
spawnDrone(position.x, position.y, position.z, i,
drone_list[i], api);
}
}
};
return GameManager;
}());
/******************************************************************************/
/*********************** DRONE SIMULATOR LOGIC ********************************/
var runGame, updateGame;
(function () {
"use strict";
console.log('game logic');
var game_manager_instance;
runGame = function (canvas, game_parameters_json) {
if (!game_manager_instance) {
game_manager_instance = new GameManager(canvas, game_parameters_json);
}
return game_manager_instance.run();
};
updateGame = function () {
if (game_manager_instance) {
return game_manager_instance.update();
}
};
/*// Resize canvas on window resize
window.addEventListener('resize', function () {
engine.resize();
});*/
}(this));
/******************************************************************************/
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_page_drone_simulator_logic.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>drone_simulator_logic_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Drone Logic</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1662477480.35</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1004.32349.9544.44100</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1670852474.69</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>empty</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1662477378.07</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<!DOCTYPE html>
<html>
<!--
data-i18n=Others
data-i18n=Tools
-->
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Drone Simulator Log Page</title>
<link rel="http://www.renderjs.org/rel/interface" href="interface_page.html">
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="jiodev.js" type="text/javascript"></script>
<script src="gadget_global.js" type="text/javascript"></script>
<script src="domsugar.js" type="text/javascript"></script>
<script src="gadget_erp5_page_drone_simulator_log_page.js" type="text/javascript"></script>
</head>
<body>
<form>
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="form_view"
data-gadget-sandbox="public">
</div>
<input name="action_run" class="dialogconfirm" type="submit" value="Run" style="margin-bottom: 20pt;margin-top: 20pt;">
<span id="distance"></span>
<div class="simulator_div"></div>
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="form_view_babylonjs"
data-gadget-sandbox="public">
</div>
</form>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Page" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_page_drone_simulator_log_page.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ojs_drone_simulator_log_page_html</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Page</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Drone Simulator Log Page</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1664996478.18</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1004.22391.16038.6980</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1671109341.4</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1664996138.79</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
(function (window, RSVP, rJS, domsugar, document, Blob) {
"use strict";
var SIMULATION_SPEED = 200,
SIMULATION_TIME = 2000,
DRAW = true,
LOG = false,
DRONE_LIST = [
{"id": 0, "type": "DroneLogAPI", "log_content": ""},
{"id": 1, "type": "DroneLogAPI", "log_content": ""}
],
WIDTH = 680,
HEIGHT = 340,
LOGIC_FILE_LIST = [
'gadget_erp5_page_drone_simulator_logic.js',
'gadget_erp5_page_drone_simulator_droneaaailefixe.js',
'gadget_erp5_page_drone_simulator_dronelogfollower.js'
];
rJS(window)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("notifySubmitted", "notifySubmitted")
.onEvent('submit', function () {
var gadget = this;
return gadget.getDeclaredGadget('form_view')
.push(function (form_gadget) {
return form_gadget.getContent();
})
.push(function (input) {
gadget.runGame(input);
});
})
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('input[type="submit"]').click();
})
.declareMethod('render', function render() {
var gadget = this, query;
return gadget.getDeclaredGadget('form_view')
.push(function (form_gadget) {
return form_gadget.render({
erp5_document: {
"_embedded": {"_view": {
"my_simulation_speed": {
"description": "",
"title": "Simulation Speed",
"default": SIMULATION_SPEED,
"css_class": "",
"required": 0,
"editable": 1,
"key": "simulation_speed",
"hidden": 0,
"type": "StringField"
},
"my_log_1": {
"description": "Log 1 content",
"title": "",
"default": DRONE_LIST[0].log_content,
"css_class": "",
"required": 1,
"editable": 1,
"key": "log_1",
"hidden": 0,
"type": "TextAreaField"
},
"my_log_2": {
"description": "Log 2 content",
"title": "",
"default": DRONE_LIST[1].log_content,
"css_class": "",
"required": 1,
"editable": 1,
"key": "log_2",
"hidden": 0,
"type": "TextAreaField"
}
}},
"_links": {
"type": {
name: ""
}
}
},
form_definition: {
group_list: [[
"left",
[["my_log_1"], ["my_simulation_speed"]]
],[
"right",
[["my_log_2"]]
]]
}
});
})
.push(function () {
return gadget.updateHeader({
page_title: 'Drone Simulator - Run flight logs',
page_icon: 'puzzle-piece'
});
});
})
.declareJob('runGame', function runGame(options) {
var gadget = this, simulator, log_1_entry_list, log_2_entry_list;
function latLonDistance(c1, c2) {
var R = 6371e3,
q1 = c1[0] * Math.PI / 180,
q2 = c2[0] * Math.PI / 180,
dq = (c2[0] - c1[0]) * Math.PI / 180,
dl = (c2[1] - c1[1]) * Math.PI / 180,
a = Math.sin(dq / 2) * Math.sin(dq / 2) +
Math.cos(q1) * Math.cos(q2) *
Math.sin(dl / 2) * Math.sin(dl / 2),
c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
return R * c;
}
function getLogEntries(log) {
var i, line_list = log.split('\n'), log_entry_list = [], log_entry,
log_header_found;
for (i = 0; i < line_list.length; i += 1) {
if (!log_header_found && !line_list[i].includes("timestamp;")) {
continue;
} else {
log_header_found = true;
}
if (line_list[i].indexOf("AMSL") >= 0 ||
!line_list[i].includes(";")) {
continue;
}
log_entry = line_list[i].trim();
if (log_entry) {
log_entry = log_entry.split(';');
log_entry_list.push(log_entry);
}
}
return log_entry_list;
}
function averageLogDistance(a, b, z) {
function distance3D(p1, p2) {
return Math.sqrt(Math.pow(p1[0] - p2[0], 2) +
Math.pow(p1[1] - p2[1], 2) +
Math.pow(p1[2] - p2[2], 2));
}
var i, sum = 0, point_a, point_b, penalization = 0, length;
for (i = 0; i < a.length; i++) {
if (b[i]) {
point_a = [a[i][1], a[i][1]];
point_b = [b[i][1], b[i][1]];
if (z) {
sum += distance3D(point_a, point_b);
} else {
var d = latLonDistance(point_a, point_b);
sum += d;
}
}
}
length = Math.min(a.length, b.length);
if (Math.abs(a.length - b.length) > 50) {
//penalize very different logs
penalization = Math.abs(a.length - b.length);
}
return sum / length + penalization;
}
log_1_entry_list = getLogEntries(options.log_1);
log_2_entry_list = getLogEntries(options.log_2);
var span = document.querySelector('#distance'),
dist = averageLogDistance(log_1_entry_list, log_2_entry_list, false);
if (isNaN(dist)) {
return gadget.notifySubmitted({message: 'Invalid log content', status: 'error'});
}
span.textContent = 'Average flights distance: ' +
Math.round(dist * 100) / 100;
var fragment = gadget.element.querySelector('.simulator_div');
fragment = domsugar(gadget.element.querySelector('.simulator_div'),
[domsugar('div')]).firstElementChild;
DRONE_LIST[0].log_content = options.log_1;
DRONE_LIST[1].log_content = options.log_2;
function generateMapInfo(list_1, list_2) {
var all = list_1.concat(list_2), i,
min_lat = 999, min_lon = 999,
max_lat = 0, max_lon = 0;
for (i = 0; i < all.length; i+=1) {
if (all[i][1] < min_lat) min_lat = all[i][1];
if (all[i][1] > max_lat) max_lat = all[i][1];
if (all[i][2] < min_lon) min_lon = all[i][2];
if (all[i][2] > max_lon) max_lon = all[i][2];
}
return {
"min_lat": min_lat,
"max_lat": max_lat,
"min_lon": min_lon,
"max_lon": max_lon,
"start_AMSL": all[0][3] - all[0][4],
"init_pos_lat": all[0][1],
"init_pos_lon": all[0][2],
"init_pos_z": all[0][4]
};
}
var map_info = generateMapInfo(log_1_entry_list, log_2_entry_list);
options.min_lat = map_info.min_lat;
options.max_lat = map_info.max_lat;
options.min_lon = map_info.min_lon;
options.max_lon = map_info.max_lon;
options.map_height = 100;
options.start_AMSL = map_info.start_AMSL;
options.init_pos_lon = map_info.init_pos_lon;
options.init_pos_lat = map_info.init_pos_lat;
options.init_pos_z = map_info.init_pos_z;
var game_parameters_json = {
"drone": {
"maxAcceleration": 1,
"maxSpeed": 1
},
"gameTime": SIMULATION_TIME,
"simulation_speed": parseFloat(options.simulation_speed),
"latency": {
"information": 0,
"communication": 0
},
"map": {
"min_lat": parseFloat(options.min_lat),
"max_lat": parseFloat(options.max_lat),
"min_lon": parseFloat(options.min_lon),
"max_lon": parseFloat(options.max_lon),
"height": parseFloat(options.map_height),
"start_AMSL": parseFloat(options.start_AMSL)
},
"initialPosition": {
"longitude": parseFloat(options.init_pos_lon),
"latitude": parseFloat(options.init_pos_lat),
"z": parseFloat(options.init_pos_z)
},
"draw_flight_path": DRAW,
"log_drone_flight": LOG,
"temp_flight_path": false,
"droneList": DRONE_LIST
};
return gadget.declareGadget("babylonjs.gadget.html",
{element: fragment, scope: 'simulator'})
.push(function () {
return gadget.getDeclaredGadget('form_view_babylonjs');
})
.push(function (form_gadget) {
return form_gadget.render({
erp5_document: {
"_embedded": {"_view": {
"my_babylonjs": {
"default": "",
"css_class": "",
"required": 0,
"editable": 1,
"key": "babylonjs",
"hidden": 0,
"type": "GadgetField",
"url": "babylonjs.gadget.html",
"sandbox": "public",
"renderjs_extra": '{"autorun": false, "width": ' + WIDTH + ', ' +
'"height": ' + HEIGHT + ', ' +
'"logic_file_list": ' + JSON.stringify(LOGIC_FILE_LIST) + ', ' +
'"game_parameters": ' + JSON.stringify(game_parameters_json) +
'}'
}
}},
"_links": {
"type": {
name: ""
}
}
},
form_definition: {
group_list: [[
"bottom",
[["my_babylonjs"]]
]]
}
});
})
.push(function () {
return gadget.getDeclaredGadget('form_view_babylonjs');
})
.push(function (form_gadget) {
return form_gadget.getContent();
});
});
}(window, RSVP, rJS, domsugar, document, Blob));
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_page_drone_simulator_log_page.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ojs_drone_simulator_log_page_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Drone Simulator Log Page JS</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1664996481.12</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1005.1310.34623.11861</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1671112620.77</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1664996144.35</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Drone Simulator Panel</title>
<link rel="http://www.renderjs.org/rel/interface" href="interface_panel.html">
<!--
data-i18n=Editable
data-i18n=Home
data-i18n=Modules
data-i18n=Worklists
data-i18n=History
data-i18n=Search
data-i18n=Logout
data-i18n=Views
data-i18n=Workflows
data-i18n=Actions
data-i18n=Jumps
data-i18n=Global
data-i18n=My Account
-->
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="domsugar.js" type="text/javascript"></script>
<script src="jiodev.js" type="text/javascript"></script>
<script src="gadget_global.js" type="text/javascript"></script>
<script src="gadget_erp5_global.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_erp5_panel_drone_simulator.js" type="text/javascript"></script>
</head>
<body>
<div>
<div data-role="header">
<div class="ui-btn-left">
<div class="ui-controlgroup-controls">
<button data-i18n="Close" class="ui-btn-icon-notext ui-icon-delete">Close</button>
</div>
</div>
</div>
<div>
<ul></ul>
<dl></dl>
</div>
</div>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Page" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_panel_drone_simulator.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ojs_drone_simulator_panel_html</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Page</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Drone Simulator Panel</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1665152561.44</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1003.31623.36971.4198</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1667236194.07</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1665152251.44</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*jslint nomen: true, indent: 2, maxerr: 3, unparam: true */
/*global window, document, rJS, RSVP, Node, asBoolean , ensureArray,
mergeGlobalActionWithRawActionList, domsugar*/
(function (window, document, rJS, RSVP, Node, asBoolean, ensureArray,
mergeGlobalActionWithRawActionList, domsugar) {
"use strict";
function appendDt(fragment, dt_title, dt_icon,
action_list, href_list, index) {
var element_list = [
domsugar('dt', {
text: dt_title,
'class': 'ui-btn-icon-left ui-icon-' + dt_icon
})
],
i;
for (i = 0; i < action_list.length; i += 1) {
element_list.push(domsugar('dd', {'class': 'document-listview'}, [
domsugar('a', {
href: href_list[index + i],
text: action_list[i].title,
'class': action_list[i].class_name || null
})
]));
}
fragment.appendChild(domsugar(null, element_list));
}
rJS(window)
.setState({
visible: false
})
//////////////////////////////////////////////
// acquired method
//////////////////////////////////////////////
.declareAcquiredMethod("getUrlForList", "getUrlForList")
.declareAcquiredMethod("getTranslationList", "getTranslationList")
.declareAcquiredMethod("getTranslationDict", "getTranslationDict")
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("getUrlParameter", "getUrlParameter")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod('toggle', function toggle() {
return this.changeState({
visible: !this.state.visible
});
})
.declareMethod('close', function close() {
return this.changeState({
visible: false
});
})
.declareMethod('render', function render(options) {
var erp5_document = options.erp5_document,
jio_key = options.jio_key,
view = options.view,
jump_view = options.jump_view,
visible = options.visible,
extra_menu_list = options.extra_menu_list,
display_workflow_list,
context = this,
workflow_list,
group_mapping,
view_list,
action_list,
clone_list,
jump_list;
if (visible === undefined) {
visible = context.state.visible;
}
if (options.display_workflow_list === undefined) {
display_workflow_list = true;
} else {
display_workflow_list = asBoolean(options.display_workflow_list);
}
if ((erp5_document !== undefined) && (jio_key !== undefined)) {
group_mapping = mergeGlobalActionWithRawActionList(jio_key,
view, jump_view,
erp5_document._links, [
"action_workflow",
"action_object_view", [
"action_object_jio_action",
"action_object_jio_button",
"action_object_jio_fast_input"
],
"action_object_clone_action",
"action_object_jio_jump"
], {
"action_object_jio_action": "display_dialog_with_history",
"action_object_clone_action": "display_dialog_with_history"
}, {
"action_object_clone_action": true
});
workflow_list = JSON.stringify(group_mapping.action_workflow);
view_list = JSON.stringify(group_mapping.action_object_view);
action_list = JSON.stringify(group_mapping.action_object_jio_action);
clone_list = JSON.stringify(group_mapping.action_object_clone_action);
jump_list = JSON.stringify(group_mapping.action_object_jio_jump);
}
if (extra_menu_list !== undefined) {
extra_menu_list = JSON.stringify(extra_menu_list);
}
return context.getUrlParameter('editable')
.push(function (editable) {
return context.changeState({
visible: visible,
display_workflow_list: display_workflow_list,
workflow_list: workflow_list,
view_list: view_list,
action_list: action_list,
clone_list: clone_list,
jump_list: jump_list,
global: true,
jio_key: jio_key,
view: view,
jump_view: jump_view,
editable: asBoolean(options.editable) || asBoolean(editable) || false,
extra_menu_list: extra_menu_list
});
});
})
.onStateChange(function onStateChange(modification_dict) {
var i,
gadget = this,
workflow_list,
view_list,
action_list,
clone_list,
jump_list,
dl_fragment,
queue = new RSVP.Queue();
if (modification_dict.hasOwnProperty("visible")) {
if (this.state.visible) {
if (!this.element.classList.contains('visible')) {
this.element.classList.toggle('visible');
}
} else {
if (this.element.classList.contains('visible')) {
this.element.classList.remove('visible');
}
}
}
if (modification_dict.hasOwnProperty("editable")) {
queue
// Update the global links
.push(function () {
return RSVP.hash({
url_list: gadget.getUrlForList([
{command: 'display', options: {page: "drone_simulator_script_page"}},
{command: 'display', options: {page: "drone_simulator_log_page"}}
]),
translation_list: gadget.getTranslationList([
'Editable',
'Edit & Run Script',
'Run Logs'
])
});
})
.push(function (result_dict) {
var editable_value = [],
element_list = [],
icon_and_key_list = [
'edit', null,
'puzzle-piece', null
];
for (i = 0; i < result_dict.url_list.length; i += 1) {
element_list.push(domsugar('li', [
domsugar('a', {
href: result_dict.url_list[i],
'class': 'ui-btn-icon-left ui-icon-' + icon_and_key_list[2 * i],
accesskey: icon_and_key_list[2 * i + 1],
text: result_dict.translation_list[i + 1]
})
]));
}
domsugar(gadget.element.querySelector("ul"),
[domsugar(null, element_list)]);
});
}
if ((this.state.global === true) &&
(modification_dict.hasOwnProperty("editable") ||
modification_dict.hasOwnProperty("view") ||
modification_dict.hasOwnProperty("jump_view") ||
modification_dict.hasOwnProperty("workflow_list") ||
modification_dict.hasOwnProperty("action_list") ||
modification_dict.hasOwnProperty("clone_list") ||
modification_dict.hasOwnProperty("jump_list") ||
modification_dict.hasOwnProperty("jio_key") ||
modification_dict.hasOwnProperty("view_list") ||
modification_dict.hasOwnProperty("extra_menu_list"))) {
dl_fragment = document.createDocumentFragment();
gadget.element.querySelector("dl").textContent = '';
if (this.state.view_list !== undefined) {
queue
.push(function () {
var parameter_list = [];
view_list = JSON.parse(gadget.state.view_list);
action_list = JSON.parse(gadget.state.action_list);
clone_list = JSON.parse(gadget.state.clone_list);
jump_list = JSON.parse(gadget.state.jump_list);
workflow_list = JSON.parse(gadget.state.workflow_list);
parameter_list = view_list.concat(workflow_list).concat(
action_list
).concat(clone_list).concat(jump_list).map(function (options) {
return options.url_kw;
});
return RSVP.hash({
url_list: gadget.getUrlForList(parameter_list),
translation_dict: gadget.getTranslationDict([
'Views', 'Workflows', 'Actions', 'Jumps'
])
});
})
.push(function (result_dict) {
appendDt(dl_fragment, result_dict.translation_dict.Views, 'eye',
view_list, result_dict.url_list, 0);
if (gadget.state.display_workflow_list) {
// show Workflows only on document
appendDt(dl_fragment, result_dict.translation_dict.Workflows, 'random',
workflow_list, result_dict.url_list, view_list.length);
}
appendDt(dl_fragment, result_dict.translation_dict.Actions, 'cogs',
action_list.concat(clone_list), result_dict.url_list,
view_list.length + workflow_list.length);
appendDt(dl_fragment, result_dict.translation_dict.Jumps, 'plane',
jump_list, result_dict.url_list,
view_list.length + workflow_list.length +
action_list.length + clone_list.length);
});
}
if (gadget.state.hasOwnProperty("extra_menu_list") &&
gadget.state.extra_menu_list) {
queue
.push(function () {
return gadget.getTranslationList(['Global']);
})
.push(function (translation_list) {
var extra_menu_list = JSON.parse(gadget.state.extra_menu_list);
extra_menu_list.forEach(function (menu) {
appendDt(dl_fragment, menu.title, menu.icon,
menu.entry_list, menu.href_list, 0);
});
});
}
}
queue
.push(function () {
if (dl_fragment) {
domsugar(gadget.element.querySelector("dl"), [dl_fragment]);
}
});
return queue;
})
/////////////////////////////////////////////////////////////////
// declared services
/////////////////////////////////////////////////////////////////
.onEvent('click', function click(evt) {
if ((evt.target.nodeType === Node.ELEMENT_NODE) &&
(evt.target.tagName === 'BUTTON')) {
return this.toggle();
}
}, false, false);
}(window, document, rJS, RSVP, Node, asBoolean, ensureArray,
mergeGlobalActionWithRawActionList, domsugar));
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_panel_drone_simulator.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ojs_drone_simulator_panel_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Drone Simulator Panel JS</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1665152550.75</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1004.798.45893.58026</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1667236196.6</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1665152255.72</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<!DOCTYPE html>
<html>
<!--
data-i18n=Others
data-i18n=Tools
-->
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Drone Simulator Script Page</title>
<link rel="http://www.renderjs.org/rel/interface" href="interface_page.html">
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="jiodev.js" type="text/javascript"></script>
<script src="gadget_global.js" type="text/javascript"></script>
<script src="domsugar.js" type="text/javascript"></script>
<script src="gadget_erp5_page_drone_simulator_script_page.js" type="text/javascript"></script>
</head>
<body>
<form>
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="form_view"
data-gadget-sandbox="public">
</div>
<input name="action_run" class="dialogconfirm" type="submit" value="Run" style="margin-bottom: 20pt;margin-top: 20pt;">
<a data-i18n="Storages"></a> <!-- for zelenium test common macro -->
<div class="simulator_div"></div>
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="form_view_babylonjs"
data-gadget-sandbox="public">
</div>
</form>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Page" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_page_drone_simulator_script_page.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ojs_drone_simulator_script_page_html</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Page</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Drone Simulator Script Page</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1664980878.92</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1004.65523.1234.17</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1671032907.71</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1664980786.17</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*jslint indent: 2, maxlen: 100*/
/*global window, rJS, domsugar, document, Blob*/
(function (window, rJS, domsugar, document, Blob) {
"use strict";
//Default values
var SIMULATION_SPEED = 200,
SIMULATION_TIME = 1500,
MAX_SPEED = 7.5, //16.666667,
MAX_ACCELERATION = 1,
min_lat = 45.6364,
max_lat = 45.65,
min_lon = 14.2521,
max_lon = 14.2766,
map_height = 100,
start_AMSL = 595,
INITIAL_POSITION = {
"latitude": 45.6412,
"longitude": 14.2658,
"z": 15
},
NUMBER_OF_DRONES = 2,
// Non-inputs parameters
DEFAULT_SCRIPT_CONTENT =
'var ALTITUDE = 100,\n' +
' EPSILON = 9,\n' +
' CHECKPOINT_LIST = [\n' +
' {\n' +
' altitude: 585.1806861589965,\n' +
' latitude: 45.64492790560583,\n' +
' longitude: 14.25334942966329\n' +
' },\n' +
' {\n' +
' altitude: 589.8802607573035,\n' +
' latitude: 45.64316335436476,\n' +
' longitude: 14.26332880184475\n' +
' },\n' +
' {\n' +
' altitude: 608.6648153348965,\n' +
' latitude: 45.64911917196595,\n' +
' longitude: 14.26214792790128\n' +
' },\n' +
' {\n' +
' altitude: 606.1448368129072,\n' +
' latitude: 45.64122685351364,\n' +
' longitude: 14.26590493128597\n' +
' },\n' +
' {\n' +
' altitude: 630.0829598206344,\n' +
' latitude: 45.64543355564817,\n' +
' longitude: 14.27242391207985\n' +
' },\n' +
' {\n' +
' altitude: 616.1839898415284,\n' +
' latitude: 45.6372792927328,\n' +
' longitude: 14.27533492411138\n' +
' },\n' +
' {\n' +
' altitude: 598.0603137354178,\n' +
' latitude: 45.64061299543953,\n' +
' longitude: 14.26161958465814\n' +
' },\n' +
' {\n' +
' altitude: 607.1243119862851,\n' +
' latitude: 45.64032340702919,\n' +
' longitude: 14.2682896662383\n' +
' }\n' +
' ];\n' +
'\n' +
'function distance(lat1, lon1, lat2, lon2) {\n' +
' var R = 6371e3, // meters\n' +
' la1 = lat1 * Math.PI / 180, // lat, lon in radians\n' +
' la2 = lat2 * Math.PI / 180,\n' +
' lo1 = lon1 * Math.PI / 180,\n' +
' lo2 = lon2 * Math.PI / 180,\n' +
' haversine_phi = Math.pow(Math.sin((la2 - la1) / 2), 2),\n' +
' sin_lon = Math.sin((lo2 - lo1) / 2),\n' +
' h = haversine_phi + Math.cos(la1) * Math.cos(la2) * sin_lon * sin_lon;\n' +
' return 2 * R * Math.asin(Math.sqrt(h));\n' +
'}\n' +
'\n' +
'me.onStart = function () {\n' +
' me.direction_set = false;\n' +
' me.next_checkpoint = 0;\n' +
'};\n' +
'\n' +
'me.onUpdate = function (timestamp) {' +
' if (!me.direction_set) {\n' +
' if (me.next_checkpoint < CHECKPOINT_LIST.length) {\n' +
' me.setTargetCoordinates(\n' +
' CHECKPOINT_LIST[me.next_checkpoint].latitude,\n' +
' CHECKPOINT_LIST[me.next_checkpoint].longitude,\n' +
' CHECKPOINT_LIST[me.next_checkpoint].altitude + ALTITUDE + ALTITUDE * me.id\n' +
' );\n' +
' console.log("[DEMO] Going to Checkpoint %d", me.next_checkpoint);\n' +
' }\n' +
' me.direction_set = true;\n' +
' return;\n' +
' }\n' +
' if (me.next_checkpoint < CHECKPOINT_LIST.length) {\n' +
' me.current_position = me.getCurrentPosition();\n' +
' me.distance = distance(\n' +
' me.current_position.x,\n' +
' me.current_position.y,\n' +
' CHECKPOINT_LIST[me.next_checkpoint].latitude,\n' +
' CHECKPOINT_LIST[me.next_checkpoint].longitude\n' +
' );\n' +
' if (me.distance <= EPSILON) {\n' +
' console.log("[DEMO] Reached Checkpoint %d", me.next_checkpoint);\n' +
' me.next_checkpoint += 1;\n' +
' me.direction_set = false;\n' +
' }\n' +
' return;\n' +
' }\n' +
' me.exit(0);\n' +
'};',
DRAW = true,
LOG = true,
LOG_TIME = 1662.7915426540285,
DRONE_LIST = [],
WIDTH = 680,
HEIGHT = 340,
LOGIC_FILE_LIST = [
'gadget_erp5_page_drone_simulator_logic.js',
'gadget_erp5_page_drone_simulator_droneaaailefixe.js',
'gadget_erp5_page_drone_simulator_dronelogfollower.js'
];
rJS(window)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("updateHeader", "updateHeader")
.allowPublicAcquisition('notifySubmit', function () {
return this.triggerSubmit();
})
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('input[type="submit"]').click();
})
.onEvent('submit', function () {
var gadget = this;
return gadget.getDeclaredGadget('form_view')
.push(function (form_gadget) {
return form_gadget.getContent();
})
.push(function (input) {
gadget.runGame(input);
});
})
.declareMethod('render', function render() {
var gadget = this;
return gadget.getDeclaredGadget('form_view')
.push(function (form_gadget) {
return form_gadget.render({
erp5_document: {
"_embedded": {"_view": {
"my_simulation_speed": {
"description": "",
"title": "Simulation Speed",
"default": SIMULATION_SPEED,
"css_class": "",
"required": 1,
"editable": 1,
"key": "simulation_speed",
"hidden": 0,
"type": "StringField"
},
"my_simulation_time": {
"description": "Duration of the simulation (in seconds)",
"title": "Simulation Time",
"default": SIMULATION_TIME,
"css_class": "",
"required": 1,
"editable": 1,
"key": "simulation_time",
"hidden": 0,
"type": "StringField"
},
"my_drone_speed": {
"description": "",
"title": "Drone speed",
"default": MAX_SPEED,
"css_class": "",
"required": 1,
"editable": 1,
"key": "drone_speed",
"hidden": 0,
"type": "StringField"
},
"my_drone_acceleration": {
"description": "",
"title": "Drone Acceleration",
"default": MAX_ACCELERATION,
"css_class": "",
"required": 1,
"editable": 1,
"key": "drone_acceleration",
"hidden": 0,
"type": "StringField"
},
"my_minimum_latitud": {
"description": "",
"title": "Minimum latitude",
"default": min_lat,
"css_class": "",
"required": 1,
"editable": 1,
"key": "min_lat",
"hidden": 0,
"type": "StringField"
},
"my_maximum_latitud": {
"description": "",
"title": "Maximum latitude",
"default": max_lat,
"css_class": "",
"required": 1,
"editable": 1,
"key": "max_lat",
"hidden": 0,
"type": "StringField"
},
"my_minimum_longitud": {
"description": "",
"title": "Minimum longitude",
"default": min_lon,
"css_class": "",
"required": 1,
"editable": 1,
"key": "min_lon",
"hidden": 0,
"type": "StringField"
},
"my_maximum_longitud": {
"description": "",
"title": "Maximum longitude",
"default": max_lon,
"css_class": "",
"required": 1,
"editable": 1,
"key": "max_lon",
"hidden": 0,
"type": "StringField"
},
"my_start_AMSL": {
"description": "",
"title": "Start AMSL",
"default": start_AMSL,
"css_class": "",
"required": 1,
"editable": 1,
"key": "start_AMSL",
"hidden": 0,
"type": "StringField"
},
"my_map_height": {
"description": "",
"title": "Map Height",
"default": map_height,
"css_class": "",
"required": 1,
"editable": 1,
"key": "map_height",
"hidden": 0,
"type": "StringField"
},
"my_init_pos_lon": {
"description": "",
"title": "Initial drone longitude",
"default": INITIAL_POSITION.longitude,
"css_class": "",
"required": 1,
"editable": 1,
"key": "init_pos_lon",
"hidden": 0,
"type": "StringField"
},
"my_init_pos_lat": {
"description": "",
"title": "Initial drone latitude",
"default": INITIAL_POSITION.latitude,
"css_class": "",
"required": 1,
"editable": 1,
"key": "init_pos_lat",
"hidden": 0,
"type": "StringField"
},
"my_init_pos_z": {
"description": "",
"title": "Initial drone position Z",
"default": INITIAL_POSITION.z,
"css_class": "",
"required": 1,
"editable": 1,
"key": "init_pos_z",
"hidden": 0,
"type": "StringField"
},
"my_number_of_drones": {
"description": "",
"title": "Number of drones",
"default": NUMBER_OF_DRONES,
"css_class": "",
"required": 1,
"editable": 1,
"key": "number_of_drones",
"hidden": 0,
"type": "StringField"
},
"my_script": {
"default": DEFAULT_SCRIPT_CONTENT,
"css_class": "",
"required": 1,
"editable": 1,
"key": "script",
"hidden": 0,
"type": "GadgetField",
"renderjs_extra": '{"editor": "codemirror", "maximize": true}',
"url": "gadget_editor.html",
"sandbox": "public"
}
}},
"_links": {
"type": {
name: ""
}
}
},
form_definition: {
group_list: [[
"left",
[["my_simulation_speed"], ["my_simulation_time"],
["my_drone_speed"], ["my_drone_acceleration"],
["my_number_of_drones"], ["my_map_height"], ["my_start_AMSL"]]
], [
"right",
[["my_minimum_latitud"], ["my_maximum_latitud"],
["my_minimum_longitud"], ["my_maximum_longitud"],
["my_init_pos_lat"], ["my_init_pos_lon"], ["my_init_pos_z"]]
], [
"bottom",
[["my_script"]]
]]
}
});
})
.push(function () {
return gadget.updateHeader({
page_title: 'Drone Simulator - Edit and run script',
page_icon: 'puzzle-piece'
});
});
})
.declareJob('runGame', function runGame(options) {
var gadget = this, simulator, i,
fragment = gadget.element.querySelector('.simulator_div'),
game_parameters_json;
fragment = domsugar(gadget.element.querySelector('.simulator_div'),
[domsugar('div')]).firstElementChild;
DRONE_LIST = [];
for (i = 0; i < options.number_of_drones; i += 1) {
DRONE_LIST[i] = {"id": i, "type": "DroneAaileFixeAPI",
"script_content": options.script};
}
game_parameters_json = {
"drone": {
"maxAcceleration": parseFloat(options.drone_acceleration),
"maxSpeed": parseFloat(options.drone_speed)
},
"gameTime": parseFloat(options.simulation_time),
"simulation_speed": parseFloat(options.simulation_speed),
"latency": {
"information": 0,
"communication": 0
},
"map": {
"min_lat": parseFloat(options.min_lat),
"max_lat": parseFloat(options.max_lat),
"min_lon": parseFloat(options.min_lon),
"max_lon": parseFloat(options.max_lon),
"height": parseFloat(options.map_height),
"start_AMSL": parseFloat(options.start_AMSL)
},
"initialPosition": {
"longitude": parseFloat(options.init_pos_lon),
"latitude": parseFloat(options.init_pos_lat),
"z": parseFloat(options.init_pos_z)
},
"draw_flight_path": DRAW,
"temp_flight_path": true,
"log_drone_flight": LOG,
"log_interval_time": LOG_TIME,
"droneList": DRONE_LIST
};
return gadget.declareGadget("babylonjs.gadget.html",
{element: fragment, scope: 'simulator'})
.push(function () {
return gadget.getDeclaredGadget('form_view_babylonjs');
})
.push(function (form_gadget) {
return form_gadget.render({
erp5_document: {
"_embedded": {"_view": {
"my_babylonjs": {
"default": "",
"css_class": "",
"required": 0,
"editable": 1,
"key": "babylonjs",
"hidden": 0,
"type": "GadgetField",
"url": "babylonjs.gadget.html",
"sandbox": "public",
"renderjs_extra": '{"autorun": false, "width": ' + WIDTH + ', ' +
'"height": ' + HEIGHT + ', ' +
'"logic_file_list": ' + JSON.stringify(LOGIC_FILE_LIST) + ', ' +
'"game_parameters": ' + JSON.stringify(game_parameters_json) +
'}'
}
}},
"_links": {
"type": {
name: ""
}
}
},
form_definition: {
group_list: [[
"bottom",
[["my_babylonjs"]]
]]
}
});
})
.push(function () {
return gadget.getDeclaredGadget('form_view_babylonjs');
})
.push(function (form_gadget) {
return form_gadget.getContent();
})
.push(function (result) {
var i,
log_content,
blob,
a,
log,
div;
for (var key in result) {
log_content = result[key].join('\n').replaceAll(",", ";");
blob = new Blob([log_content], {type: 'text/plain'});
a = domsugar('a', {
text: 'Download Simulation LOG ' + i,
download: 'simulation_log.txt',
href: window.URL.createObjectURL(blob)
});
log = domsugar('textarea', { value: log_content });
div = domsugar('div', [a]);
a.dataset.downloadurl = ['text/plain', a.download,
a.href].join(':');
document.querySelector('.container').appendChild(div);
document.querySelector('.container').appendChild(log);
}
});
});
}(window, rJS, domsugar, document, Blob));
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_page_drone_simulator_script_page.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ojs_drone_simulator_script_page_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Drone Simulator Script Page JS</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1664980875.32</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1005.193.31229.15496</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1671108872.26</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1664980860.44</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
{
"short_name": "Drone Simulator",
"name": "OfficeJS Drone Simulator",
"description": "Drone simulator to run AI scripts and flight logs",
"icons": [{
"src": "drone.png",
"sizes": "any",
"type": "image/png"
}],
"start_url": "../../",
"display": "standalone"
}
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>classification/collaborative/team</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_officejs_drone_simulator.json</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ojs_drone_simulator_web_manifest_json</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Officejs Drone Simulator Web Manifest</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1665150616.46</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1003.57671.25721.5666</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1667236199.25</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1665150504.11</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Site" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
<string>Reviewer</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_folders_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
<string>Reviewer</string>
</tuple>
</value>
</item>
<item>
<key> <string>__before_publishing_traverse__</string> </key>
<value>
<object>
<klass>
<global name="MultiHook" module="ZPublisher.BeforeTraverse"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_defined_in_class</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>_hookname</string> </key>
<value> <string>__before_publishing_traverse__</string> </value>
</item>
<item>
<key> <string>_list</string> </key>
<value>
<list>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</list>
</value>
</item>
<item>
<key> <string>_prior</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>__before_traverse__</string> </key>
<value>
<dictionary>
<item>
<key>
<tuple>
<int>99</int>
<string>ERP5 Web Site/officejs_drone_simulator</string>
</tuple>
</key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_latest_document_version</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_content_security_policy</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_webapp_manifest_url</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_latest_version</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_cache_file</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_redirect_url</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_x_frame_options</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAc=</string> </persistent>
</value>
</item>
<item>
<key> <string>available_language</string> </key>
<value>
<tuple>
<string>en</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>aggregate/web_page_module/gadget_officejs_bootloader.html</string>
<string>caching_policy/must-revalidate</string>
</tuple>
</value>
</item>
<item>
<key> <string>configuration_cache_file</string> </key>
<value> <string>WebSection_getPrecacheManifest</string> </value>
</item>
<item>
<key> <string>configuration_content_security_policy</string> </key>
<value> <string>default-src \'self\'; img-src \'self\' data:; media-src \'self\' blob:; connect-src \'self\' https://content.dropboxapi.com https://api.dropboxapi.com mail.tiolive.com data: *.host.vifib.net *.node.vifib.com *.erp5.net *.nexedi.net https://netdna.bootstrapcdn.com; script-src \'self\' \'unsafe-eval\' \'unsafe-inline\'; font-src \'self\' netdna.bootstrapcdn.com; style-src \'self\' netdna.bootstrapcdn.com \'unsafe-inline\' data:; frame-src \'self\' data:</string> </value>
</item>
<item>
<key> <string>configuration_latest_document_version</string> </key>
<value> <string>001</string> </value>
</item>
<item>
<key> <string>configuration_latest_version</string> </key>
<value> <string>app</string> </value>
</item>
<item>
<key> <string>configuration_redirect_url</string> </key>
<value> <string>app</string> </value>
</item>
<item>
<key> <string>configuration_webapp_manifest_url</string> </key>
<value> <string>gadget_officejs_drone_simulator.json</string> </value>
</item>
<item>
<key> <string>configuration_x_frame_options</string> </key>
<value> <string>SAMEORIGIN</string> </value>
</item>
<item>
<key> <string>container_layout</string> </key>
<value> <string>WebSection_renderOfficeJSApplicationPage</string> </value>
</item>
<item>
<key> <string>content_layout</string> </key>
<value> <string>WebSection_renderOfficeJSApplicationPage</string> </value>
</item>
<item>
<key> <string>custom_render_method_id</string> </key>
<value> <string>WebSection_renderOfficeJSApplicationPage</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>officejs_drone_simulator</string> </value>
</item>
<item>
<key> <string>layout_configuration_form_id</string> </key>
<value> <string>WebSection_viewOfficeJSApplicationPreference</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Site</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>skin_selection_name</string> </key>
<value> <string>RJS</string> </value>
</item>
<item>
<key> <string>static_language_selection</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Office JS Drone Simulator</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAg=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="WebSiteTraversalHook" module="Products.ERP5.Document.WebSite"/>
</pickle>
<pickle>
<dictionary/>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="7" aka="AAAAAAAAAAc=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="8" aka="AAAAAAAAAAg=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>category_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAk=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAo=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="9" aka="AAAAAAAAAAk=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1666634283.84</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="10" aka="AAAAAAAAAAo=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1003.56310.48998.8311</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1666634612.83</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Section" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_folders_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>__before_publishing_traverse__</string> </key>
<value>
<object>
<klass>
<global name="MultiHook" module="ZPublisher.BeforeTraverse"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_defined_in_class</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>_hookname</string> </key>
<value> <string>__before_publishing_traverse__</string> </value>
</item>
<item>
<key> <string>_list</string> </key>
<value>
<list>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</list>
</value>
</item>
<item>
<key> <string>_prior</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>__before_traverse__</string> </key>
<value>
<dictionary>
<item>
<key>
<tuple>
<int>99</int>
<string>ERP5 Web Section/app</string>
</tuple>
</key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_content_security_policy</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_panel_gadget_url</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_jio_gadget_url</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_application_title</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_precache_manifest_script_list</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>text</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_webapp_manifest_url</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_x_frame_options</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_header_gadget_url</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_frontpage_gadget_url</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>configuration_default_view_action_reference</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>caching_policy/must-revalidate</string>
<string>aggregate/web_page_module/rjs_gadget_erp5_launcher_html</string>
</tuple>
</value>
</item>
<item>
<key> <string>configuration_application_title</string> </key>
<value> <string>Drone Simulator</string> </value>
</item>
<item>
<key> <string>configuration_content_security_policy</string> </key>
<value> <string>default-src \'self\'; img-src \'self\' data:; media-src \'self\' blob:; connect-src \'self\' https://content.dropboxapi.com https://api.dropboxapi.com mail.tiolive.com data: *.host.vifib.net *.node.vifib.com *.erp5.net *.nexedi.net https://netdna.bootstrapcdn.com; script-src \'self\' \'unsafe-eval\' \'unsafe-inline\'; font-src \'self\' netdna.bootstrapcdn.com; style-src \'self\' netdna.bootstrapcdn.com \'unsafe-inline\' data:; frame-src \'self\' data:</string> </value>
</item>
<item>
<key> <string>configuration_default_view_action_reference</string> </key>
<value> <string>jio_view</string> </value>
</item>
<item>
<key> <string>configuration_frontpage_gadget_url</string> </key>
<value> <string>drone_simulator_script_page</string> </value>
</item>
<item>
<key> <string>configuration_header_gadget_url</string> </key>
<value> <string>gadget_erp5_header.html</string> </value>
</item>
<item>
<key> <string>configuration_jio_gadget_url</string> </key>
<value> <string>gadget_ojs_local_jio.html</string> </value>
</item>
<item>
<key> <string>configuration_panel_gadget_url</string> </key>
<value> <string>gadget_erp5_panel_drone_simulator.html</string> </value>
</item>
<item>
<key> <string>configuration_precache_manifest_script_list</string> </key>
<value> <string>WebSection_getOfficeJsPrecacheManifestList\n
WebSection_getCodeMirrorPrecacheManifestList\n
WebSection_getBabylonjsPrecacheManifestList\n
WebSection_getDroneSimulatorPrecacheManifestList</string> </value>
</item>
<item>
<key> <string>configuration_webapp_manifest_url</string> </key>
<value> <string>gadget_officejs_drone_simulator.json</string> </value>
</item>
<item>
<key> <string>configuration_x_frame_options</string> </key>
<value> <string>SAMEORIGIN</string> </value>
</item>
<item>
<key> <string>container_layout</string> </key>
<value> <string>WebSection_renderDefaultPageAsGadget</string> </value>
</item>
<item>
<key> <string>content_layout</string> </key>
<value> <string>WebSection_renderDefaultPageAsGadget</string> </value>
</item>
<item>
<key> <string>custom_render_method_id</string> </key>
<value> <string>WebSection_renderDefaultPageAsGadget</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>empty_criterion_valid</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>app</string> </value>
</item>
<item>
<key> <string>layout_configuration_form_id</string> </key>
<value> <string>WebSection_viewRenderJSPreference</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Section</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>skin_selection_name</string> </key>
<value> <string>RJS</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Drone Simulator App</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="WebSectionTraversalHook" module="Products.ERP5.Document.WebSection"/>
</pickle>
<pickle>
<dictionary/>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>category_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAc=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1666634324.85</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>embedded</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="7" aka="AAAAAAAAAAc=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1005.2930.45130.17817</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1671209780.63</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>business_template_skin_layer_priority</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>float</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>business_template_skin_layer_priority</string> </key>
<value> <float>10.0</float> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_drone_simulator</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>assets</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>drone</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>must_revalidate_http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>drone.babylon</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/x-unknown-content-type</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>must_revalidate_http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>drone_bleu.jpg</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/jpeg</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>32</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>32</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>must_revalidate_http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>drone_bleu_old.jpg</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/jpeg</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>256</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>256</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>must_revalidate_http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>drone_rouge.jpg</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/jpeg</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>32</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>32</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>must_revalidate_http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>drone_rouge_old.jpg</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/jpeg</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>256</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>256</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>map</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
{"producer":{"name":"3dsmax","version":"2017","exporter_version":"0.4.5","file":"terrain.babylon"},"autoClear":true,"clearColor":[0.0,0.0,0.0],"ambientColor":[0.0,0.0,0.0],"fogMode":0,"fogColor":null,"fogStart":0.0,"fogEnd":0.0,"fogDensity":0.0,"gravity":[0.0,0.0,0.0],"physicsEngine":null,"physicsEnabled":false,"physicsGravity":null,"cameras":[{"isStereoscopicSideBySide":false,"name":"Default camera","id":"576afc29-5e57-4444-9694-4794999723ec","parentId":null,"lockedTargetId":null,"type":"FreeCamera","position":["-Infinity","-Infinity","-Infinity"],"rotation":[0.0,0.0,0.0],"target":["-Infinity","-Infinity","-Infinity"],"fov":0.8,"minZ":1.0,"maxZ":"Infinity","speed":"Infinity","inertia":0.9,"interaxialDistance":0.0637,"checkCollisions":false,"applyGravity":false,"ellipsoid":null,"autoAnimate":false,"autoAnimateFrom":0,"autoAnimateTo":0,"autoAnimateLoop":false,"animations":null,"mode":0,"orthoLeft":null,"orthoRight":null,"orthoBottom":null,"orthoTop":null,"metadata":null,"tags":null}],"activeCameraID":"576afc29-5e57-4444-9694-4794999723ec","lights":[{"name":"Default light","id":"068479ea-6c6c-4d19-a268-d7d05e4d7989","parentId":null,"position":null,"direction":[0.0,1.0,0.0],"type":3,"diffuse":[1.0,1.0,1.0],"specular":[1.0,1.0,1.0],"intensity":1.0,"range":3.40282347E+38,"exponent":0.0,"angle":0.0,"groundColor":[0.0,0.0,0.0],"excludedMeshesIds":null,"includedOnlyMeshesIds":null,"autoAnimate":false,"autoAnimateFrom":0,"autoAnimateTo":0,"autoAnimateLoop":false,"animations":null,"metadata":null,"tags":null}],"meshes":[{"materialId":"50d53c00-2900-4fec-9062-cf5f9094ceb6","isEnabled":true,"isVisible":true,"pickable":false,"pivotMatrix":null,"positions":[-25000.0,0.0,-25000.0,25000.0,0.0,-25000.0,25000.0,0.0,25000.0,25000.0,0.0,25000.0,-25000.0,0.0,25000.0,-25000.0,0.0,-25000.0],"normals":[0.0,1.0,0.0,0.0,1.0,0.0,0.0,1.0,0.0,0.0,1.0,0.0,0.0,1.0,0.0,0.0,1.0,0.0],"uvs":[0.0005,1.2849,0.7061,1.2849,0.7061,1.9905,0.7061,1.9905,0.0005,1.9905,0.0005,1.2849],"uvs2":null,"colors":null,"hasVertexAlpha":false,"matricesIndices":null,"matricesWeights":null,"matricesIndicesExtra":null,"matricesWeightsExtra":null,"indices":[0,1,2,3,4,5],"checkCollisions":false,"receiveShadows":true,"infiniteDistance":false,"billboardMode":0,"visibility":1.0,"subMeshes":[{"materialIndex":0,"verticesStart":0,"verticesCount":6,"indexStart":0,"indexCount":6}],"instances":[],"skeletonId":-1,"numBoneInfluencers":4,"showBoundingBox":false,"showSubMeshesBoundingBox":false,"applyFog":true,"alphaIndex":1000,"physicsImpostor":0,"physicsMass":0.0,"physicsFriction":0.0,"physicsRestitution":0.0,"metadata":null,"tags":null,"id":"32d610cd-55dd-4f3e-96ea-7511d26fa986","name":"terrain001","position":[0.0,0.0,0.0],"rotation":[0.0,0.0,0.0],"scaling":[1.0,1.0,1.0],"rotationQuaternion":null,"actions":null,"animations":[],"autoAnimate":true,"autoAnimateFrom":0,"autoAnimateTo":100,"autoAnimateLoop":true,"parentId":null}],"sounds":[],"materials":[{"ambient":[0.5882,0.5882,0.5882],"diffuse":[1.0,1.0,1.0],"specular":[0.0,0.0,0.0],"emissive":[0.0,0.0,0.0],"specularPower":25.6,"diffuseTexture":{"name":"terrain.jpg","level":1.0,"hasAlpha":false,"getAlphaFromRGB":false,"coordinatesMode":0,"isCube":false,"uOffset":0.0,"vOffset":0.0,"uScale":1.0,"vScale":1.0,"uAng":0.0,"vAng":0.0,"wAng":0.0,"wrapU":1,"wrapV":1,"coordinatesIndex":0,"isRenderTarget":false,"renderTargetSize":0,"mirrorPlane":null,"renderList":null,"animations":[],"extensions":null,"samplingMode":3},"diffuseFresnelParameters":null,"ambientTexture":null,"opacityTexture":null,"opacityFresnelParameters":null,"reflectionTexture":null,"reflectionFresnelParameters":null,"emissiveTexture":null,"lightmapTexture":null,"useLightmapAsShadowmap":false,"emissiveFresnelParameters":null,"specularTexture":null,"bumpTexture":null,"useSpecularOverAlpha":true,"disableLighting":false,"useEmissiveAsIllumination":false,"linkEmissiveWithDiffuse":false,"name":"terrain","id":"50d53c00-2900-4fec-9062-cf5f9094ceb6","backFaceCulling":true,"wireframe":false,"alpha":1.0,"alphaMode":2}],"multiMaterials":[],"particleSystems":null,"lensFlareSystems":null,"shadowGenerators":[],"skeletons":[],"actions":null,"metadata":null,"workerCollisions":false}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>must_revalidate_http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>map.babylon</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/x-unknown-content-type</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>terrain.jpg</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/jpeg</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>512</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>512</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>skybox</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>must_revalidate_http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>sky_nx.jpg</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/jpeg</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>512</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>512</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>must_revalidate_http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>sky_ny.jpg</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/jpeg</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>512</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>512</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>must_revalidate_http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>sky_nz.jpg</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/jpeg</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>512</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>512</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>must_revalidate_http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>sky_px.jpg</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/jpeg</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>512</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>512</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>must_revalidate_http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>sky_py.jpg</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/jpeg</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>512</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>512</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>must_revalidate_http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>sky_pz.jpg</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/jpeg</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>512</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>512</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>business_template_skin_layer_priority</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>float</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>business_template_skin_layer_priority</string> </key>
<value> <float>42.0</float> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_officejs_drone_simulator</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
url_list = [
"gadget_erp5_page_drone_simulator_logic.js",
"gadget_erp5_page_drone_simulator_script_page.html",
"gadget_erp5_page_drone_simulator_script_page.js",
"gadget_erp5_page_drone_simulator_log_page.html",
"gadget_erp5_page_drone_simulator_log_page.js",
"gadget_erp5_panel_drone_simulator.html",
"gadget_erp5_panel_drone_simulator.js",
"gadget_erp5_page_drone_simulator_droneaaailefixe.js",
"gadget_erp5_page_drone_simulator_dronelogfollower.js",
"drone.png",
"gadget_officejs_drone_simulator.json",
"assets/map/terrain.jpg",
"assets/map/map.babylon",
"assets/drone/drone.babylon",
"assets/drone/drone_bleu.jpg",
"assets/drone/drone_bleu_old.jpg",
"assets/drone/drone_rouge.jpg",
"assets/drone/drone_rouge_old.jpg",
"assets/skybox/sky_nx.jpg",
"assets/skybox/sky_ny.jpg",
"assets/skybox/sky_nz.jpg",
"assets/skybox/sky_px.jpg",
"assets/skybox/sky_py.jpg",
"assets/skybox/sky_pz.jpg"
]
return url_list
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>REQUEST=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSection_getDroneSimulatorPrecacheManifestList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
erp5_officejs
\ No newline at end of file
Drone simulator officejs app that allows users to compare real flights loaded from logs with a simulated flight from a AI script
Drone simulator can run different types of drone implementations such as a drone driven by a flight log or by an AI script
\ No newline at end of file
image_module/drone_icon_png
web_page_module/ojs_drone_simulator_*
web_site_module/officejs_drone_simulator
web_site_module/officejs_drone_simulator/*
web_page_module/drone_simulator_*
\ No newline at end of file
image_module/drone_icon_png
web_page_module/ojs_drone_simulator_*
web_site_module/officejs_drone_simulator
web_site_module/officejs_drone_simulator/*
web_page_module/drone_simulator_*
\ No newline at end of file
image_module/drone_icon_png
web_page_module/ojs_drone_simulator_*
web_site_module/officejs_drone_simulator
web_site_module/officejs_drone_simulator/*
web_page_module/drone_simulator_*
\ No newline at end of file
image_module/drone_icon_png
web_page_module/drone_simulator_*
web_page_module/ojs_drone_simulator_*
web_site_module/officejs_drone_simulator
web_site_module/officejs_drone_simulator/*
\ No newline at end of file
erp5_drone_simulator
erp5_officejs_drone_simulator
\ No newline at end of file
erp5_officejs_drone_simulator
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Zuite" module="Products.Zelenium.zuite"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>drone_simulator_ui_site_zuite</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testDroneSimulator</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Drone Simulator OJS app (expected failure)</title>
<!-- This test is expected to fail as the drone simulator runs on a web worker canvas, which relies on a very new feature: offscreen canvas
---- This feature is not supported yet by the latest Firefox ESR used in the test nodes -->
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Drone Simulator OJS app (expected failure)</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<!-- Go to site -->
<tr>
<td>open</td>
<td>${base_url}/web_site_module/officejs_drone_simulator/</td>
<td></td>
</tr>
<tal:block tal:define="web_site_name python: 'officejs_drone_simulator'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOfficejsUi/macros/install_offline_and_redirect" />
</tal:block>
<!-- Check form -->
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_page_drone_simulator_script_page.html')]</td>
<td></td>
<tr>
<tr>
<td>waitForElementPresent</td>
<td>//label[text()='Simulation Speed']</td>
<td></td>
<tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'codemirror.gadget.html')]</td>
<td></td>
<tr>
<!-- Check panel -->
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_panel_drone_simulator.html')]//a[contains(@class, 'ui-icon-edit') and text()='Edit & Run Script']</td>
<td></td>
<tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_panel_drone_simulator.html')]//a[contains(@class, 'ui-icon-puzzle-piece') and text()='Run Logs']</td>
<td></td>
<tr>
<!-- Run simulator -->
<tr>
<td>pause</td>
<td>3000</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_page_drone_simulator_script_page.html')]//input[@type="submit" and @name="action_run"]</td>
<td></td>
<tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@id="loading"]</td>
<td></td>
<tr>
<!-- Check simulator gadget and babylon lib -->
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_page_drone_simulator_gadget.html')]</td>
<td></td>
<tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_page_drone_simulator_gadget.html')]//canvas[contains(@data-engine, 'Babylon.js')]</td>
<td></td>
<tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="container"]//a[contains(text(), 'Download Simulation LOG')]</td>
<td></td>
<tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="container"]//textarea</td>
<td></td>
<tr>
<!-- Go to log page -->
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_panel_drone_simulator.html')]//a[contains(@class, 'ui-icon-puzzle-piece') and text()='Run Logs']</td>
<td></td>
<tr>
<tr>
<td>waitForElementPresent</td>
<td>//label[text()='Simulation Speed']</td>
<td></td>
<tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@id="log_1"]</td>
<td></td>
<tr>
<tr>
<td>type</td>
<td>//textarea[@id="log_1"]</td>
<td>a</td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@id="log_2"]</td>
<td>b</td>
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_page_drone_simulator_log_page.html')]//input[@type="submit" and @name="action_run"]</td>
<td></td>
<tr>
<tal:block tal:define="notification_configuration python: {'class': 'error',
'text': 'Invalid log content'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tr>
<td>type</td>
<td>//textarea[@id="log_1"]</td>
<td>timestamp;;latitude;;longitude;;AMSL (m);;rel altitude (m);;pitch (°);;roll(°);;yaw(°);;air speed (m/s);;throttle(%);;climb rate(m/s)
16.666666666666668;45.6412;14.265800000000013;610.328;15</td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@id="log_2"]</td>
<td>timestamp;;latitude;;longitude;;AMSL (m);;rel altitude (m);;pitch (°);;roll(°);;yaw(°);;air speed (m/s);;throttle(%);;climb rate(m/s)
16.666666666666668;45.6412;14.265800000000013;610.328;15</td>
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_page_drone_simulator_log_page.html')]//input[@type="submit" and @name="action_run"]</td>
<td></td>
<tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@id="distance" and contains(text(), 'Average flights distance')]</td>
<td></td>
<tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@id="loading"]</td>
<td></td>
<tr>
<!-- Check simulator gadget and babylon lib -->
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_page_drone_simulator_gadget.html')]</td>
<td></td>
<tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_page_drone_simulator_gadget.html')]//canvas[contains(@data-engine, 'Babylon.js')]</td>
<td></td>
<tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testDroneSimulatorAPIResults</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- This test is expected to fail as the drone simulator runs on a web worker canvas, which relies on a very new feature: offscreen canvas
---- This feature is not supported yet by the latest Firefox ESR used in the test nodes -->
<title>Test Drone Simulator OJS app API (expected failure)</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Drone Simulator OJS app API (expected failure)</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<!-- Go to site -->
<tr>
<td>open</td>
<td>${base_url}/web_site_module/officejs_drone_simulator/</td>
<td></td>
</tr>
<!-- Check form -->
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_page_drone_simulator_script_page.html')]</td>
<td></td>
<tr>
<tr>
<td>waitForElementPresent</td>
<td>//label[text()='Simulation Speed']</td>
<td></td>
<tr>
<!--tr>
<td>waitForElementPresent</td>
<td>//textarea[@id="script"]</td>
<td></td>
<tr-->
<!-- Run simulator -->
<tr>
<td>pause</td>
<td>3000</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_page_drone_simulator_script_page.html')]//input[@type="submit" and @name="action_run"]</td>
<td></td>
</tr>
<!-- Check simulator gadget and babylon lib -->
<tr>
<td>waitForElementPresent</td>
<td>//span[@id="loading"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_page_drone_simulator_gadget.html')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_page_drone_simulator_gadget.html')]//canvas[contains(@data-engine, 'Babylon.js')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="container"]//a[contains(text(), 'Download Simulation LOG')]</td>
<td></td>
</tr>
<!-- Test default script -->
<!-- Covers setAcceleration & setTargetCoordinates API methods -->
<tr>
<td>assertTextPresent</td>
<td>timestamp;;latitude;;longitude;;AMSL (m);;rel altitude (m);;pitch (°);;roll(°);;yaw(°);;air speed (m/s);;throttle(%);;climb rate(m/s)16.666666666666668;45.6412;14.265800000000013;610.328;151666.6666666666686;45.641208877177;14.265770351739434;610.3160936134835;14.988093613483513333.3333333333253;45.64123568804494;14.265680808003026;610.280133920873;14.9521339208731025000.000000000002;45.6412804326038;14.265531368790732;610.2201209221688;14.8921209221687756666.666666666699;45.64134311085358;14.265322034102553;610.1360546173705;14.808054617370538316.666666666722;45.64142093303432;14.265062121262076;610.0316767320827;14.7036767320827189983.333333333328;45.64150208845468;14.264791075968475;609.9228281868893;14.59482818688932111649.999999999935;45.64158324387505;14.264520030674902;609.8139796416959;14.48597964169592513316.66666666654;45.64166439929541;14.2642489853813;609.7051310965026;14.37713109650252914966.66666666648;45.64174474316157;14.263980650540645;609.597371036761;14.26937103676106716633.333333333114;45.64182589858193;14.263709605247044;609.4885224915677;14.1605224915676718299.9999999999;45.64190705400229;14.263438559953443;609.3796739463743;14.05167394637427419966.66666666669;45.64198820942266;14.263167514659841;609.2708254011809;13.94282540118087821616.66666666681;45.64206855328881;14.262899179819186;609.1630653414394;13.83506534143941623283.333333333598;45.64214970870918;14.262628134525585;609.054216796246;13.7262167962460224950.000000000386;45.64223086412954;14.262357089231983;608.9453682510526;13.61736825105262326616.666666667174;45.6423120195499;14.26208604393841;608.8365197058592;13.50851970585922728283.33333333396;45.642393174970266;14.261814998644809;608.7276711606657;13.3996711606658329933.33333333408;45.64247351883642;14.261546663804154;608.6199111009244;13.29191110092436831600.00000000087;45.642554674256786;14.261275618510552;608.511062555731;13.18306255573097233266.66666666755;45.64263582967715;14.261004573216951;608.4022140105376;13.07421401053757634933.333333333976;45.64271698509751;14.26073352792335;608.2933654653442;12.9653654653441836583.333333333736;45.642797328963674;14.260465193082695;608.1856054056027;12.85760540560271738250.00000000016;45.64287848438403;14.260194147789093;608.0767568604093;12.7487568604093239916.666666666584;45.642959639804396;14.259923102495492;607.9679083152159;12.63990831521592541583.33333333301;45.643040795224756;14.259652057201919;607.8590597700226;12.53105977002252843233.33333333277;45.64312113909092;14.259383722361264;607.751299710281;12.42329971028106644899.99999999919;45.64320229451128;14.259112677067662;607.6424511650877;12.3144511650876746566.66666666562;45.643283449931644;14.258841631774061;607.5336026198943;12.20560261989427448233.33333333204;45.643364605352;14.25857058648046;607.4247540747009;12.09675407470087749899.999999998465;45.643445760772366;14.258299541186858;607.3159055295074;11.98790552950748151549.999999998225;45.64352610463853;14.258031206346203;607.208145469766;11.88014546976601953216.66666666465;45.64360726005889;14.257760161052602;607.0992969245726;11.77129692457262254883.33333333107;45.643688415479254;14.257489115759029;606.9904483793792;11.66244837937922656549.9999999975;45.64376957089962;14.257218070465427;606.8815998341857;11.5535998341858358199.99999999726;45.643849914765774;14.256949735624772;606.7738397744444;11.44583977444436859866.66666666368;45.64393107018614;14.25667869033117;606.664991229251;11.33699122925097161533.333333330105;45.6440122256065;14.25640764503757;606.5561426840576;11.22814268405757563199.99999999653;45.64409338102686;14.256136599743968;606.4472941388642;11.11929413886417964849.99999999629;45.64417372489302;14.255868264903313;606.3395340791227;11.01153407912271766516.66666666314;45.64425488031338;14.255597219609712;606.2306855339293;10.9026855339293268183.33333333029;45.64433603573375;14.25532617431611;606.1218369887359;10.79383698873592469849.99999999744;45.64441719115411;14.255055129022537;606.0129884435426;10.68498844354252871516.66666666459;45.64449834657447;14.254784083728936;605.9041398983491;10.57613989834913173166.66666666507;45.64457869044063;14.25451574888828;605.7963798386077;10.4683798386076774833.33333333222;45.64465984586099;14.25424470359468;605.6875312934143;10.35953129341427376499.99999999937;45.64474100128135;14.253973658301078;605.5786827482209;10.25068274822087778166.66666666653;45.64482215670172;14.253702613007476;605.4698342030274;10.1418342030274879816.666666667;45.64490250056787;14.253434278166822;605.362074143286;10.03407414328601881483.33333333416;45.64498365598824;14.25316323287322;605.2532255980926;9.92522559809262283150.00000000131;45.6450648114086;14.252892187579619;605.1443770528992;9.81637705289922684816.66666666846;45.64514596682896;14.252621142286074;605.0355285077057;9.7075285077058386466.66666666894;45.64522631069512;14.25235280744539;604.9277684479644;9.59976844796436788133.3333333361;45.64530746611548;14.25208176215179;604.818919902771;9.4909199027709789800.00000000325;45.64538862153585;14.251810716858188;604.7100713575776;9.38207135757757491466.6666666704;45.64546977695621;14.251539671564586;604.6012228123842;9.27322281238417893116.66666667088;45.64555012082238;14.251271336723931;604.4934627526427;9.16546275264271694783.33333333803;45.64563127624274;14.25100029143033;604.3846142074493;9.0566142074493296450.00000000518;45.64571243166311;14.250729246136729;604.2757656622559;8.94776566225592398116.66666667233;45.64579358708346;14.250458200843127;604.1669171170626;8.83891711706252799783.33333333948;45.64587474250382;14.250187155549582;604.0580685718691;8.73006857186913</td>
<td></td>
</tr>
<!-- Test complex script -->
<!-- Covers getInitialAltitude, setAltitude, getAltitudeAbs, setTargetCoordinates, loiter, sendMsg, getCurrentPosition, triggerParachute and exit API methods
<tr>
<td>type</td>
<td>//input[@id="simulation_time"]</td>
<td>1000</td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@id="script"]</td>
<td>/* jslint indent2 */
/* global console, me */
const ALTITUDE_DIFF = 30,
FLIGH_ALTITUDE = 100,
PARACHUTE_ALTITUDE = 35,
EPSILON = 6,
EPSILON_ALTITUDE = 5,
checkpoint_list = [
{
altitude: 585.1806861589965,
latitude: 45.64492790560583,
longitude: 14.25334942966329
},
{
altitude: 589.8802607573035,
latitude: 45.64316335436476,
longitude: 14.26332880184475
},
{
altitude: 608.6648153348965,
latitude: 45.64911917196595,
longitude: 14.26214792790128
},
{
altitude: 606.1448368129072,
latitude: 45.64122685351364,
longitude: 14.26590493128597
},
{
altitude: 630.0829598206344,
latitude: 45.64543355564817,
longitude: 14.27242391207985
},
{
altitude: 616.1839898415284,
latitude: 45.6372792927328,
longitude: 14.27533492411138
},
{
altitude: 598.0603137354178,
latitude: 45.64061299543953,
longitude: 14.26161958465814
},
{
altitude: 607.1243119862851,
latitude: 45.64032340702919,
longitude: 14.2682896662383
}
],
landing_point = {
latitude: 45.6398451,
longitude: 14.2699217
},
LEADER_ID = 0,
IS_LEADER = me.id === LEADER_ID;
function altitudeReached(altitude, target_altitude) {
console.log(`[DEMO] Waiting for altitude... (${altitude} , ${target_altitude})`);
return Math.abs(altitude - target_altitude) < EPSILON_ALTITUDE;
}
function distance(lat1, lon1, lat2, lon2) {
const R = 6371e3, // meters
la1 = lat1 * Math.PI/180, // la, lo in radians
la2 = lat2 * Math.PI/180,
lo1 = lon1 * Math.PI/180,
lo2 = lon2 * Math.PI/180;
//haversine formula
const sin_lat = Math.sin((la2 - la1)/2),
sin_lon = Math.sin((lo2 - lo1)/2),
h = sin_lat*sin_lat + Math.cos(la1)*Math.cos(la2)*sin_lon*sin_lon;
return 2*R*Math.asin(Math.sqrt(h));
}
function exitOnFail(ret, msg) {
if (ret) {
console.log(msg);
me.exit(1);
}
}
function mustWait(timestamp) {
if(me.timestamp === 0) {
me.timestamp = timestamp;
}
return timestamp - me.timestamp < me.must_wait;
}
me.onStart = function() {
me.direction_set = false;
me.going_to_landing_point = false;
me.init_alt_reached = false;
me.landing = false;
me.landing_alt_reached = false;
me.landing_point_reached = false;
me.last_checkpoint_reached = false;
me.must_wait = 3000;
me.next_checkpoint = 0;
me.parachute_triggered = false;
me.start_altitude = me.getInitialAltitude() + FLIGH_ALTITUDE;
me.timestamp = 0;
if (!IS_LEADER) {
me.follow_leader = true;
me.leader_init_alt_reached = false;
me.start_altitude += ALTITUDE_DIFF;
me.must_wait = 0;
}
exitOnFail(
me.setAltitude(me.start_altitude + 1),
"Failed to set start altitude");
};
me.onUpdate = function(timestamp) {
if (!me.init_alt_reached) {
me.init_alt_reached = altitudeReached(me.getAltitudeAbs(), me.start_altitude);
return;
}
if (me.must_wait > 0) {
if (!mustWait(timestamp)) {
me.must_wait = 0;
me.timestamp = 0;
}
return;
}
if (!IS_LEADER && me.follow_leader) {
if (me.drone_dict[LEADER_ID].altitudeAbs === 0) {
return console.log("[DEMO] Waiting for leader to send its altitude");
}
if (!me.leader_init_alt_reached) {
me.leader_init_alt_reached = me.drone_dict[LEADER_ID].altitudeAbs >= me.start_altitude - ALTITUDE_DIFF;
return console.log(`[DEMO] Waiting for leader to reach altitude ${me.start_altitude - ALTITUDE_DIFF} (currently ${me.drone_dict[LEADER_ID].altitudeAbs})`);
}
if (me.drone_dict[LEADER_ID].altitudeRel > PARACHUTE_ALTITUDE) {
exitOnFail(
me.setTargetCoordinates(
me.drone_dict[LEADER_ID].latitude,
me.drone_dict[LEADER_ID].longitude,
me.drone_dict[LEADER_ID].altitudeAbs + ALTITUDE_DIFF
),
"Failed to follow leader");
} else {
me.follow_leader = false;
console.log("[DEMO] Stop following...\n");
}
return;
}
if (!me.direction_set) {
if (me.next_checkpoint < checkpoint_list.length) {
exitOnFail(
me.setTargetCoordinates(
checkpoint_list[me.next_checkpoint].latitude,
checkpoint_list[me.next_checkpoint].longitude,
checkpoint_list[me.next_checkpoint].altitude + FLIGH_ALTITUDE
),
"Failed to set checkpoint coordinates");
console.log(`[DEMO] Going to Checkpoint ${me.next_checkpoint}\n`);
} else {
console.log("[DEMO] Setting last checkpoint coordinates...\n");
me.landing_altitude = me.getAltitudeAbs() - me.getCurrentPosition().z + PARACHUTE_ALTITUDE;
exitOnFail(
me.setTargetCoordinates(
checkpoint_list[checkpoint_list.length - 1].latitude,
checkpoint_list[checkpoint_list.length - 1].longitude,
me.landing_altitude
),
"Failed to set last checkpoint coordinates");
}
me.direction_set = true;
return;
}
if (me.next_checkpoint < checkpoint_list.length) {
me.current_position = me.getCurrentPosition();
me.distance = distance(me.current_position.x, me.current_position.y,
checkpoint_list[me.next_checkpoint].latitude,
checkpoint_list[me.next_checkpoint].longitude);
if (me.distance > EPSILON) {
console.log(`Waiting for drone to get to destination (checkpoint ${me.next_checkpoint}: ${me.distance} m)`);
} else {
me.loiter();
console.log(`[DEMO] Reached Checkpoint ${me.next_checkpoint}\n`);
me.next_checkpoint += 1;
me.sendMsg(JSON.stringify({ next_checkpoint: me.next_checkpoint }));
me.direction_set = false;
me.must_wait = 50000;
}
return;
}
if (!me.last_checkpoint_reached) {
me.current_position = me.getCurrentPosition();
me.distance = distance(me.current_position.x, me.current_position.y,
checkpoint_list[checkpoint_list.length - 1].latitude,
checkpoint_list[checkpoint_list.length - 1].longitude);
if (me.distance > EPSILON) {
console.log(`Waiting for drone to get to destination (last checkpoint: ${me.distance} m)`);
} else {
me.loiter();
me.last_checkpoint_reached = true;
}
return;
}
if (!me.landing_alt_reached) {
me.landing_alt_reached = altitudeReached(me.getAltitudeAbs(), me.landing_altitude);
me.setAltitude(me.landing_altitude);
return;
}
if (!me.going_to_landing_point) {
exitOnFail(
me.setTargetCoordinates(
landing_point.latitude,
landing_point.longitude,
me.landing_altitude
),
"Failed to set landing point coordinates");
me.going_to_landing_point = true;
return;
}
if (!me.landing) {
me.current_position = me.getCurrentPosition();
me.distance = distance(me.current_position.x, me.current_position.y,
landing_point.latitude, landing_point.longitude);
if (me.distance > EPSILON) {
console.log(`[DEMO] Waiting to reach landing point (current distance is ${me.distance})`);
} else {
console.log("[DEMO] Landing...\n");
me.landing = true;
}
return;
}
if (!me.parachute_triggered) {
console.log("[DEMO] Deploying parachute...");
exitOnFail(me.triggerParachute(), "Failed to deploy parachute");
me.parachute_triggered = true;
}
if (me.landed()) {
me.exit(0);
}
};
me.onGetMsg = function(msg) {
me.msgDict = JSON.parse(msg);
if (me.follow_leader && me.msgDict.hasOwnProperty("next_checkpoint")) {
me.next_checkpoint = me.msgDict.next_checkpoint;
console.log("next checkpoint is", me.next_checkpoint);
}
};</td>
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_page_drone_simulator_script_page.html')]//input[@type="submit" and @name="action_run"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="container"]//a[contains(text(), 'Download Simulation LOG')]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>timestamp;;latitude;;longitude;;AMSL (m);;rel altitude (m);;pitch (°);;roll(°);;yaw(°);;air speed (m/s);;throttle(%);;climb rate(m/s)16.666666666666668;45.6412;14.265800000000013;610.328;151666.6666666666686;45.6412;14.265800000000013;611.703;16.3753333.3333333333253;45.6412;14.265800000000013;615.8557777777778;20.527777777777775000.000000000002;45.6412;14.265800000000013;622.7863333333332;27.4583333333333146666.666666666699;45.6412;14.265800000000013;632.4946666666666;37.166666666666638316.666666666722;45.6412;14.265800000000013;644.5486674394459;49.22066743944599983.333333333328;45.6412;14.265800000000013;657.1189589744733;61.7909589744733211649.999999999935;45.6412;14.265800000000013;669.6892505095008;74.3612505095007513316.66666666654;45.6412;14.265800000000013;682.2595420445282;86.9315420445281714966.66666666648;45.6412;14.265800000000013;694.7041306642053;99.3761306642053216633.333333333114;45.6412;14.265800000000013;707.2744221992327;111.9464221992327418299.9999999999;45.64124215241536;14.265659218105867;712.990117320596;117.662117320596119966.66666666669;45.64132321475259;14.265388483694124;712.3784926755003;117.0504926755003121616.66666666681;45.64140346646645;14.26512045662642;711.7729842768555;116.4449842768554823283.333333333598;45.64148452880368;14.264849722214649;711.1613596317596;115.8333596317596924950.000000000386;45.64156559114091;14.264578987802878;710.5497349866639;115.221734986663926616.666666667174;45.64164665347814;14.264308253391107;709.9381103415681;114.6101103415681228283.33333333396;45.64172771581537;14.264037518979336;709.3264856964723;113.9984856964723329933.33333333408;45.64180796752923;14.26376949191166;708.7209772978275;113.392977297827531600.00000000087;45.64188902986647;14.263498757499889;708.1093526527317;112.7813526527317133266.66666666755;45.6419700922037;14.263228023088118;707.4977280076359;112.1697280076359234933.333333333976;45.64205115454092;14.262957288676347;706.8861033625401;111.5581033625401436583.333333333736;45.642131406254784;14.26268926160867;706.2805949638953;110.9525949638953138250.00000000016;45.64221246859202;14.2624185271969;705.6689703187994;110.3409703187995239916.666666666584;45.64229353092925;14.262147792785129;705.0573456737037;109.7293456737037341583.33333333301;45.64237459326648;14.261877058373358;704.445721028608;109.1177210286079543233.33333333277;45.642454844980335;14.261609031305682;703.840212629963;108.5122126299631244899.99999999919;45.642535907317566;14.26133829689391;703.2285879848673;107.9005879848673346566.66666666562;45.6426169696548;14.26106756248214;702.6169633397715;107.2889633397715448233.33333333204;45.64269803199203;14.260796828070369;702.0053386946757;106.6773386946757549899.999999998465;45.64277909432927;14.260526093658598;701.3937140495799;106.0657140495799751549.999999998225;45.64285934604313;14.260258066590893;700.7882056509351;105.4602056509351453216.66666666465;45.642940408380355;14.259987332179122;700.1765810058394;104.8485810058393554883.33333333107;45.643021470717585;14.25971659776738;699.5649563607435;104.2369563607435656549.9999999975;45.643102533054815;14.259445863355609;698.9533317156478;103.6253317156477758199.99999999726;45.643182784768676;14.259177836287904;698.347823317003;103.0198233170029559866.66666666368;45.643263847105914;14.258907101876133;697.7361986719071;102.4081986719071661533.333333330105;45.643344909443144;14.258636367464362;697.1245740268114;101.7965740268113763199.99999999653;45.64342597178037;14.258365633052591;696.5129493817155;101.1849493817155864849.99999999629;45.64350622349423;14.258097605984943;695.9074409830707;100.5794409830707566516.66666666314;45.643587285831465;14.257826871573144;695.2958163379749;99.9678163379749768183.33333333029;45.643668348168696;14.257556137161373;694.6841916928792;99.3561916928791869849.99999999744;45.643749410505926;14.257285402749602;694.0725670477834;98.7445670477833971516.66666666459;45.64383047284316;14.257014668337831;693.4609424026876;98.132942402687673166.66666666507;45.64391072455702;14.256746641270155;692.8554340040428;97.5274340040427774833.33333333222;45.64399178689425;14.256475906858384;692.2438093589469;96.9158093589469976499.99999999937;45.64407284923148;14.256205172446613;691.6321847138512;96.304184713851278166.66666666653;45.644153911568715;14.255934438034842;691.0205600687553;95.6925600687554179816.666666667;45.644234163282576;14.255666410967166;690.4150516701105;95.0870516701105881483.33333333416;45.644315225619806;14.255395676555395;689.8034270250148;94.475427025014883150.00000000131;45.64439628795703;14.255124942143624;689.191802379919;93.8638023799190184816.66666666846;45.64447735029426;14.254854207731853;688.5801777348232;93.2521777348232286466.66666666894;45.64455760200813;14.254586180664205;687.9746693361784;92.6466693361783988133.3333333361;45.64463866434536;14.254315446252406;687.3630446910826;92.035044691082689800.00000000325;45.64471972668259;14.254044711840635;686.7514200459868;91.4234200459868291466.6666666704;45.644800789019826;14.253773977428864;686.139795400891;90.8117954008910393116.66666667088;45.64488104073367;14.253505950361216;685.5342870022462;90.206287002246294783.33333333803;45.64496210307091;14.253235215949388;684.9226623571503;89.5946623571504196450.00000000518;45.64504316540814;14.252964481537617;684.3110377120546;88.9830377120546298116.66666667233;45.64512422774537;14.252693747125846;683.6994130669589;88.3714130669588499783.33333333948;45.64520529008261;14.252423012714075;683.087788421863;87.75978842186305101433.33333333996;45.64528554179646;14.252154985646428;682.4822800232182;87.15428002321822103100.00000000712;45.64536660413369;14.251884251234628;681.8706553781224;86.54265537812243104766.66666667427;45.64544766647092;14.251613516822857;681.2590307330266;85.93103073302665106433.33333334142;45.64552872880816;14.251342782411086;680.6474060879308;85.31940608793086108083.3333333419;45.64560898052202;14.251074755343438;680.041897689286;84.71389768928603109750.00000000905;45.64569004285925;14.25080402093164;679.4302730441902;84.10227304419024111416.6666666762;45.645771105196474;14.250533286519868;678.8186483990944;83.49064839909445113083.33333334335;45.64585216753371;14.250262552108097;678.2070237539987;82.87902375399867114733.33333334383;45.64593241924757;14.24999452504045;677.6015153553539;82.27351535535384116400.00000001099;45.6460134815848;14.24972379062865;676.989890710258;81.66189071025805118066.66666667814;45.64609454392203;14.249453056216879;676.3782660651623;81.05026606516226119733.33333334529;45.64617560625927;14.249182321805108;675.7666414200664;80.43864142006647121400.00000001244;45.64625666859649;14.248911587393337;675.1550167749707;79.82701677497069123050.00000001292;45.646336920310354;14.24864356032569;674.5495083763258;79.22150837632586124716.66666668007;45.646417982647584;14.24837282591389;673.93788373123;78.60988373123007126383.33333334723;45.64649904498482;14.248102091502119;673.3262590861343;77.99825908613428128050.00000001438;45.64658010732205;14.247831357090348;672.7146344410385;77.3866344410385129700.00000001486;45.64666035903591;14.2475633300227;672.1091260423937;76.78112604239367131366.66666668176;45.646741421373136;14.247292595610872;671.4975013972978;76.16950139729788133033.33333334746;45.646822483710366;14.247021861199102;670.8858767522021;75.55787675220209134700.00000001315;45.646903546047604;14.246751126787359;670.2742521071062;74.9462521071063136350.0000000122;45.646983797761465;14.246483099719683;669.6687437084614;74.34074370846147138016.6666666779;45.647064860098695;14.246212365307883;669.0571190633657;73.72911906336569139683.3333333436;45.64714592243593;14.245941630896112;668.4454944182698;73.1174944182699141350.00000000928;45.647226984773155;14.245670896484341;667.8338697731741;72.50586977317411143016.66666667498;45.647308047110386;14.24540016207257;667.2222451280783;71.89424512807832144666.66666667402;45.64730165212721;14.245459494009538;667.1904405058468;71.86244050584688146333.33333333972;45.64723585565592;14.245743605368233;667.5511951428076;72.22319514280767148000.0000000054;45.64717005918462;14.246027716726985;667.9119497797684;72.58394977976846149666.6666666711;45.64710426271332;14.24631182808568;668.2727044167292;72.94470441672925151316.66666667015;45.647039124206735;14.246593098330806;668.6298515073204;73.30185150732044152983.33333333585;45.64697332773544;14.246877209689558;668.9906061442812;73.66260614428123154650.00000000154;45.646907531264134;14.247161321048253;669.351360781242;74.02336078124202156316.66666666724;45.646841734792844;14.247445432407005;669.7121154182028;74.38411541820281157966.66666666628;45.64677659628626;14.247726702652159;670.0692625087939;74.741262508794159633.33333333198;45.64671079981496;14.248010814010854;670.4300171457547;75.10201714575479161299.99999999767;45.64664500334366;14.248294925369606;670.7907717827155;75.46277178271558162966.66666666337;45.64657920687237;14.248579036728302;671.1515264196763;75.82352641967637164616.6666666624;45.64651406836578;14.248860306973427;671.5086735102675;76.18067351026755166283.3333333281;45.64644827189448;14.24914441833215;671.8694281472283;76.54142814722834167949.9999999938;45.64638247542318;14.249428529690874;672.2301827841891;76.90218278418914169616.6666666595;45.646316678951884;14.249712641049598;672.5909374211499;77.26293742114993171283.3333333252;45.646250882480594;14.249996752408322;672.9516920581107;77.62369205811072172933.33333332423;45.646185743974;14.250278022653475;673.3088391487018;77.9808391487019174599.99999998993;45.646119947502704;14.25056213401217;673.6695937856626;78.3415937856627176266.66666665563;45.64605415103141;14.250846245370923;674.0303484226234;78.70234842262349177933.33333332132;45.6459883545601;14.251130356729618;674.3911030595842;79.06310305958428179583.33333332036;45.64592321605352;14.251411626974772;674.7482501501754;79.42025015017546181249.99999998606;45.64585741958223;14.251695738333495;675.1090047871362;79.78100478713625182916.66666665176;45.64579162311093;14.25197984969222;675.469759424097;80.14175942409705184583.33333331745;45.64572582663963;14.252263961050943;675.8305140610578;80.50251406105784186233.3333333165;45.64566068813304;14.252545231296097;676.187661151649;80.85966115164902187899.9999999822;45.64559489166175;14.252829342654792;676.5484157886098;81.22041578860981189566.66666664788;45.645529095190454;14.253113454013544;676.9091704255706;81.5811704255706191233.33333331358;45.64546329871915;14.25339756537224;677.2699250625313;81.9419250625314192899.99999997928;45.64539750224785;14.253681676730992;677.6306796994921;82.30267969949219194549.99999997832;45.64533236374127;14.253962946976145;677.9878267900833;82.65982679008337196216.666666644;45.645266567269964;14.25424705833484;678.3485814270441;83.02058142704416197883.3333333097;45.645200770798674;14.254531169693593;678.7093360640049;83.38133606400496199549.9999999754;45.64513497432738;14.254815281052288;679.0700907009657;83.74209070096575201199.99999997445;45.64506983582079;14.255096551297413;679.4272377915569;84.09923779155693202866.66666664014;45.64500403934949;14.255380662656165;679.7879924285177;84.45999242851772204533.33333330584;45.64493824287819;14.25566477401486;680.1487470654785;84.82074706547851206199.99999997154;45.6448724464069;14.255948885373613;680.5095017024393;85.1815017024393207849.99999997058;45.644807307900315;14.256230155618766;680.8666487930304;85.53864879303049209516.66666663627;45.64474151142901;14.256514266977462;681.2274034299912;85.89940342999128211183.33333330197;45.644675714957714;14.256798378336214;681.588158066952;86.26015806695207212849.99999996767;45.64460991848642;14.257082489694909;681.9489127039128;86.62091270391286214516.66666663336;45.64454412201511;14.257366601053661;682.3096673408736;86.98166734087366216166.6666666324;45.644478983508534;14.257647871298786;682.6668144314648;87.33881443146484217833.3333332981;45.64441318703724;14.257931982657482;683.0275690684256;87.69956906842563219499.9999999638;45.64434739056594;14.258216094016234;683.3883237053864;88.06032370538642221166.6666666295;45.644281594094636;14.25850020537493;683.7490783423472;88.42107834234722222816.66666662853;45.64421645558806;14.258781475620083;684.1062254329383;88.7782254329384224483.33333329423;45.64415065911676;14.259065586978835;684.4669800698991;89.13898006989919226149.99999995992;45.644084862645464;14.25934969833753;684.8277347068599;89.49973470685998227816.66666662562;45.64401906617416;14.259633809696282;685.1884893438207;89.86048934382077229466.66666662466;45.643953927667575;14.25991507994138;685.5456364344119;90.21763643441196231133.33333329036;45.643888131196285;14.260199191300103;685.9063910713727;90.57839107137275232799.99999995605;45.64382233472498;14.260483302658855;686.2671457083335;90.93914570833354234466.66666662175;45.64375653825368;14.26076741401755;686.6279003452943;91.29990034529433236116.6666666208;45.6436913997471;14.261048684262704;686.9850474358855;91.65704743588552237783.3333332865;45.6436256032758;14.2613327956214;687.3458020728463;92.01780207284631239449.99999995218;45.6435598068045;14.261616906980151;687.706556709807;92.3785567098071241116.66666661788;45.64349401033321;14.261901018338847;688.0673113467678;92.73931134676789242783.33333328358;45.64342821386191;14.262185129697599;688.4280659837286;93.10006598372868244433.33333328262;45.643363075355325;14.262466399942753;688.7852130743198;93.45721307431987246099.9999999483;45.64329727888402;14.262750511301448;689.1459677112806;93.81796771128066247766.666666614;45.64323148241273;14.2630346226602;689.5067223482414;94.17872234824145249433.3333332797;45.64316568594143;14.263318734018895;689.8674769852022;94.53947698520224251083.33333327874;45.64310054743484;14.26360000426402;690.2246240757934;94.89662407579343252749.99999994444;45.643034750963544;14.263884115622773;690.5853787127542;95.25737871275422254416.66666661014;45.64296895449225;14.264168226981468;690.946133349715;95.61813334971501256083.33333327583;45.64290315802096;14.26445233834022;691.3068879866757;95.9788879866758257733.33333327487;45.642838019514365;14.264733608585374;691.6640350772669;96.33603507726698259399.99999994057;45.64277222304307;14.265017719944069;692.0247897142277;96.69678971422778261066.66666660627;45.64270642657177;14.265301831302821;692.3855443511885;97.05754435118857262733.333333273;45.64264063010047;14.265585942661517;692.7462989881493;97.41829898814936264399.9999999416;45.64257483362917;14.265870054020269;693.1070536251101;97.77905362511015266049.99999994354;45.64250969512259;14.266151324265394;693.4642007157013;98.13620071570134267716.66666661215;45.642443898651294;14.26643543562409;693.8249553526621;98.49695535266213269383.33333328075;45.64237810217999;14.266719546982841;694.1857099896229;98.85770998962292271049.99999994936;45.64231230570869;14.267003658341537;694.5464646265837;99.21846462658371272699.9999999513;45.642247167202115;14.26728492858669;694.9036117171748;99.5756117171749274366.6666666199;45.64218137073082;14.267569039945442;695.2643663541356;99.93636635413569276033.3333332885;45.64211557425951;14.267853151304138;695.6251209910964;100.29712099109648277699.9999999571;45.642049777788216;14.26813726266289;695.9858756280572;100.65787562805727279349.999999959;45.64198463928163;14.268418532908015;696.3430227186484;101.01502271864845281016.6666666276;45.64191884281034;14.26870264426671;696.7037773556092;101.37577735560924282683.33333329624;45.64185304633904;14.268986755625463;697.06453199257;101.73653199257004284349.99999996484;45.64178724986774;14.269270866984158;697.4252866295308;102.09728662953083286016.66666663345;45.64172145339644;14.26955497834291;697.7860412664916;102.45804126649162287666.66666663537;45.64165631488985;14.269836248588064;698.1431883570827;102.8151883570828289333.333333304;45.64159051841855;14.270120359946759;698.5039429940435;103.1759429940436290999.9999999726;45.64152472194726;14.270404471305511;698.8646976310043;103.53669763100439292666.6666666412;45.641458925475966;14.270688582664206;699.2254522679651;103.89745226796518294316.6666666431;45.641393786969374;14.27096985290936;699.5825993585563;104.25459935855636295983.3333333117;45.64132799049808;14.271253964268084;699.9433539955171;104.61535399551715297649.9999999803;45.64126219402679;14.271538075626808;700.3041086324779;104.97610863247795299316.66666664893;45.64122336224726;14.271762832837169;700.6366848576813;105.30868485768133300966.66666665085;45.64136357023958;14.271592098414061;700.7792425048891;105.45124250488917302633.33333331946;45.64150519447425;14.27141963940079;700.9232401283314;105.59524012833143304299.99999998807;45.641646818708914;14.271247180387547;701.0672377517736;105.73923775177369305966.6666666567;45.64178844294358;14.271074721374276;701.2112353752159;105.88323537521595307616.6666666586;45.641928650935895;14.27090398695114;701.3537930224238;106.02579302242378309283.3333333272;45.64207027517057;14.270731527937897;701.497790645866;106.16979064586604310949.9999999958;45.64221189940523;14.270559068924655;701.6417882693083;106.3137882693083312616.6666666644;45.642353523639905;14.270386609911384;701.7857858927505;106.45778589275056314283.333333333;45.64249514787457;14.270214150898141;701.9297835161929;106.60178351619282315933.33333333494;45.642635355866894;14.270043416475005;702.0723411634007;106.74434116340066317600.00000000355;45.64277698010156;14.269870957461734;702.2163387868429;106.88833878684292319266.66666667216;45.642918604336224;14.269698498448463;702.3603364102852;107.03233641028518320933.33333334076;45.64306022857089;14.269526039435249;702.5043340337274;107.17633403372744322583.3333333427;45.64320043656321;14.269355305012112;702.6468916809353;107.31889168093528324250.0000000113;45.64334206079788;14.269182845998841;702.7908893043775;107.46288930437754325916.6666666799;45.64348368503254;14.269010386985599;702.9348869278198;107.6068869278198327583.3333333485;45.643625309267215;14.268837927972328;703.078884551262;107.75088455126206329233.3333333504;45.64376551725953;14.26866719354922;703.2214421984698;107.8934421984699330900.00000001903;45.6439071414942;14.268494734535977;703.3654398219121;108.03743982191216332566.66666668764;45.64404876572887;14.268322275522706;703.5094374453544;108.18143744535442334233.33333335625;45.64419038996353;14.268149816509435;703.6534350687966;108.32543506879668335900.00000002485;45.6443320141982;14.267977357496193;703.7974326922389;108.46943269223894337550.0000000268;45.64447222219052;14.267806623073085;703.9399903394467;108.61199033944678339216.6666666954;45.64461384642519;14.267634164059814;704.0839879628891;108.75598796288904340883.333333364;45.64475547065985;14.267461705046571;704.2279855863312;108.8999855863313342550.0000000326;45.644897094894525;14.2672892460333;704.3719832097736;109.04398320977356344200.0000000345;45.64503730288684;14.267118511610164;704.5145408569814;109.1865408569814345866.6666667031;45.64517892712151;14.26694605259695;704.6585384804237;109.33053848042366347533.33333337173;45.64532055135618;14.266773593583679;704.8025361038659;109.47453610386592349200.00000004034;45.64546217559084;14.266601134570408;704.9465337273082;109.61853372730818350850.00000004226;45.64560238358317;14.266430400147271;705.089091374516;109.76109137451601352516.66666671087;45.64574400781783;14.266257941134029;705.2330889979582;109.90508899795827354183.3333333795;45.6458856320525;14.266085482120758;705.3770866214005;110.04908662140053355850.0000000481;45.64602725628717;14.265913023107544;705.5210842448428;110.1930842448428357516.6666667167;45.646168880521834;14.265740564094273;705.665081868285;110.33708186828505359166.6666667186;45.64630908851415;14.265569829671136;705.8076395154928;110.47963951549289360833.3333333872;45.64645071274882;14.265397370657894;705.9516371389351;110.62363713893515362500.0000000558;45.64659233698349;14.265224911644623;706.0956347623774;110.76763476237741364166.6666667244;45.64673396121815;14.265052452631352;706.2396323858196;110.91163238581967365816.66666672635;45.64687416921048;14.264881718208244;706.3821900330274;111.05419003302751367483.33333339496;45.64701579344514;14.264709259195001;706.5261876564698;111.19818765646977369150.00000006356;45.64715741767981;14.26453680018173;706.670185279912;111.34218527991203370816.66666673217;45.64729904191448;14.264364341168488;706.8141829033543;111.48618290335429372466.6666667341;45.6474392499068;14.26419360674538;706.9567405505621;111.62874055056213374133.3333334027;45.64758087414146;14.264021147732109;707.1007381740044;111.77273817400439375800.0000000713;45.64772249837613;14.263848688718866;707.2447357974467;111.91673579744665377466.6666667399;45.6478641226108;14.263676229705595;707.3887334208889;112.06073342088891379116.66666674183;45.648004330603115;14.263505495282459;707.5312910680967;112.20329106809675380783.33333341044;45.64814595483779;14.263333036269245;707.675288691539;112.347288691539382450.00000007905;45.64828757907245;14.263160577255974;707.8192863149812;112.49128631498127384116.66666674765;45.64842920330712;14.262988118242703;707.9632839384235;112.63528393842353385783.33333341626;45.64857082754179;14.26281565922946;708.1072815618658;112.77928156186579387433.3333334182;45.64871103553411;14.262644924806324;708.2498392090736;112.92183920907362389100.0000000868;45.64885265976877;14.262472465793053;708.3938368325158;113.06583683251588390766.6666667554;45.64899428400344;14.262300006779839;708.5378344559581;113.20983445595814392433.333333424;45.64913590823811;14.262127547766568;708.6818320794004;113.3538320794004394083.3333334259;45.649276116230425;14.261956813343431;708.8243897266082;113.49638972660824395750.00000009453;45.6494177404651;14.26178435433016;708.9683873500505;113.6403873500505397416.66666676314;45.64955936469976;14.261611895316918;709.1123849734927;113.78438497349276399083.33333343174;45.64970098893443;14.261439436303647;709.256382596935;113.92838259693502400733.33333343366;45.64984119692675;14.261268701880539;709.3989402441429;114.07094024414286402400.00000010227;45.64998282116142;14.261096242867296;709.5429378675851;114.21493786758512404066.6666667709;45.65012444539608;14.260923783854025;709.6869354910274;114.35893549102738405733.3333334395;45.65026606963075;14.260751324840754;709.8309331144696;114.50293311446964407400.0000001081;45.65040769386542;14.260578865827512;709.9749307379119;114.6469307379119409050.00000011;45.650547901857735;14.260408131404404;710.1174883851197;114.78948838511974410716.6666667786;45.65068952609241;14.260235672391133;710.261486008562;114.933486008562412383.3333334472;45.65083115032707;14.26006321337789;710.4054836320042;115.07748363200426414050.00000011583;45.65097277456174;14.25989075436462;710.5494812554465;115.22148125544652415700.00000011775;45.65111298255406;14.259720019941483;710.6920389026543;115.36403890265436417366.66666678636;45.65125460678873;14.259547560928269;710.8360365260966;115.50803652609662419033.33333345497;45.65139623102339;14.259375101914998;710.9800341495388;115.65203414953888420700.0000001236;45.65153785525806;14.259202642901755;711.1240317729811;115.79603177298114422350.0000001255;45.65167806325039;14.25903190847859;711.2665894201889;115.93858942018898424016.6666667941;45.651819687485045;14.258859449465348;711.4105870436313;116.08258704363124425683.3333334627;45.65196131171972;14.258686990452077;711.5545846670734;116.2265846670735427350.0000001313;45.65210293595438;14.258514531438863;711.6985822905158;116.37058229051576429016.6666667999;45.65224456018905;14.258342072425592;711.8425799139579;116.51457991395802430666.66666680184;45.65238476818137;14.258171338002455;711.9851375611659;116.65713756116585432333.33333347045;45.65252639241604;14.257998878989213;712.1291351846081;116.80113518460811434000.00000013906;45.6526680166507;14.257826419975942;712.2731328080504;116.94513280805037435666.66666680767;45.65280964088537;14.25765396096267;712.4171304314926;117.08913043149263437316.6666668096;45.6529498488777;14.257483226539591;712.5596880787004;117.23168807870047438983.3333334782;45.653091473112354;14.25731076752632;712.7036857021427;117.37568570214273440650.0000001468;45.65323309734703;14.25713830851305;712.847683325585;117.51968332558499442316.6666668154;45.653281741457114;14.257055339336489;712.9194615349263;117.59146153492628443966.6666668173;45.653125012922565;14.257170395037093;712.8313829887148;117.50338298871489445633.33333348593;45.65296670127151;14.25728661291646;712.7424147602185;117.41441476021853447300.00000015454;45.652808389620446;14.257402830795797;712.6534465317221;117.32544653172218448966.66666682315;45.65265007796939;14.257519048675164;712.5644783032258;117.23647830322582450616.66666682507;45.65249334943484;14.25763410437574;712.4763997570144;117.14839975701443452283.3333334937;45.65233503778378;14.257750322255106;712.387431528518;117.05943152851808453950.0000001623;45.652176726132716;14.257866540134444;712.2984633000217;116.97046330002172455616.6666668309;45.65201841448165;14.25798275801381;712.2094950715253;116.88149507152536457283.3333334995;45.6518601028306;14.258098975893205;712.120526843029;116.79252684302901458933.3333335014;45.65170337429605;14.258214031593724;712.0324482968176;116.70444829681762460600.00000017;45.651545062644985;14.258330249473119;711.9434800683213;116.61548006832126462266.66666683863;45.65138675099393;14.258446467352485;711.8545118398249;116.5265118398249463933.33333350724;45.65122843934287;14.258562685231851;711.7655436113286;116.43754361132855465583.33333350916;45.65107171080832;14.258677740932399;711.6774650651171;116.34946506511716467250.00000017777;45.65091339915726;14.258793958811765;711.5884968366208;116.2604968366208468916.6666668464;45.65075508750619;14.258910176691131;711.4995286081244;116.17152860812445470583.333333515;45.650596775855135;14.25902639457047;711.4105603796281;116.08256037962809472233.3333335169;45.650440047320586;14.259141450271045;711.3224818334166;115.9944818334167473900.0000001855;45.65028173566952;14.25925766815044;711.2335136049203;115.90551360492034475566.6666668541;45.65012342401847;14.25937388602975;711.1445453764239;115.81654537642399477233.3333335227;45.64996511236741;14.259490103909144;711.0555771479276;115.72757714792763478900.0000001913;45.64980680071635;14.25960632178851;710.9666089194312;115.63860891943128480550.00000019325;45.6496500721818;14.259721377489058;710.8785303732199;115.55053037321989482216.66666686186;45.64949176053073;14.259837595368424;710.7895621447235;115.46156214472353483883.33333353046;45.64933344887967;14.25995381324779;710.7005939162271;115.37259391622717485550.00000019907;45.64917513722862;14.260070031127157;710.6116256877308;115.28362568773082487200.000000201;45.64901840869406;14.260185086827704;710.5235471415194;115.19554714151943488866.6666668696;45.648860097043006;14.26030130470707;710.4345789130231;115.10657891302307490533.3333335382;45.64870178539195;14.260417522586437;710.3456106845267;115.01761068452672492200.0000002068;45.64854347374089;14.260533740465775;710.2566424560304;114.92864245603036493850.00000020873;45.64838674520634;14.260648796166379;710.1685639098189;114.84056390981897495516.66666687734;45.64822843355528;14.260765014045745;710.0795956813226;114.75159568132261497183.33333354595;45.64807012190421;14.260881231925111;709.9906274528262;114.66262745282626498850.00000021455;45.647911810253156;14.26099744980445;709.9016592243299;114.5736592243299500516.66666688316;45.64775349860209;14.261113667683816;709.8126909958335;114.48469099583355502166.6666668851;45.647596770067544;14.261228723384392;709.7246124496221;114.39661244962215503833.3333335537;45.64743845841649;14.26134494126373;709.6356442211257;114.3076442211258505500.0000002223;45.647280146765425;14.261461159143096;709.5466759926294;114.21867599262944507166.6666668909;45.64712183511437;14.261577377022462;709.457707764133;114.12970776413309508816.6666668928;45.64696510657982;14.26169243272301;709.3696292179217;114.0416292179217510483.33333356143;45.64680679492875;14.261808650602404;709.2806609894253;113.95266098942534512150.00000023004;45.646648483277694;14.26192486848177;709.191692760929;113.86369276092898513816.66666689864;45.64649017162663;14.262041086361137;709.1027245324326;113.77472453243263515466.66666690056;45.64633344309208;14.262156142061684;709.0146459862212;113.68664598622124517133.3333335692;45.64617513144103;14.26227235994105;708.9256777577249;113.59767775772488518800.0000002378;45.64601681978996;14.262388577820417;708.8367095292285;113.50870952922853520466.6666669064;45.64585850813891;14.262504795699755;708.7477413007322;113.41974130073217522116.6666669083;45.64570177960436;14.26261985140033;708.6596627545207;113.33166275452078523783.3333335769;45.645543467953296;14.262736069279697;708.5706945260245;113.24269452602442525450.0000002414;45.64538515630223;14.262852287159035;708.481726297528;113.15372629752807527116.6666669042;45.64522684465117;14.26296850503843;708.3927580690317;113.06475806903171528783.333333567;45.645068533000114;14.263084722917796;708.3037898405353;112.97578984053536530433.3333335632;45.644911804465565;14.263199778618372;708.2157112943239;112.88771129432396532100.000000226;45.6447534928145;14.26331599649771;708.1267430658276;112.79874306582761533766.6666668887;45.644595181163446;14.263432214377076;708.0377748373312;112.70977483733125535433.3333335515;45.64443686951239;14.263548432256442;707.9488066088348;112.6208066088349537083.3333335477;45.644280140977834;14.26366348795699;707.8607280626235;112.5327280626235538750.0000002105;45.64412182932677;14.263779705836356;707.7717598341271;112.44375983412715540416.6666668733;45.64396351767571;14.263895923715722;707.6827916056308;112.3547916056308542083.333333536;45.64380520602465;14.264012141595117;707.5938233771344;112.26582337713444543733.3333335322;45.6436484774901;14.264127197295636;707.505744830923;112.17774483092305545400.000000195;45.64349016583904;14.26424341517503;707.4167766024267;112.08877660242669547066.6666668578;45.643331854187984;14.264359633054397;707.3278083739303;111.99980837393034548733.3333335206;45.64317354253693;14.264475850933735;707.238840145434;111.91084014543398550400.0000001834;45.643015230885865;14.264592068813101;707.1498719169376;111.82187191693762552050.0000001795;45.64285850235132;14.264707124513677;707.0617933707263;111.73379337072623553716.6666668423;45.642700190700246;14.264823342393015;706.9728251422298;111.64482514222988555383.3333335051;45.64254187904919;14.264939560272381;706.8838569137336;111.55585691373352557050.0000001679;45.642383567398134;14.265055778151748;706.7948886852371;111.46688868523717558700.000000164;45.64222683886358;14.265170833852295;706.7068101390257;111.37881013902577560366.6666668268;45.64206852721252;14.265287051731661;706.6178419105294;111.28984191052942562033.3333334896;45.64191021556147;14.265403269611056;706.528873682033;111.20087368203306563700.0000001524;45.641751903910404;14.265519487490423;706.4399054535367;111.1119054535367565350.0000001485;45.641595175375855;14.26563454319097;706.3518269073253;111.02382690732532567016.6666668113;45.641436863724785;14.265750761070336;706.2628586788289;110.93485867882896568683.3333334741;45.64127855207373;14.265866978949703;706.1738904503326;110.8458904503326570350.0000001369;45.64112024042267;14.26598319682904;706.0849222218362;110.75692222183625572016.6666667997;45.64096192877161;14.266099414708407;705.9959539933399;110.66795399333989573666.6666667958;45.64080520023706;14.266214470408983;705.9078754471285;110.5798754471285575333.3333334586;45.640646888586005;14.266330688288377;705.8189072186321;110.49090721863215577000.0000001214;45.64048857693494;14.266446906167687;705.7299389901358;110.40193899013579578666.6666667842;45.64033026528388;14.266563124047082;705.6409707616394;110.31297076163943580316.6666667804;45.64017353674934;14.266678179747657;705.5528922154281;110.22489221542804581983.3333334432;45.64001522509827;14.266794397626995;705.4639239869316;110.13592398693169583650.0000001059;45.63985691344721;14.266910615506362;705.3749557584354;110.04695575843533585316.6666667687;45.63969860179615;14.267026833385728;705.2859875299389;109.95798752993898586966.6666667649;45.6395418732616;14.267141889086275;705.1979089837275;109.86990898372758588633.3333334277;45.63938356161054;14.267258106965642;705.1089407552312;109.78094075523123590300.0000000905;45.63922524995948;14.267374324845008;705.0199725267348;109.69197252673487591966.6666667532;45.639066938308424;14.267490542724403;704.9310042982385;109.60300429823852593616.6666667494;45.638910209773876;14.267605598424922;704.8429257520271;109.51492575202712595283.3333334122;45.638751898122806;14.267721816304316;704.7539575235307;109.42595752353077596950.000000075;45.63859358647175;14.267838034183683;704.6649892950344;109.33698929503441598616.6666667378;45.63843527482069;14.26795425206302;704.576021066538;109.24802106653806600283.3333334005;45.63827696316963;14.268070469942387;704.4870528380417;109.1590528380417601933.3333333967;45.63812023463508;14.268185525642963;704.3989742918303;109.07097429183031603600.0000000595;45.63796192298402;14.2683017435223;704.310006063334;108.98200606333396605266.6666667223;45.63780361133296;14.268417961401667;704.2210378348376;108.8930378348376606933.3333333851;45.63764529968189;14.268534179281033;704.1320696063412;108.80406960634124608583.3333333812;45.63748857114735;14.26864923498161;704.0439910601299;108.71599106012985610250.000000044;45.63733025949629;14.268765452860947;703.9550228316334;108.6270228316335611916.6666667068;45.637171947845225;14.268881670740342;703.8660546031372;108.53805460313714613583.3333333696;45.63701363619417;14.268997888619708;703.7770863746407;108.44908637464079615233.3333333657;45.63685690765962;14.269112944320256;703.6890078284293;108.3610078284294616900.0000000285;45.63669859600856;14.269229162199622;703.600039599933;108.27203959993304618566.6666666913;45.6365402843575;14.269345380078988;703.5110713714366;108.18307137143668620233.3333333541;45.63666568496151;14.269410657738035;703.9348596543009;108.60685965430092621900.0000000169;45.63683347935075;14.26946832364007;704.435266726219;109.10726672621904623550.000000013;45.6369995957961;14.26952541288307;704.9306697274179;109.60266972741798625216.6666666758;45.63716739018534;14.269583078785075;705.4310767993361;110.1030767993361626883.3333333386;45.63733518457458;14.26964074468711;705.9314838712542;110.60348387125421628550.0000000014;45.63750297896382;14.269698410589086;706.4318909431723;111.10389094317233630199.9999999976;45.63766909540918;14.269755499832087;706.9272939443713;111.59929394437127631866.6666666603;45.63783688979842;14.26981316573412;707.4277010162893;112.09970101628939633533.3333333231;45.63800468418766;14.269870831636155;707.9281080882075;112.6001080882075635199.9999999859;45.638172478576905;14.26992849753816;708.4285151601256;113.10051516012562636849.9999999821;45.638338595022255;14.26998558678116;708.9239181613245;113.59591816132456638516.6666666449;45.638506389411496;14.270043252683195;709.4243252332426;114.09632523324268640183.3333333076;45.63867418380074;14.270100918585172;709.9247323051608;114.5967323051608641849.9999999704;45.63884197818998;14.270158584487206;710.425139377079;115.09713937707892643516.6666666332;45.63900977257922;14.27021625038924;710.925546448997;115.59754644899704645166.6666666294;45.63917588902457;14.27027333963224;711.420949450196;116.09294945019597646833.3333332922;45.63934368341382;14.270331005534246;711.921356522114;116.59335652211409648499.999999955;45.63951147780307;14.270388671436251;712.4217635940322;117.09376359403221650166.6666666177;45.63967927219231;14.270446337338285;712.9221706659503;117.59417066595033651816.6666666139;45.63984538863766;14.270503426581257;713.4175736671492;118.08957366714927653483.3333332767;45.6400131830269;14.270561092483291;713.9179807390674;118.58998073906739655149.9999999395;45.64018097741614;14.270618758385325;714.4183878109855;119.0903878109855656816.6666666023;45.640348771805385;14.270676424287302;714.9187948829036;119.59079488290362658466.6666665984;45.640514888250735;14.270733513530303;715.4141978841026;120.08619788410256660133.3333332612;45.640682682639984;14.270791179432337;715.9146049560206;120.58660495602068661799.999999924;45.640850477029225;14.27084884533437;716.4150120279388;121.0870120279388663466.6666665868;45.64101827141847;14.270906511236376;716.9154190998569;121.58741909985692665116.6666665829;45.64118438786382;14.270963600479377;717.4108221010558;122.08282210105585666783.3333332457;45.64135218225306;14.271021266381382;717.9112291729739;122.58322917297397668449.9999999085;45.6415199766423;14.271078932283388;718.4116362448921;123.08363624489209670116.6666665713;45.64168777103154;14.271136598185421;718.9120433168102;123.58404331681021671783.3333332341;45.641855565420784;14.271194264087455;719.4124503887283;124.08445038872833673433.3333332302;45.64202168186613;14.271251353330456;719.9078533899273;124.57985338992727675099.999999893;45.642189476255375;14.271309019232433;720.4082604618453;125.08026046184538676766.6666665558;45.64235727064463;14.271366685134467;720.9086675337635;125.5806675337635678433.3333332186;45.64252506503387;14.271424351036472;721.4090746056816;126.08107460568162680083.3333332147;45.64269118147922;14.271481440279473;721.9044776068805;126.57647760688056681749.9999998775;45.642858975868464;14.271539106181507;722.4048846787987;127.07688467879868683416.6666665403;45.643026770257705;14.27159677208354;722.9052917507167;127.5772917507168685083.3333332031;45.64319456464695;14.271654437985518;723.4056988226351;128.07769882263514686733.3333331993;45.6433606810923;14.271711527228518;723.9011018238355;128.5731018238355688399.999999862;45.64352847548154;14.271769193130552;724.401508895755;129.07350889575503690066.6666665248;45.64369626987078;14.271826859032558;724.9019159676745;129.57391596767457691733.3333331876;45.64386406426002;14.271884524934592;725.4023230395941;130.0743230395941693399.9999998504;45.644031858649264;14.271942190836597;725.9027301115136;130.57473011151365695049.9999998466;45.64419797509462;14.27199928007957;726.3981331127139;131.070133112714696716.6666665094;45.64436576948386;14.272056945981603;726.8985401846335;131.57054018463353698383.3333331721;45.644533563873104;14.272114611883637;727.398947256553;132.07094725655307700049.9999998349;45.644701358262346;14.272172277785671;727.8993543284726;132.5713543284726701699.9999998311;45.644867474707695;14.272229367028643;728.394757329673;133.06675732967295703366.6666664939;45.64503526909694;14.272287032930649;728.8951644015924;133.5671644015925705033.3333331567;45.645203063486186;14.272344698832683;729.3955714735121;134.06757147351203706699.9999998194;45.64537085787543;14.272402364734688;729.8959785454315;134.56797854543157708349.9999998156;45.645536974320784;14.272459453977689;730.3913815466319;135.06338154663192710016.6666664784;45.645704768710026;14.272517119879723;730.8917886185515;135.56378861855146711683.3333331412;45.64587256309927;14.2725747857817;731.392195690471;136.064195690471713349.999999804;45.64604035748851;14.272632451683734;731.8926027623905;136.56460276239054715016.6666664667;45.64620815187775;14.272690117585768;732.3930098343101;137.06500983431008716666.6666664629;45.6463742683231;14.272747206828768;732.8884128355104;137.56041283551042718333.3333331257;45.64654206271234;14.272804872730774;733.3888199074299;138.06081990742996719999.9999997885;45.646709857101584;14.27286253863278;733.8892269793495;138.5612269793495721666.6666664513;45.646877651490826;14.272920204534785;734.389634051269;139.06163405126904723316.6666664474;45.647043767936175;14.272977293777785;734.8850370524693;139.55703705246938724983.3333331102;45.647211562325424;14.27303495967982;735.3854441243889;140.05744412438892726649.999999773;45.647379356714666;14.273092625581853;735.8858511963084;140.55785119630846728316.6666664358;45.64754715110391;14.27315029148383;736.386258268228;141.058258268228729966.6666664319;45.64771326754926;14.27320738072683;736.8816612694284;141.55366126942835731633.3333330947;45.6478810619385;14.273265046628865;737.3820683413478;142.0540683413479733299.9999997575;45.64804885632775;14.27332271253087;737.8824754132675;142.55447541326743734966.6666664203;45.64821665071699;14.273380378432904;738.3828824851869;143.05488248518697736616.6666664165;45.64838276716234;14.273437467675905;738.8782854863873;143.5502854863873738283.3333330792;45.64855056155159;14.273495133577939;739.3786925583069;144.05069255830685739949.999999742;45.64871835594083;14.273552799479916;739.8790996302264;144.5510996302264741616.6666664048;45.64888615033007;14.27361046538195;740.3795067021459;145.05150670214593743283.3333330676;45.64905394471931;14.273668131283955;740.8799137740655;145.55191377406547744933.3333330638;45.64922006116466;14.273725220526956;741.3753167752658;146.0473167752658746599.9999997265;45.649387855553904;14.27378288642899;741.8757238471853;146.54772384718535748266.6666663893;45.649555649943146;14.273840552330995;742.3761309191049;147.0481309191049749933.3333330521;45.64972344433239;14.273898218233;742.8765379910244;147.54853799102443751583.3333330483;45.64988956077774;14.273955307476001;743.3719409922247;148.04394099222478753249.999999711;45.65005735516698;14.274012973378035;743.8723480641443;148.54434806414432754916.6666663738;45.65022514955622;14.27407063928004;744.3727551360638;149.04475513606386756583.3333330366;45.65039294394546;14.274128305182046;744.8731622079833;149.5451622079834758233.3333330328;45.65028152574198;14.274150852567061;744.6518315573833;149.32383155738324759899.9999996956;45.650110863242396;14.274166394252035;744.2781732002777;148.9501732002778761566.6666663584;45.64994020074282;14.274181935937065;743.9045148431724;148.57651484317233763233.3333330211;45.649769538243234;14.274197477622039;743.5308564860668;148.20285648606688764899.9999996839;45.64959887574366;14.274213019307012;743.1571981289615;147.82919812896142766549.9999996801;45.64942991986907;14.274228405575116;742.787276355427;147.45927635542702768216.6666663429;45.649259257369486;14.274243947260118;742.4136179983216;147.08561799832157769883.3333330057;45.64908859486991;14.274259488945091;742.0399596412161;146.7119596412161771549.9999996684;45.648917932370324;14.274275030630065;741.6663012841107;146.33830128411066773199.9999996646;45.64874897649573;14.274290416898168;741.2963795105762;145.96837951057626774866.6666663274;45.648578313996154;14.274305958583142;740.9227211534708;145.5947211534708776533.3333329902;45.64840765149657;14.274321500268144;740.5490627963653;145.22106279636535778199.999999653;45.648236988997;14.274337041953117;740.1754044392599;144.8474044392599779849.9999996491;45.64806803312241;14.27435242822122;739.8054826657254;144.4774826657255781516.6666663119;45.64789737062282;14.274367969906194;739.43182430862;144.10382430862003783183.3333329747;45.647726708123244;14.274383511591196;739.0581659515145;143.73016595151458784849.9999996375;45.64755604562366;14.274399053276198;738.6845075944091;143.35650759440912786516.6666663003;45.647385383124075;14.274414594961172;738.3108492373036;142.98284923730367788166.6666662964;45.64721642724949;14.274429981229304;737.9409274637692;142.61292746376927789833.3333329592;45.64704576474991;14.274445522914277;737.5672691066638;142.2392691066638791499.999999622;45.646875102250334;14.274461064599251;737.1936107495583;141.86561074955836793166.6666662848;45.64670443975075;14.274476606284225;736.8199523924529;141.4919523924529794816.666666281;45.646535483876164;14.274491992552356;736.4500306189185;141.1220306189185796483.3333329437;45.64636482137658;14.27450753423733;736.076372261813;140.74837226181305798149.9999996065;45.646194158876995;14.274523075922303;735.7027139047076;140.3747139047076799816.6666662693;45.64602349637741;14.274538617607277;735.3290555476021;140.00105554760214801466.6666662655;45.64585454050283;14.27455400387538;734.9591337740677;139.63113377406773803133.3333329282;45.64568387800325;14.274569545560382;734.5854754169623;139.25747541696228804799.999999591;45.64551321550367;14.274585087245356;734.2118170598568;138.88381705985682806466.6666662538;45.645342553004085;14.27460062893033;733.8381587027513;138.51015870275137808133.3333329166;45.6451718905045;14.274616170615303;733.4645003456459;138.1365003456459809783.3333329128;45.645002934629915;14.274631556883463;733.0945785721115;137.7665785721115811449.9999995755;45.64483227213033;14.274647098568437;732.720920215006;137.39292021500606813116.6666662383;45.644661609630745;14.27466264025341;732.3472618579005;137.0192618579006814783.3333329011;45.644490947131175;14.274678181938384;731.9736035007951;136.64560350079515816433.3333328973;45.64432199125659;14.274693568206516;731.6036817272607;136.27568172726075818099.9999995601;45.644151328757005;14.27470910989149;731.2300233701553;135.9020233701553819766.6666662229;45.64398066625742;14.274724651576463;730.8563650130498;135.52836501304984821433.3333328856;45.643810003757835;14.274740193261437;730.4827066559444;135.15470665594438823083.3333328818;45.64364104788325;14.274755579529568;730.11278488241;134.78478488240998824749.9999995446;45.643470385383665;14.274771121214542;729.7391265253045;134.41112652530452826416.6666662074;45.643299722884095;14.274786662899515;729.3654681681991;134.03746816819907828083.3333328702;45.64312906038451;14.27480220458449;728.9918098110936;133.6638098110936829733.3333328663;45.642960104509925;14.27481759085262;728.6218880375592;133.2938880375592831399.9999995291;45.64278944201034;14.274833132537623;728.2482296804537;132.92022968045376833066.6666661919;45.642618779510755;14.274848674222596;727.8745713233483;132.5465713233483834733.3333328547;45.64244811701117;14.27486421590757;727.5009129662428;132.17291296624285836399.9999995175;45.64227745451159;14.274879757592544;727.1272546091374;131.7992546091374838049.9999995136;45.642108498637015;14.274895143860675;726.7573328356029;131.429332835603839716.6666661764;45.64193783613743;14.274910685545649;726.3836744784975;131.05567447849754841383.3333328392;45.641767173637845;14.274926227230623;726.010016121392;130.68201612139208843049.999999502;45.64159651113826;14.274941768915596;725.6363577642866;130.30835776428663844699.9999994981;45.641427555263675;14.274957155183728;725.2664359907521;129.93843599075223846366.6666661609;45.64125689276409;14.274972696868701;724.8927776336468;129.56477763364677848033.3333328237;45.64108623026451;14.274988238553675;724.5191192765412;129.19111927654131849699.9999994865;45.64091556776493;14.275003780238649;724.1454609194359;128.81746091943586851349.9999994827;45.64074661189035;14.27501916650678;723.7755391459015;128.44753914590146853016.6666661454;45.640575949390765;14.275034708191754;723.401880788796;128.073880788796854683.3333328082;45.64040528689118;14.275050249876728;723.0282224316894;127.7002224316894856349.999999471;45.6402346243916;14.27506579156173;722.6545640745825;127.32656407458252858016.6666661338;45.64006396189202;14.275081333246703;722.2809057174757;126.95290571747564859666.66666613;45.639895006017426;14.275096719514835;721.9109839439398;126.58298394393984861333.3333327927;45.63972434351785;14.275112261199808;721.5373255868329;126.20932558683296862999.9999994555;45.63955368101826;14.275127802884782;721.1636672297261;125.83566722972608864666.6666661183;45.639383018518686;14.275143344569756;720.7900088726192;125.46200887261921866316.6666661145;45.6392140626441;14.275158730837887;720.4200870990834;125.0920870990834867983.3333327773;45.639043400144516;14.275174272522861;720.0464287419765;124.71842874197652869649.99999944;45.63887273764494;14.275189814207835;719.6727703848696;124.34477038486965871316.6666661028;45.63870207514535;14.275205355892808;719.2991120277627;123.97111202776277872966.666666099;45.63853311927076;14.27522074216094;718.9291902542269;123.60119025422696874633.3333327618;45.63836245677118;14.275236283845913;718.5555318971201;123.22753189712009876299.9999994246;45.638191794271606;14.275251825530887;718.1818735400132;122.85387354001321877966.6666660873;45.63802113177203;14.27526736721586;717.8082151829063;122.48021518290633879633.3333327501;45.63785046927244;14.275282908900834;717.4345568257994;122.10655682579946881283.3333327463;45.63768151339785;14.275298295168994;717.0646350522636;121.73663505226365882949.9999994091;45.63751085089827;14.275313836853968;716.6909766951568;121.36297669515677884616.6666660719;45.63734018839869;14.275329378538942;716.3173183380499;120.9893183380499886283.3333327346;45.637169525899104;14.275344920223915;715.943659980943;120.61565998094302887933.3333327308;45.63700057002452;14.275360306492047;715.5737382074071;120.24573820740721889599.9999993936;45.63682990752494;14.27537584817702;715.2000798503003;119.87207985030034891266.6666660564;45.63665924502536;14.275391389861994;714.8264214931935;119.49842149319346892933.3333327192;45.63648858252578;14.275406931546968;714.4527631360866;119.12476313608659894583.3333327153;45.636319626651186;14.2754223178151;714.0828413625508;118.75484136255078896249.9999993781;45.63614896415161;14.275437859500073;713.7091830054438;118.3811830054439897916.6666660409;45.635978301652024;14.275453401185047;713.335524648337;118.00752464833703899583.3333327037;45.63580763915244;14.27546894287002;712.9618662912301;117.63386629123015901233.3333326998;45.63563868327786;14.27548432913818;712.5919445176943;117.26394451769434902899.9999993626;45.635468020778276;14.275499870823154;712.2182861605875;116.89028616058746904566.6666660254;45.6352973582787;14.275515412508128;711.8446278034805;116.51662780348059906233.3333326882;45.635126695779114;14.27553095419313;711.4709694463737;116.14296944637371907899.999999351;45.63495603327953;14.275546495878103;711.0973110892668;115.76931108926684909549.9999993471;45.634787077404944;14.275561882146206;710.727389315731;115.39938931573103911216.6666660099;45.63461641490536;14.27557742383118;710.3537309586242;115.02573095862415912883.3333326727;45.634445752405774;14.275592965516154;709.9800726015172;114.65207260151728914549.9999993355;45.6342750899062;14.275608507201156;709.6064142444104;114.2784142444104916199.9999993317;45.63410613403162;14.275623893469259;709.2364924708745;113.90849247087459917866.6666659944;45.633935471532034;14.275639435154233;708.8628341137677;113.53483411376772919533.3333326572;45.63376480903245;14.275654976839206;708.4891757566609;113.16117575666084921199.99999932;45.633594146532864;14.27567051852418;708.1155173995539;112.78751739955396922849.9999993162;45.63342519065828;14.275685904792311;707.7455956260181;112.41759562601816924516.666665979;45.633254528158695;14.275701446477285;707.3719372689112;112.04393726891128926183.3333326417;45.63308386565911;14.275716988162316;706.9982789118044;111.6702789118044927849.9999993045;45.63291320315954;14.27573252984729;706.6246205546975;111.29662055469753929516.6666659673;45.632742540659954;14.275748071532263;706.2509621975906;110.92296219759065931166.6666659635;45.63257358478537;14.275763457800366;705.8810404240548;110.55304042405484932833.3333326263;45.632402922285785;14.275778999485368;705.5073820669479;110.17938206694797934499.999999289;45.6322322597862;14.275794541170342;705.1337237098411;109.80572370984109936166.6666659518;45.63231273754446;14.275617973290736;704.9891248855929;109.66112488559293937816.666665948;45.63243628620548;14.275409608418983;704.8859900973866;109.55799009738668939483.3333326108;45.63256108283278;14.275199138851491;704.781813543643;109.453813543643941149.9999992736;45.63268587946008;14.274988669284056;704.6776369898993;109.34963698989931942816.6666659364;45.632810676087374;14.274778199716621;704.5734604361556;109.24546043615562944466.6666659325;45.63293422474839;14.27456983484484;704.4703256479494;109.14232564794938946133.3333325953;45.633059021375686;14.274359365277377;704.3661490942056;109.03814909420569947799.9999992581;45.633183818002976;14.274148895709942;704.261972540462;108.93397254046201949466.6666659209;45.633308614630266;14.273938426142507;704.1577959867183;108.82979598671832951133.3333325837;45.63343341125756;14.273727956575073;704.0536194329746;108.72561943297464952783.3333325798;45.633556959918586;14.273519591703263;703.9504846447684;108.62248464476839954449.9999992426;45.633681756545876;14.273309122135828;703.8463080910246;108.5183080910247956116.6666659054;45.63380655317317;14.273098652568365;703.742131537281;108.41413153728102957783.3333325682;45.63393134980047;14.27288818300093;703.6379549835373;108.30995498353734959433.3333325643;45.63405489846149;14.272679818129177;703.5348201953311;108.20682019533109961099.9999992271;45.63417969508878;14.272469348561685;703.4306436415874;108.1026436415874962766.6666658899;45.63430449171607;14.27225887899425;703.3264670878436;107.99846708784372964433.3333325527;45.63442928834337;14.272048409426816;703.2222905341;107.89429053410004966083.3333325488;45.634552837004385;14.271840044555034;703.1191557458937;107.79115574589379967749.9999992116;45.63467763363168;14.271629574987571;703.0149791921501;107.6869791921501969416.6666658744;45.63480243025897;14.271419105420136;702.9108026384064;107.58280263840642971083.3333325372;45.634927226886276;14.271208635852673;702.8066260846628;107.47862608466274972733.3333325334;45.635050775547285;14.27100027098092;702.7034912964565;107.37549129645649974399.9999991962;45.63517557217459;14.270789801413429;702.5993147427127;107.2713147427128976066.6666658589;45.63530036880188;14.270579331845994;702.4951381889691;107.16713818896912977733</td>
<td></td>
</tr> -->
</tbody></table>
</body>
</html>
\ No newline at end of file
##############################################################################
#
# Copyright (c) 2011 Nexedi SARL and Contributors. All Rights Reserved.
# Kazuhiko <kazuhiko@nexedi.com>
# Rafael Monnerat <rafael@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import unittest
from Products.ERP5Type.tests.ERP5TypeFunctionalTestCase import ERP5TypeFunctionalTestCase
class TestDroneSimulator(ERP5TypeFunctionalTestCase):
foreground = 0
run_only = "drone_simulator_ui_site_zuite"
def getBusinessTemplateList(self):
return (
'erp5_ui_test_core',
'erp5_officejs_drone_simulator'
)
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestDroneSimulator))
return suite
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testFunctionalDroneSimulator</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testFunctionalDroneSimulator</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
erp5_officejs_ui_test
erp5_officejs_drone_simulator
\ No newline at end of file
Zelenium tests for erp5_officejs_drone_simulator
\ No newline at end of file
portal_tests/drone_simulator_ui_site_zuite
portal_tests/drone_simulator_ui_site_zuite/**
\ No newline at end of file
test.erp5.testFunctionalDroneSimulator
\ No newline at end of file
erp5_full_text_mroonga_catalog
\ No newline at end of file
erp5_officejs_drone_simulator_test
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>babylon.gui.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>rjs_babylonjs_babylon_gui_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Babylon Gui JS</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1662735315.78</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1004.640.34797.40738</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1671113080.17</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1662735269.07</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>babylon.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>rjs_babylonjs_babylon_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Babylon JS</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1662478090.16</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1004.640.30927.65416</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1671113077.18</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>empty</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1662478022.64</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Drone Simulator</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<!-- This gadget provides a babylonjs canvas that runs a Drone simulator -->
<!-- all within a web worker -->
<script src="jiodev.js" type="text/javascript"></script>
<script src="gadget_global.js" type="text/javascript"></script>
<script src="domsugar.js" type="text/javascript"></script>
<script src="babylonjs.gadget.js" type="text/javascript"></script>
</head>
<body>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Page" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>babylonjs.gadget.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>rjs_babylonjs_gadget_html</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Page</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>BabylonJS Gadget</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1662477489.54</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1004.65507.47895.35925</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1671113070.39</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1662477148.79</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*global window, rJS, domsugar, RSVP, Set, Worker,
requestAnimationFrame, cancelAnimationFrame*/
/*jslint nomen: true, indent: 2, maxlen: 80, white: true, evil: false */
(function (window, rJS, domsugar, RSVP, Set, Worker,
requestAnimationFrame, cancelAnimationFrame) {
"use strict";
// Events props to send to worker
var mouseEventFields = new Set(['altKey', 'bubbles', 'button', 'buttons',
'cancelBubble', 'cancelable', 'clientX', 'clientY', 'composed', 'ctrlKey',
'defaultPrevented', 'detail', 'eventPhase', 'fromElement', 'isTrusted',
'layerX', 'layerY', 'metaKey', 'movementX', 'movementY', 'offsetX', 'pageX',
'offsetY', 'pageY', 'relatedTarget', 'returnValue', 'screenX', 'screenY',
'shiftKey', 'timeStamp', 'type', 'which', 'x', 'wheelDelta', 'wheelDeltaX',
'wheelDeltaY', 'y', 'deltaX', 'deltaY', 'deltaZ', 'deltaMode'
]), game_result, canvas, offscreen;
//////////////////////////////////////////
// Webworker
//////////////////////////////////////////
function handleWorker(url, callback) {
var worker;
function canceller() {
worker.terminate();
}
function resolver(resolve, reject) {
worker = new Worker(url);
function handleError(error) {
canceller();
reject(error);
}
worker.onerror = handleError;
var result;
try {
result = callback(worker);
} catch (e) {
return handleError(e);
}
new RSVP.Queue(result)
.push(function (value) {
canceller();
console.log('resolve handle worker', value);
resolve(value);
}, handleError);
}
return new RSVP.Promise(resolver, canceller);
}
//////////////////////////////////////////
// promiseAnimationFrame
//////////////////////////////////////////
function promiseAnimationFrame() {
var request_id;
function canceller() {
cancelAnimationFrame(request_id);
}
function resolver(resolve) {
request_id = requestAnimationFrame(resolve);
}
return new RSVP.Promise(resolver, canceller);
}
//////////////////////////////////////////
// DroneGameManager
//////////////////////////////////////////
function DroneGameManager(gadget) {
this._gadget = gadget;
if (!(this instanceof DroneGameManager)) {
return new DroneGameManager();
}
}
DroneGameManager.prototype = {
constructor: DroneGameManager,
pause: function pauseGameManager() {
console.log('pausing', this.loop_promise);
if (!this.hasOwnProperty('loop_promise')) {
throw new Error('Can not pause the game if not started');
}
if (this.hasOwnProperty('pause_defer')) {
throw new Error('Can not pause the game if already paused');
}
this.pause_defer = RSVP.defer();
var pause_defer = this.pause_defer;
this.loop_promise
.push(function () {
return pause_defer.promise;
});
},
unpause: function continueGameManager() {
if (!this.hasOwnProperty('loop_promise')) {
throw new Error('Can not unpause the game if not started');
}
if (!this.hasOwnProperty('pause_defer')) {
throw new Error('Can not unpause the game if not paused');
}
this.pause_defer.resolve('unpause');
var pause_defer = this.pause_defer;
delete this.pause_defer;
},
quit: function stopGameManager() {
if (!this.hasOwnProperty('loop_promise')) {
throw new Error('Can not quit the game if not started');
}
this.loop_promise.cancel('Stopping game manager');
console.log('stopping game manager');
delete this.loop_promise;
delete this.pause_defer;
},
result: function resultGameManager() {
return game_result;
},
play: function startGameManager(options) {
if (this.hasOwnProperty('loop_promise')) {
throw new Error('Can not start the game if already started');
}
this.loop_promise = new RSVP.Queue();
var loop_promise = this.loop_promise,
context = this;
this.pause();
return RSVP.Queue(RSVP.any([
loop_promise,
handleWorker('gadget_erp5_page_babylonjs_web_worker.js',
function (worker) {
var message_error_handler_defer = RSVP.defer(),
update_defer = null;
function step() {
context.loop_promise
.push(function () {
worker.postMessage({
type: 'update'
});
update_defer = RSVP.defer();
return RSVP.all([
promiseAnimationFrame(),
update_defer.promise
]);
})
.push(step);
}
function cloneEvent(event) {
event.preventDefault();
var eventClone = {};
for (let field of mouseEventFields) {
eventClone[field] = event[field];
}
return eventClone;
}
function bindEvent(data) {
var target;
switch (data.targetName) {
case 'window':
target = window;
break;
case 'canvas':
target = options.canvas_original;
break;
case 'document':
target = document;
break;
}
if (!target) {
console.error('Unknown target: ' + data.targetName);
return;
}
target.addEventListener(data.eventName, function (e) {
// We can`t pass original event to the worker
var eventClone = cloneEvent(e);
if (eventClone.type === "pointerout") {
return;
}
worker.postMessage({
type: 'event',
targetName: data.targetName,
eventName: data.eventName,
eventClone: eventClone
});
}, data.opt);
}
function workerToMain(evt) {
switch (evt.data.type) {
case 'loaded':
return worker.postMessage({
type: 'start',
logic_url_list: options.logic_url_list,
canvas: options.canvas,
width: options.width,
height: options.height,
game_parameters: options.game_parameters
}, [options.canvas]);
case 'started':
console.log('GAME: started');
if (context._gadget) {
var loading =
context._gadget.element.querySelector('#loading');
if (loading) { loading.innerHTML = ""; }
}
context.unpause();
return step();
case 'updated':
return update_defer.resolve('updated');
case 'finished':
console.log('GAME: finished');
game_result = evt.data.result;
return context.quit();
case 'event':
bindEvent(evt.data);
break;
case 'canvasMethod':
options.canvas_original[evt.data.method](...evt.data.args);
break;
case 'canvasStyle':
options.canvas_original.style[evt.data.name] = evt.data.value;
break;
case 'error':
message_error_handler_defer.reject(evt.data.error);
break;
default:
message_error_handler_defer.reject(
new Error('Unsupported message ' + JSON.stringify(evt.data))
);
}
}
worker.onmessage = workerToMain;
// Always quit the game when the worker callback usage is over
// to prevent trying to call pause
return message_error_handler_defer.promise;
})
]))
.push(undefined, function (error) {
// As the loop_promise will be cancelled at some point when calling
// quit, we will get a CancellationError as result.
// This is expected, and play must be successfully resolved
if (!(error instanceof RSVP.CancellationError)) {
throw error;
}
});
}
};
rJS(window)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareMethod('render', function render(options) {
var gadget = this,
loading = domsugar('span', ["Loading..."]),
container = domsugar('div');
canvas = domsugar('canvas');
loading.id = "loading";
container.className = 'container';
container.appendChild(canvas);
domsugar(gadget.element, [loading, container]);
canvas.width = options.width;
canvas.height = options.height;
// https://doc.babylonjs.com/divingDeeper/scene/offscreenCanvas
offscreen = canvas.transferControlToOffscreen();
return gadget.changeState({
logic_file_list: options.logic_file_list,
game_parameters: options.game_parameters
});
})
.declareMethod('getContent', function getContent() {
var gadget = this;
return gadget.runGame({
logic_file_list: gadget.state.logic_file_list,
game_parameters: gadget.state.game_parameters
});
})
.declareMethod('runGame', function runGame(options) {
options.canvas = offscreen;
options.canvas_original = canvas;
options.width = canvas.width;
options.height = canvas.height;
options.logic_url_list = options.logic_file_list;
var gadget = this,
game_manager = new DroneGameManager(gadget);
return game_manager.play(options)
.push(function () {
return game_manager.result();
});
});
}(window, rJS, domsugar, RSVP, Set, Worker,
requestAnimationFrame, cancelAnimationFrame));
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>babylonjs.gadget.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>rjs_babylonjs_gadget_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>BabylonJS Gadget JS</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1662477484.97</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1005.2863.2128.31624</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1671205385.13</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1662477154.74</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*global self, window, rJS, jIO, RSVP, console, importScripts, bindHandler,
handlers, prepareCanvas, postMessage, runGame, updateGame, handleEvent*/
/*jslint nomen: true, indent: 2, maxerr: 3, maxlen: 80 */
self.window = {
addEventListener: function (event, fn, opt) {
bindHandler('window', event, fn, opt);
},
setTimeout: self.setTimeout.bind(self),
PointerEvent: true
};
self.document = {
addEventListener: function (event, fn, opt) {
bindHandler('document', event, fn, opt);
},
// Uses to detect wheel event like at src/Inputs/scene.inputManager.ts:797
createElement: function () {
return {onwheel: true};
},
defaultView: self.window
};
importScripts('babylon.js', 'babylon.gui.js', 'rsvp.js');
function mainToWorker(evt) {
var i, offscreen_canvas;
switch (evt.data.type) {
case 'start':
console.log("[WEB WORKER] Ready to handle the folliwing events:",
handlers.keys());
for (i = 0; i < evt.data.logic_url_list.length; i += 1) {
importScripts(evt.data.logic_url_list[i]);
}
offscreen_canvas = prepareCanvas(evt.data);
RSVP = window.RSVP;
return new RSVP.Queue()
.push(function () {
postMessage({'type': 'started'});
return runGame(offscreen_canvas, evt.data.game_parameters);
})
.push(function (result) {
return postMessage({'type': 'finished', 'result': result});
}, function (error) {
console.log("ERROR:", error);
return postMessage({'type': 'error', 'error': error});
});
case 'update':
return new RSVP.Queue()
.push(function () {
return updateGame();
})
.push(function () {
return postMessage({'type': 'updated'});
});
case 'event':
handleEvent(evt.data);
break;
default:
throw new Error('Unsupported message ' + JSON.stringify(evt.data));
}
}
// Doesn't work without it
class HTMLElement {}
self.handlers = new Map();
self.canvas = null;
// getBoundingInfo()
var rect = {
top: 0,
left: 0,
right: 0,
bottom: 0,
x: 0,
y: 0,
height: 0,
width: 0
};
function bindHandler(targetName, eventName, fn, opt) {
var handlerId = targetName + eventName;
handlers.set(handlerId, fn);
postMessage({
type: 'event',
targetName: targetName,
eventName: eventName,
opt: opt
});
}
function noop() {}
function handleEvent(event) {
var handlerId = event.targetName + event.eventName;
event.eventClone.preventDefault = noop;
event.eventClone.target = self.canvas;
if (!handlers.has(handlerId)) {
throw new Error('Unknown handlerId: ' + handlerId);
}
handlers.get(handlerId)(event.eventClone);
}
function prepareCanvas(data) {
var canvas = data.canvas, style;
self.canvas = canvas;
canvas.clientWidth = data.width;
canvas.clientHeight = data.height;
canvas.width = data.width;
canvas.height = data.height;
rect.right = rect.width = data.width;
rect.bottom = rect.height = data.height;
canvas.setAttribute = function (name, value) {
postMessage({
type: 'canvasMethod',
method: 'setAttribute',
args: [name, value]
});
};
canvas.addEventListener = function (event, fn, opt) {
bindHandler('canvas', event, fn, opt);
};
canvas.getBoundingClientRect = function () {
return rect;
};
canvas.focus = function () {
postMessage({
type: 'canvasMethod',
method: 'focus',
args: []
});
};
// noinspection JSUnusedGlobalSymbols
style = {
set touchAction (value) {
postMessage({
type: 'canvasStyle',
name: 'touchAction',
value: value
});
}
};
Object.defineProperty(canvas, 'style', {get () { return style }});
return canvas;
}
(function (worker) {
worker.onmessage = mainToWorker;
worker.postMessage({
'type': 'loaded'
});
}(this));
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_page_babylonjs_web_worker.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>rjs_babylonjs_web_worker_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>BabylonJS Web Worker JS</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1662477482.67</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1004.22590.57904.22954</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1671113075.12</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>empty</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1662477373.53</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
url_list = [
"babylonjs.gadget.html",
"babylonjs.gadget.js",
"gadget_erp5_page_babylonjs_web_worker.js",
"babylon.js",
"babylon.gui.js"
]
return url_list
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>REQUEST=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSection_getBabylonjsPrecacheManifestList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment