Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
83
Issues
83
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
b1dbadd9
Commit
b1dbadd9
authored
Jun 09, 2017
by
Adam Wujek
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userspace/tools: fix coefficient for link length calculations
Signed-off-by:
Adam Wujek
<
adam.wujek@cern.ch
>
parent
67731497
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
16 deletions
+12
-16
wr_mon.c
userspace/tools/wr_mon.c
+12
-16
No files found.
userspace/tools/wr_mon.c
View file @
b1dbadd9
...
...
@@ -590,14 +590,12 @@ void show_servo(int alive)
term_cprintf
(
C_BLUE
,
"Estimated link length: "
);
/* (RTT - deltas) / 2 * c / ri
c = 299792458 - speed of light in m/s
ri = 1.4682 - refractive index for fiber g.652 */
ri = 1.4682 - refractive index for fiber g.652. However,
experimental measurements using long (~5km) and
short (few m) fibers gave a value 1.4827
*/
term_cprintf
(
C_WHITE
,
"%10.2f meters
\n
"
,
(
ppsi_servo_local
.
picos_mu
-
ppsi_servo_local
.
delta_tx_m
-
ppsi_servo_local
.
delta_rx_m
-
ppsi_servo_local
.
delta_tx_s
-
ppsi_servo_local
.
delta_tx_s
)
/
2
/
1e6
*
299
.
792458
/
1
.
4682
);
crtt
/
2
/
1e6
*
299
.
792458
/
1
.
4827
);
term_cprintf
(
C_BLUE
,
"Master-slave delay: "
);
term_cprintf
(
C_WHITE
,
"%15.3f nsec
\n
"
,
...
...
@@ -670,16 +668,14 @@ void show_servo(int alive)
printf
(
"dtxs:%d drxs:%d "
,
ppsi_servo_local
.
delta_tx_s
,
ppsi_servo_local
.
delta_rx_s
);
printf
(
"asym:%lld "
,
total_asymmetry
);
/* Estimated link length in cm
(RTT - deltas) / 2 * c / ri
/* (RTT - deltas) / 2 * c / ri
c = 299792458 - speed of light in m/s
ri = 1.4682 - refractive index for fiber g.652 */
printf
(
"ll:%d "
,
(
int
)
((
ppsi_servo_local
.
picos_mu
-
ppsi_servo_local
.
delta_tx_m
-
ppsi_servo_local
.
delta_rx_m
-
ppsi_servo_local
.
delta_tx_s
-
ppsi_servo_local
.
delta_tx_s
)
/
2
/
1e6
*
299
.
792458
/
1
.
4682
*
100
));
ri = 1.4682 - refractive index for fiber g.652. However,
experimental measurements using long (~5km) and
short (few m) fibers gave a value 1.4827
*/
printf
(
"ll:%d "
,
(
int
)
(
crtt
/
2
/
1e6
*
299
.
792458
/
1
.
4827
*
100
));
printf
(
"crtt:%llu "
,
crtt
);
printf
(
"cko:%lld "
,
ppsi_servo_local
.
offset
);
printf
(
"setp:%d "
,
ppsi_servo_local
.
cur_setpoint
);
...
...
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