Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
x3domlet
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Elphel
x3domlet
Commits
68f03f5f
Commit
68f03f5f
authored
Jul 25, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testing reiteration
parent
b9323994
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
21 deletions
+22
-21
numbers.calculus.extra.js
js/numbers/numbers.calculus.extra.js
+22
-21
No files found.
js/numbers/numbers.calculus.extra.js
View file @
68f03f5f
...
@@ -198,17 +198,12 @@ numbers.calculus.GaussNewton = function(v,n,r,dr,eps,w){
...
@@ -198,17 +198,12 @@ numbers.calculus.GaussNewton = function(v,n,r,dr,eps,w){
*/
*/
numbers
.
calculus
.
GaussNewton_forHeading
=
function
(
v
,
n
,
r
,
dr
,
eps
,
w
){
numbers
.
calculus
.
GaussNewton_forHeading
=
function
(
v
,
n
,
r
,
dr
,
eps
,
w
){
// divide delta by 2
var
D_DIV
=
1
// degrees
// degrees
var
STEP_SIZE_LIMIT
=
10
var
STEP_SIZE_LIMIT
=
10
console
.
log
(
"Will divide delta by "
+
D_DIV
)
var
epsilon
=
eps
||
1
e
-
8
var
epsilon
=
eps
||
1
e
-
8
//var limit = 1000
//var limit = 1000
var
limit
=
50
var
limit
=
50
var
delta_divider
=
D_DIV
var
stop
=
false
var
stop
=
false
var
counter
=
0
var
counter
=
0
...
@@ -236,10 +231,6 @@ numbers.calculus.GaussNewton_forHeading = function(v,n,r,dr,eps,w){
...
@@ -236,10 +231,6 @@ numbers.calculus.GaussNewton_forHeading = function(v,n,r,dr,eps,w){
rs0
.
push
(
r
(
i
,
v0
))
rs0
.
push
(
r
(
i
,
v0
))
rs1
.
push
(
r
(
i
,
v1
))
rs1
.
push
(
r
(
i
,
v1
))
diff
.
push
(
r
(
i
,
v1
)
-
r
(
i
,
v0
))
diff
.
push
(
r
(
i
,
v1
)
-
r
(
i
,
v0
))
if
(
diff
[
i
]
>
STEP_SIZE_LIMIT
){
reiterate
=
true
break
}
}
}
console
.
log
(
"residuals old:"
)
console
.
log
(
"residuals old:"
)
...
@@ -249,9 +240,25 @@ numbers.calculus.GaussNewton_forHeading = function(v,n,r,dr,eps,w){
...
@@ -249,9 +240,25 @@ numbers.calculus.GaussNewton_forHeading = function(v,n,r,dr,eps,w){
console
.
log
(
"difference:"
)
console
.
log
(
"difference:"
)
console
.
log
(
diff
)
console
.
log
(
diff
)
if
(
!
reiterate
){
var
max
=
Math
.
max
(...
diff
)
var
sscale
=
0
;
if
(
max
>
STEP_SIZE_LIMIT
){
console
.
log
(
"LAT or LON EXCEEDED STEP SIZE"
)
sscale
=
STEP_SIZE_LIMIT
/
max
;
}
if
((
v1
[
2
]
-
v0
[
2
])
>
STEP_SIZE_LIMIT
){
console
.
log
(
"DELTA HEADING EXCEEDED STEP SIZE"
)
sscale
=
STEP_SIZE_LIMIT
/
(
v1
[
2
]
-
v0
[
2
]);
}
delta_divider
=
D_DIV
if
(
sscale
!=
0
){
for
(
var
i
=
0
;
i
<
n
;
i
++
){
v1
[
i
]
=
v0
[
i
]
+
diff
[
i
]
*
sscale
}
}
var
s0
=
sigma
(
v0
,
n
,
r
)
var
s0
=
sigma
(
v0
,
n
,
r
)
var
s1
=
sigma
(
v1
,
n
,
r
)
var
s1
=
sigma
(
v1
,
n
,
r
)
...
@@ -261,12 +268,6 @@ numbers.calculus.GaussNewton_forHeading = function(v,n,r,dr,eps,w){
...
@@ -261,12 +268,6 @@ numbers.calculus.GaussNewton_forHeading = function(v,n,r,dr,eps,w){
}
}
v0
=
v1
v0
=
v1
}
else
{
delta_divider
*=
2
console
.
log
(
"REITERATE WITH A SMALLER JUMP"
)
}
}
}
...
@@ -311,7 +312,7 @@ numbers.calculus.GaussNewton_forHeading = function(v,n,r,dr,eps,w){
...
@@ -311,7 +312,7 @@ numbers.calculus.GaussNewton_forHeading = function(v,n,r,dr,eps,w){
var
res
=
[]
var
res
=
[]
for
(
var
i
=
0
;
i
<
v
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
v
.
length
;
i
++
){
res
[
i
]
=
v
[
i
]
-
delta
[
i
][
0
]
/
delta_divider
res
[
i
]
=
v
[
i
]
-
delta
[
i
][
0
]
}
}
return
res
return
res
...
...
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