Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flight-scripts
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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
flight-scripts
Commits
d8c4e691
Commit
d8c4e691
authored
Mar 03, 2023
by
Léo-Paul Géneau
👾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bouncy-flight.js: Fix missing function altitudeReached
parent
08d37fad
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
204 additions
and
198 deletions
+204
-198
bouncy-flight.js
bouncy-flight.js
+204
-198
No files found.
bouncy-flight.js
View file @
d8c4e691
/*jslint nomen: true, indent: 2, maxerr: 3, maxlen: 80 */
/*global console, me*/
(
function
(
console
,
me
)
{
(
function
(
console
,
me
)
{
"
use strict
"
;
var
EPSILON
=
9
,
...
...
@@ -90,6 +90,13 @@
}
];
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
)
{
var
R
=
6371
e3
,
// meters
la1
=
lat1
*
Math
.
PI
/
180
,
// la, lo in radians
...
...
@@ -197,5 +204,4 @@
me
.
exit
(
0
);
}
};
}(
console
,
me
));
\ No newline at end of file
}(
console
,
me
));
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