Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Georgios Dagkakis
erp5
Commits
4174385c
Commit
4174385c
authored
Jul 27, 2023
by
Roque
Browse files
Options
Browse Files
Download
Plain Diff
Drone simulator API refactoring
See merge request
nexedi/erp5!1803
parents
720d86ee
0b781233
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
91 additions
and
160 deletions
+91
-160
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_dronelogfollower_js.js
...em/web_page_module/drone_simulator_dronelogfollower_js.js
+4
-2
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_dronelogfollower_js.xml
...m/web_page_module/drone_simulator_dronelogfollower_js.xml
+2
-2
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_fixedwingdrone_js.js
...Item/web_page_module/drone_simulator_fixedwingdrone_js.js
+48
-109
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_fixedwingdrone_js.xml
...tem/web_page_module/drone_simulator_fixedwingdrone_js.xml
+3
-3
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_logic_js.js
...hTemplateItem/web_page_module/drone_simulator_logic_js.js
+25
-35
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_logic_js.xml
...TemplateItem/web_page_module/drone_simulator_logic_js.xml
+2
-2
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/ojs_drone_simulator_script_page_js.js
...tem/web_page_module/ojs_drone_simulator_script_page_js.js
+4
-4
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/ojs_drone_simulator_script_page_js.xml
...em/web_page_module/ojs_drone_simulator_script_page_js.xml
+3
-3
No files found.
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_dronelogfollower_js.js
View file @
4174385c
...
...
@@ -43,9 +43,8 @@ var DroneLogAPI = /** @class */ (function () {
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
,
i
,
splitted_log_entry
,
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
])
{
...
...
@@ -208,6 +207,9 @@ var DroneLogAPI = /** @class */ (function () {
DroneLogAPI
.
prototype
.
exit
=
function
(
drone
)
{
return
;
};
DroneLogAPI
.
prototype
.
set_loiter_mode
=
function
(
loiter
)
{
return
;
};
return
DroneLogAPI
;
}());
\ No newline at end of file
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_dronelogfollower_js.xml
View file @
4174385c
...
...
@@ -246,7 +246,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
100
6.43901.65103.9898
</string>
</value>
<value>
<string>
100
9.38419.20212.62293
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -266,7 +266,7 @@
</tuple>
<state>
<tuple>
<float>
16
77599947.8
</float>
<float>
16
88635412.87
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_fixedwingdrone_js.js
View file @
4174385c
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_fixedwingdrone_js.xml
View file @
4174385c
...
...
@@ -226,7 +226,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<
string>
zope
</string
>
</value>
<value>
<
unicode>
zope
</unicode
>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -240,7 +240,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
100
6.36731.10993.50739
</string>
</value>
<value>
<string>
100
9.59163.16294.47701
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
16
77169724.0
</float>
<float>
16
90395852.2
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_logic_js.js
View file @
4174385c
...
...
@@ -31,7 +31,6 @@ var DroneManager = /** @class */ (function () {
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
(
...
...
@@ -61,11 +60,6 @@ var DroneManager = /** @class */ (function () {
// swap y and z axis so z axis represents altitude
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
,
...
...
@@ -140,6 +134,10 @@ var DroneManager = /** @class */ (function () {
* Set a target point to move
*/
DroneManager
.
prototype
.
setTargetCoordinates
=
function
(
x
,
y
,
z
)
{
this
.
_internal_setTargetCoordinates
(
x
,
y
,
z
);
};
DroneManager
.
prototype
.
_internal_setTargetCoordinates
=
function
(
x
,
y
,
z
,
radius
)
{
if
(
!
this
.
_canPlay
)
{
return
;
}
...
...
@@ -147,7 +145,8 @@ var DroneManager = /** @class */ (function () {
this
.
_targetCoordinates
=
this
.
_API
.
processCoordinates
(
x
,
y
,
z
);
return
this
.
_API
.
internal_setTargetCoordinates
(
this
,
this
.
_targetCoordinates
this
.
_targetCoordinates
,
radius
);
};
DroneManager
.
prototype
.
internal_update
=
function
(
delta_time
)
{
...
...
@@ -194,7 +193,7 @@ var DroneManager = /** @class */ (function () {
}
return
this
.
_API
.
setStartingPosition
(
this
,
x
,
y
,
z
);
};
DroneManager
.
prototype
.
setSpeed
=
function
(
speed
)
{
DroneManager
.
prototype
.
set
Air
Speed
=
function
(
speed
)
{
if
(
!
this
.
_canPlay
)
{
return
;
}
...
...
@@ -292,20 +291,11 @@ var DroneManager = /** @class */ (function () {
}
return
null
;
};
DroneManager
.
prototype
.
setAltitude
=
function
(
altitude
)
{
if
(
!
this
.
_canPlay
)
{
return
;
}
return
this
.
_API
.
setAltitude
(
this
,
altitude
);
};
/**
* 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
.
loiter
=
function
(
x
,
y
,
z
,
radius
)
{
this
.
_internal_setTargetCoordinates
(
x
,
y
,
z
,
radius
);
};
DroneManager
.
prototype
.
getFlightParameters
=
function
()
{
if
(
this
.
_API
.
getFlightParameters
)
{
...
...
@@ -316,7 +306,7 @@ var DroneManager = /** @class */ (function () {
DroneManager
.
prototype
.
getYaw
=
function
()
{
return
this
.
_API
.
getYaw
(
this
);
};
DroneManager
.
prototype
.
getSpeed
=
function
()
{
DroneManager
.
prototype
.
get
Air
Speed
=
function
()
{
return
this
.
_speed
;
};
DroneManager
.
prototype
.
getGroundSpeed
=
function
()
{
...
...
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/drone_simulator_logic_js.xml
View file @
4174385c
...
...
@@ -240,7 +240,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1009.
7345.31305.44339
</string>
</value>
<value>
<string>
1009.
36979.45339.6075
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
168
7455790.77
</float>
<float>
168
8635184.98
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/ojs_drone_simulator_script_page_js.js
View file @
4174385c
...
...
@@ -438,10 +438,10 @@
[
"
my_map_height
"
]]
],
[
"
right
"
,
[[
"
my_start_AMSL
"
],
[
"
my_drone_min_speed
"
],
[
"
my_drone_speed
"
],
[
"
my_drone_max_speed
"
],
[
"
my_drone_max_
acceleration
"
],
[
"
my_drone_max_de
celeration
"
],
[
"
my_drone_max_
roll
"
],
[
"
my_drone_min_pitch
"
],
[
"
my_drone_max
_pitch
"
],
[
"
my_drone_max_sink_rate
"
],
[
"
my_drone_max_climb_rate
"
]]
[[
"
my_start_AMSL
"
],
[
"
my_drone_min_speed
"
],
[
"
my_drone_speed
"
],
[
"
my_drone_max_
speed
"
],
[
"
my_drone_max_ac
celeration
"
],
[
"
my_drone_max_
deceleration
"
],
[
"
my_drone_max_roll
"
],
[
"
my_drone_min
_pitch
"
],
[
"
my_drone_max_
pitch
"
],
[
"
my_drone_max_
sink_rate
"
],
[
"
my_drone_max_climb_rate
"
]]
],
[
"
bottom
"
,
[[
"
my_script
"
]]
...
...
bt5/erp5_officejs_drone_simulator/PathTemplateItem/web_page_module/ojs_drone_simulator_script_page_js.xml
View file @
4174385c
...
...
@@ -232,7 +232,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<
string>
zope
</string
>
</value>
<value>
<
unicode>
zope
</unicode
>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -246,7 +246,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
100
6.23748.49086.523
09
</string>
</value>
<value>
<string>
100
9.22574.47206.139
09
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -266,7 +266,7 @@
</tuple>
<state>
<tuple>
<float>
16
77179158.33
</float>
<float>
16
87785962.67
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment