Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPS - Asynchronous Release #12

Merged
merged 30 commits into from
Nov 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7d9a827
Refactor for all chips to run async
Tmktahu Oct 29, 2021
af38b87
this is actually working now
Tmktahu Oct 29, 2021
ff1820a
variable map and velocity
Tmktahu Oct 31, 2021
5f329d0
reorganized and added velocity stuff
Tmktahu Oct 31, 2021
3376da8
update setup chip
Tmktahu Oct 31, 2021
dbf9f63
rename folder
Tmktahu Oct 31, 2021
2b86aa4
make sure we are outputing m/s
Tmktahu Nov 1, 2021
8880a08
add smoothing to speed
Tmktahu Nov 1, 2021
ce44817
update comment
Tmktahu Nov 1, 2021
e1a52b4
adjustments thanks to thaccus + readme update
Tmktahu Nov 1, 2021
f5b2289
readme updates
Tmktahu Nov 1, 2021
7c833f6
added readme banner
Tmktahu Nov 1, 2021
4b52082
added fancy badge
Tmktahu Nov 1, 2021
b6cec5b
added table of global vars
Tmktahu Nov 1, 2021
5a92fea
get rid of old variables and drop 0 errors
Tmktahu Nov 2, 2021
1edb6ff
updated variable map
Tmktahu Nov 2, 2021
48f1f76
error analysis
Tmktahu Nov 2, 2021
05b0c29
more error stuff
Tmktahu Nov 2, 2021
0ca12c5
tweaks
Tmktahu Nov 3, 2021
d83de02
exec queue version + BPs
Tmktahu Nov 3, 2021
78dfafb
readme update with colors?
Tmktahu Nov 3, 2021
6d65bb6
Update README.md
Tmktahu Nov 3, 2021
956ab41
calibrating tick time for normal IPSA
Tmktahu Nov 4, 2021
87db372
tick calibrating the queued version
Tmktahu Nov 4, 2021
01d8932
making sure this was updated right
Tmktahu Nov 4, 2021
2f69f12
Update README.md
Tmktahu Nov 4, 2021
798cc0c
Update README.md
Tmktahu Nov 4, 2021
5bb0bcb
Update README.md
Tmktahu Nov 4, 2021
0244db4
Update README.md
Tmktahu Nov 4, 2021
4721b4f
Update README.md
Tmktahu Nov 4, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions CBM/Display.yolol

This file was deleted.

8 changes: 0 additions & 8 deletions CBM/IPS_1.yolol

This file was deleted.

5 changes: 0 additions & 5 deletions CBM/IPS_2.yolol

This file was deleted.

4 changes: 0 additions & 4 deletions CBM/IPS_3.yolol

This file was deleted.

2 changes: 0 additions & 2 deletions CBM/IPS_4.yolol

This file was deleted.

Binary file added IPSA/Blueprints/IPSA.fbe
Binary file not shown.
Binary file added IPSA/Blueprints/IPSA_No_Frame.fbe
Binary file not shown.
Binary file added IPSA/Blueprints/IPSA_Queued.fbe
Binary file not shown.
Binary file added IPSA/Blueprints/IPSA_Queued_No_Frame.fbe
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions IPSA/Error Testing/Dropping Zeros Method.txt/Raw Measurements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
All measurements were done in different tests.
Dropping Zeroes Method with Exponential Smoothing. Additional layer of smoothing on Speed.

// Velocity code pattern
f=0.08 t=0.2 x=:x // Coded by Fryke#0746
a=(:x-x) b/=a :k+=f*(a-:k) :g=:k/:j*t x=:x goto10
x=:x goto10

// Speed code
r=0.5 f=0.1 t=0.2 // Coded by Fryke#0746
a=((:k^2+:l^2+:m^2)^r)/t :j+=f*(a-:j) goto10

:is
156.086,156.793,157.359,157.812,158.555,159.588,160.427,158.78,158.053,157.472,157.007,156.635,156.878,157.481,158.38,159.521,179.257,179.537,179.761,180.078,180.368,180.731,181.038,181.284,181.481,181.655,181.893,180.082,177.88,176.439,175.582,174.896

:vx
0.039,0.04,0.039,0.04,0.039,0.04,0.039,0.04,0.039,0.04,0.039,0.038,0.04,0.043,0.041,0.041,0.039,0.038,0.04,0.041,0.039,0.04,0.039,0.04,0.039,0.04,0.039,0.04,0.039,0.04,0.039,0.04,0.041,0.041,0.041,0.041,0.04,0.04,0.039,0.038,0.039,0.038,0.04,0.038

:vy
-0.04,-0.04,-0.04,-0.041,-0.041,-0.037,-0.042,-0.042,-0.042,-0.041,-0.041,-0.041,-0.041,-0.04,-0.041,-0.041,-0.041,-0.041,-0.04,-0.04,-0.04,-0.037,-0.038,-0.038,-0.039,-0.039,-0.039,-0.039,-0.04,-0.04,-0.04,-0.041,-0.037,-0.037,-0.038,-0.039,-0.04

:vz
-0.04,-0.041,-0.041,-0.041,-0.041,-0.041,-0.041,-0.041,-0.041,-0.041,-0.041,-0.041,-0.041,-0.041,-0.041,-0.037,-0.038,-0.038,-0.043,-0.043,-0.042,-0.038,-0.039,-0.039,-0.04,-0.036,-0.038,-0.038,-0.039,-0.036,-0.037,-0.039,-0.04,-0.036,-0.038,-0.039

:vxr
32.006,32.006,32.006,35.398,35.398,35.398,38.519,38.519,38.519,38.466,38.344,38.344,38.344,38.288,38.159,38.131,38.131,38.016,37.391,34.677,37.577,37.577,37.59,37.59,37.59,37.536,37.424,35.968,34.628,34.628,34.628,34.865,33.818,33.818,34.154,34.352


31.71,31.71,31.71,32.201,32.572,32.963,33.296,33.296,33.653,33.938,34.147,34.147,34.147,34.147,34.417,34.599,33.991,32.136,30.744,30.744,30.744,31.24,31.759,29.49,29.877,30.423,31.015,31.015,30.261,30.863,31.412,31.412,31.412,31.412,31.918,32.389

:vyr
-30.762,-28.153,-28.917,-29.525,-30.175,-30.779,-31.169,-31.169,-31.916,-29.209,-29.796,-30.425,-31.161,-31.594,-28.907,-29.60,-28.408,-25.966,-26.813,-27.721,-27.721,-28.407,-29.11,-29.051,-30.151,-27.566,-28.316,-29.239,-26.724,-27.596,-28.542,-29.163

:vzr
-30.35,-30.846,-28.284,-29.137,-29.82,-30.362,-27.835,-28.725,-29.353,-30.022,-27.419,-28.444,-29.094,-29.785,-29.785,-29.785,-29.681,-30.325,-27.798,-28.598,-29.331,-30.001,-30.52,-31.084,-28.495,-29.239,-29.888,-30.422,-27.782,-28.765,-29.476,-30.076
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions IPSA/Error Testing/Error Counting Method/Raw Measurements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
All measurements were done in different tests.
Error Counting Method with Exponential Smoothing. Additional layer of smoothing on Speed.

// Velocity code pattern
f=0.08 t=0.2 x=:x ec=1 // Coded by Fryke#0746
a=(:x-x)/ec b/=a :k+=f*(a-:k) :g=:k/:j*t x=:x ec=1 goto10
ec++ goto10

// Speed code
r=0.5 f=0.1 t=0.2 // Coded by Fryke#0746
a=((:k^2+:l^2+:m^2)^r)/t :j+=f*(a-:j) goto10

:vx
0.041,0.041,0.041,0.041,0.041,0.039,0.039,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.041,0.041,0.04,0.04,0.04,0.039,0.038,0.039,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.04,0.039,0.038,0.038,0.039,0.037,0.037,0.038,0.039,0.037,0.038,0.039

:vy
-0.038,-0.04,-0.041,-0.037,-0.039,-0.04,-0.041,-0.042,-0.043,-0.043,-0.043,-0.038,-0.04,-0.041,-0.041,-0.037,-0.04,-0.04,-0.04,-0.039,-0.038,-0.039,-0.041,-0.041,-0.037,-0.039,-0.039,-0.04,-0.041,-0.042,-0.042,-0.037,-0.039,-0.04,-0.041,-0.041,-0.041

:vz
-0.04,-0.044,-0.041,-0.041,-0.041,-0.038,-0.04,-0.04,-0.04,-0.037,-0.039,-0.04,-0.04,-0.038,-0.039,-0.04,-0.041,-0.041,-0.041,-0.039,-0.037,-0.038,-0.039,-0.039,-0.036,-0.038,-0.039,-0.04,-0.04,-0.04,-0.04,-0.041,-0.041,-0.042,-0.042,-0.042,-0.042

:vxr
28.916,28.916,29.578,29.578,29.578,30.201,30.82,31.309,31.8,32.265,32.265,32.265,32.67,32.67,30.352,30.644,31.147,31.659,30.56,31.467,31.931,31.931,31.931,32.35,32.795,32.795,32.795,33.106,33.479,33.479,33.479,33.781,34.037,34.037,34.037,34.256,34.561

:vyr
-30.046,-30.583,-30.583,-30.583,-31.077,-31.577,-29.403,-29.594,-30.212,-30.78,-28.217,-28.955,-29.639,-30.152,-30.724,-30.724,-34.916,-34.916,-35.063,-35.174,-35.174,-33.865,-34.033,-34.24,-34.24,-34.24,-34.396,-31.759,-32.16,-32.536,-32.536,-32.868

:vzr
-30.941,-30.941,-31.412,-31.896,-31.896,-30.797,-31.329,-31.837,-29.183,-29.853,-30.452,-30.078,-28.519,-32.145,-32.524,-32.91,-31.582,-32.052,-32.499,-29.797,-29.797,-30.37,-30.911,-30.911,-30.911,-31.42,-31.42,-31.42,-33.316,-33.316,-33.316,-33.316

:is
107.516,107.307,106.702,106.701,107.068,107.362,106.938,107.025,107.438,108.191,109.113,110.167,111.01,111.685,111.685,112.501,109.908,110.606,111.47,112.456,113.244,113.875,113.875,114.62,115.456,116.124,116.659,117.326,118.025,117.093,116.192,115.758
15 changes: 15 additions & 0 deletions IPSA/Execution Queueing/IPSA_5_Velocity1.yolol
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// blank space is here so we can avoid bad values on startup
// blank
// blank
// blank
// blank
// blank
// blank
// blank
t=0.28 x=:x c=100 // Coded by Fryke#0746
a=:x-x b/=a d=(ABS(a/c)<1) :k=a*d+(1-d)*a/(a/c) c=a x=:x goto10
x=:x goto10
// Velocity Chip #1 - Advanced
// Calcs X component of the velocity vector
// Stored raw value in :k, normalized value in :g
// Accesses :x, :k, :j
15 changes: 15 additions & 0 deletions IPSA/Execution Queueing/IPSA_6_Velocity2.yolol
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// blank space is here so we can avoid bad values on startup
// blank
// blank
// blank
// blank
// blank
// blank
// blank
t=0.28 y=:y c=100 // Coded by Fryke#0746
a=:y-y b/=a d=(ABS(a/c)<1) :l=a*d+(1-d)*a/(a/c) c=a y=:y goto10
y=:y goto10
// Velocity Chip #2 - Advanced
// Calcs Y component of the velocity vector
// Stored raw value in :l, normalized value in :h
// Accesses :y, :l, :j
15 changes: 15 additions & 0 deletions IPSA/Execution Queueing/IPSA_7_Velocity3.yolol
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// blank space is here so we can avoid bad values on startup
// blank
// blank
// blank
// blank
// blank
// blank
// blank
t=0.28 z=:z c=100 // Coded by Fryke#0746
a=:z-z b/=a d=(ABS(a/c)<1) :m=a*d+(1-d)*a/(a/c) c=a z=:z goto10
z=:z goto10
// Velocity Chip #3 - Advanced
// Calcs Z component of the velocity vector
// Stored raw value in :m, normalized value in :i
// Accesses :z, :m, :j
15 changes: 15 additions & 0 deletions IPSA/Execution Queueing/IPSA_8_Speed.yolol
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// blank space is here so we can avoid bad values on startup
// blank
// blank
// blank
// blank
// blank
// blank
// blank
f=0.4 t=0.28 r=0.5 c=100 // Coded by Fryke#0746
a=((:k^2+:l^2+:m^2)^r)/t :j+=f*((a/(a/c))-:j) c=a goto10
goto10
// Speed Chip - Advanced
// Spits out movement speed :j
// Accesses :k, :l, :m
// Uses exponential smoothing
45 changes: 45 additions & 0 deletions IPSA/GlobalVariableMap.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
This is the current variable map for CBM.

Internal Global Variables:
- :a = North Signal Strength
- :b = South Signal Strength
- :c = East Signal Strength
- :d = West Signal Strength

e
f

- :g = Normalized Velocity Vector X
- :h = Normalized Velocity Vector X
- :i = Normalized Velocity Vector X
- :j = Speed
- :k = Raw Velocity Vector X
- :l = Raw Velocity Vector Y
- :m = Raw Velocity Vector Z

- :n = West Distance
- :o = North Distance
- :p = East Distance
- :q = South Distance

- :r = Raw Calculated X
- :s = Raw Calculated Y
- :t = Raw Calculated Z
- :u = Dirty Rotated X
- :v = Dirty Rotated Y
- :w = Dirty Rotated Z
- :x = Final X
- :y = Final Y
- :z = Final Z

External Global Variables:
- :x = Final X
- :y = Final Y
- :z = Final Z
- :is = Speed
- :vx = Normalized Velocity Vector X
- :vy = Normalized Velocity Vector Y
- :vz = Normalized Velocity Vector Z
- :vxr = Raw Velocity Vector X
- :vyr = Raw Velocity Vector Y
- :vzr = Raw Velocity Vector Z
7 changes: 7 additions & 0 deletions IPSA/IPSA_1.yolol
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
t=1000 m=t*t // Coded by Fryke#0746
:n=(m-:d)^2 :o=(m-:a)^2 :p=(m-:c)^2 :q=(m-:b)^2 goto2
goto2
// Chip #1 - Advanced
// Grabs receiver values and stores them in :n, :o, :p, :q
// Accesses receiver values :a, :b, :c, :d
// :a = north, :b = south, :c = east, :d = west
8 changes: 8 additions & 0 deletions IPSA/IPSA_2.yolol
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ca=91923 cb=74246 cc=4078 cd=95460 ce=65966 // Coded by Fryke#0746
a=ca*ca b=2*ca c=2*(ca-cb) d=cb*cb-ca*ca+cd*cd e=2*cd f=2*(cb-cc)
g=2*(cd-ce) h=5200332997 i=142220 t=1000 m=t*t
:r=(:n-:o+a)/b :s=(:o-:p+:r*c+d)/e :t=(:p-:q+:r*f+:s*g-h)/i goto4
goto4
// Chip #2 - Advanced
// Calculating raw [X, Y, Z] saved as [:r, :s, :t]
// Accesses :n, :o, :p, :q
8 changes: 8 additions & 0 deletions IPSA/IPSA_3.yolol
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ch=272015 d=368640 e=888881 f=-652758 j=111030 k=749384 l=550023
n=707044 o=444478 // Coded by Fryke#0746
:u=(ch*:r-d*:s+e*:t) :v=(f*:r-k*:s-j*:t) :w=(n*:r-l*:s-o*:t) goto3
goto3
// Chip #3 - Advanced
// Rotation math, rotated coordinates stored in [:u, :v, :w]
// Note these need to be divided by 1,000,000 to be useable
// Accesses [:r, :s, :t]
5 changes: 5 additions & 0 deletions IPSA/IPSA_4.yolol
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
t=1000 m=t*t a=5000 b=-60000 c=0 :x=:u/m-a :y=:v/m-b :z=:w/m-c goto1
goto1 // Coded by Fryke#0746
// Chip #4 - Advanced
// Divide rotations mill, apply origin offsets, saves to [:x, :y, :z]
// Accesses [:u, :v, :w]
16 changes: 16 additions & 0 deletions IPSA/IPSA_5_Velocity1.yolol
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// blank space is here so we can avoid bad values on startup
// blank
// blank
// blank
// blank
// blank
// blank
// blank
f=0.08 t=0.23 x=:x // Coded by Fryke#0746
a=:x-x b/=a :k+=f*(a-:k) :g=:k/:j*t x=:x goto10
x=:x goto10
// Velocity Chip #1 - Advanced
// Calcs X component of the velocity vector
// Stored raw value in :k, normalized value in :g
// Accesses :x, :k, :j
// Uses exponential smoothing to account for 'double' errors
16 changes: 16 additions & 0 deletions IPSA/IPSA_6_Velocity2.yolol
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// blank space is here so we can avoid bad values on startup
// blank
// blank
// blank
// blank
// blank
// blank
// blank
f=0.08 t=0.23 y=:y // Coded by Fryke#0746
a=:y-y b/=a :l+=f*(a-:l) :h=:l/:j*t y=:y goto10
y=:y goto10
// Velocity Chip #2 - Advanced
// Calcs Y component of the velocity vector
// Stored raw value in :l, normalized value in :h
// Accesses :y, :l, :j
// Uses exponential smoothing to account for 'double' errors
16 changes: 16 additions & 0 deletions IPSA/IPSA_7_Velocity3.yolol
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// blank space is here so we can avoid bad values on startup
// blank
// blank
// blank
// blank
// blank
// blank
// blank
f=0.08 t=0.23 z=:z // Coded by Fryke#0746
a=:z-z b/=a :m+=f*(a-:m) :i=:m/:j*t z=:z goto10
z=:z goto10
// Velocity Chip #3 - Advanced
// Calcs Z component of the velocity vector
// Stored raw value in :m, normalized value in :i
// Accesses :z, :m, :j
// Uses exponential smoothing to account for 'double' errors
14 changes: 14 additions & 0 deletions IPSA/IPSA_8_Speed.yolol
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// blank space is here so we can avoid bad values on startup
// blank
// blank
// blank
// blank
// blank
// blank
// blank
f=0.1 t=0.23 r=0.5 // Coded by Fryke#0746
a=((:k^2+:l^2+:m^2)^r)/t :j+=f *(a-:j) goto10
// Speed Chip - Advanced
// Spits out movement speed :j
// Accesses :k, :l, :m
// Uses exponential smoothing since we multiply error by 5 here
10 changes: 10 additions & 0 deletions IPSA/IPSA_9_SetupAndDisplay.yolol
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
om="IPS-A :o\n" bm=om+" Booting " em="Setup Error" :o=bm t=1000
op="origin_" nt=op+"north" st=op+"south" et=op+"east" wt=op+"west"
cm="\n Check " cr="\n Receivers " :AT=nt :BT=st :CT=et :DT=wt
mx="X: " my="\nY: " mz="\nZ: " ms="\nS: " // Coded by Fryke#0746
mu=" m/s" e=:a/:b/:c/:d goto7
:o=om+em+cm+cr goto2
:o=om+mx+:x/t*t+my+:y/t*t+mz+:z/t*t+ms+:is/t*t+mu goto7
goto7
// Setup and Display Chip - Advanced
// Setups up receivers, checks for errors, displays info with rounding
Loading