<div dir="ltr">Hyomin,<br><br>Thanks for the links.  <br><br>The screen capture I posted is from earlier code, and I know the values were being converted incorrectly at that time.<br><br>I was just trying to show folks on the list what was possible with minimal code.  I will post more screenshots at a later date, perhaps even a live link if I can.<br><br>Dve Witten, KD0EAG<br><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 3, 2019 at 8:12 PM Kim, Hyomin <<a href="mailto:hmkim@njit.edu">hmkim@njit.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Thank you, David!</div><div>Please take a look at the attached figure showing magnetic field components near Washington DC based on a magnetic field model. These values are what we can expect at the location. Thus your magnetometer reading should be similar to these. The values in your figure seem too big. </div><div><br></div><div>The northward (X) and eastward (Y) are in the horizontal field while the downward (Z) points toward the center of the earth. Thus the plane containing X and Y should be leveled. There are some different ways to define where X and Y should point to. Here in the figure, X is pointing to the geographic north and Y to the geographic east. Anyways, a quick and dirty way to make sure your magnetometer reading is correct is to calculate SQRT(X^2+Y^2+Z^2) from your reading to see if this value is close to the total intensity (F) in the figure. Of course, the value varies depending on where you are. <br></div><div><br></div><div>Visit the website: <a href="http://wdc.kugi.kyoto-u.ac.jp/igrf/point/index.html" target="_blank">http://wdc.kugi.kyoto-u.ac.jp/igrf/point/index.html</a> and enter the coordinates of your location to see expected magnetic fields of your location.</div><div><br></div><div>Hope this helps. </div><div><br></div><div>Hyomin KD2MCR</div><div><br></div><div><br></div><div><br></div><div><br></div><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><table style="border-collapse:collapse;width:525px;border-spacing:0px;background-color:transparent;color:rgb(35,38,54);font-family:Poppins,sans-serif;font-size:16px"><tbody style="border:0px;padding:0px;font-size:0.9em"><tr><td style="padding:5px;font-size:0.9em;font-stretch:normal;line-height:1.5;color:rgb(255,0,0);border-width:0px 3px 0px 0px;border-bottom-style:initial;border-bottom-color:initial;border-top-style:initial;border-right-style:solid;border-left-style:initial;border-top-color:initial;border-right-color:rgb(204,0,0);border-left-color:initial;width:180px;vertical-align:middle"><a href="https://www.njit.edu/" style="background-color:transparent;color:rgb(51,122,183)" target="_blank"><img src="https://assets.njit.edu/uicomponents/NJIT-email-logo.png" alt="NJIT logo" style="border: 0px; display: block; vertical-align: middle; width: 150px; height: auto; max-width: 150px;"></a></td><td style="padding:5px 5px 5px 10px;font-size:12px;font-stretch:normal;line-height:16px;border:0px;font-family:Arial,Helvetica,sans-serif"><strong style="color:rgb(111,111,111);font-size:13px">Hyomin Kim</strong><br><font color="#6f6f6f">Assistant Professor</font><br><font color="#6f6f6f">Physics<br></font><font color="#666666">Center for Solar-Terrestrial Research<br>Institute for Space Weather Sciences</font><br><font color="#666666"><a href="mailto:hmkim@njit.edu" target="_blank">hmkim@njit.edu</a> • <span style="white-space:nowrap">(973) 596-5704</span><br><a href="https://web.njit.edu/~hmkim/" target="_blank">https://web.njit.edu/~hmkim/</a><br>104 Tiernan Hall, 161 Warren Street, Newark, NJ 07102<br></font></td></tr></tbody></table></div></div></div></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 3, 2019 at 4:02 PM Dr. Nathaniel A. Frissell Ph.D. via TangerineSDR <<a href="mailto:tangerinesdr@lists.tapr.org" target="_blank">tangerinesdr@lists.tapr.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-US">
<div>
<p class="MsoNormal">Thank you, David. This looks good! Do you think you could add in a time series line plot of the Bx, By, and Bz coordinates? I think this would be useful to have right away, even for diagnostics.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">73 de Nathaniel W2NAF<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12pt;color:black">From: </span></b><span style="font-size:12pt;color:black">TangerineSDR <<a href="mailto:tangerinesdr-bounces@lists.tapr.org" target="_blank">tangerinesdr-bounces@lists.tapr.org</a>> on behalf of TangerineSDR Listserv <<a href="mailto:tangerinesdr@lists.tapr.org" target="_blank">tangerinesdr@lists.tapr.org</a>><br>
<b>Reply-To: </b>TangerineSDR Listserv <<a href="mailto:tangerinesdr@lists.tapr.org" target="_blank">tangerinesdr@lists.tapr.org</a>><br>
<b>Date: </b>Tuesday, December 3, 2019 at 1:49 PM<br>
<b>To: </b>TangerineSDR Listserv <<a href="mailto:tangerinesdr@lists.tapr.org" target="_blank">tangerinesdr@lists.tapr.org</a>><br>
<b>Cc: </b>David Witten <<a href="mailto:wittend@wwrinc.com" target="_blank">wittend@wwrinc.com</a>><br>
<b>Subject: </b>[TangerineSDR] Web presentation of magnetometer data to multiple clients<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10pt">All,<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt">This is a work in progress, for my own use right now.  <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt">It shows presentation of magnetometer data in a web browser.  Ignore the actual data shown, it properly signed quantities.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt">The page is served by HTTP, but the sensor data is sent via Websockets.  This is done using a golang server (minimal) that launches a program written in C that interrogates the I2C channel. When the golang
 program detects a browser connection, it serves the web page.  The web page opens a Websockets connection and streams the magnetometer data encapsulated in JSON to the browser client.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt">No web server, as such, is used.  Only one HTTP/HTTPs request is used.  There are other possible ways to do this, but this one works well for my purposes.  <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt">The intent is to have each local host send its lat/long and ip address on startup.  The locations would be indicated on the map.  Clicking on the  marker would open a connection to that particular SBC.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt">Data logging locally and remotely could both be controlled.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt">Again this is just eye candy, showing what can be done.  No frameworks, user's language of choice for the service.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10pt">Dave Witten<u></u><u></u></span></p>
</div>
</div>
</div>
</div>

-- <br>
TangerineSDR mailing list<br>
<a href="mailto:TangerineSDR@lists.tapr.org" target="_blank">TangerineSDR@lists.tapr.org</a><br>
<a href="http://lists.tapr.org/mailman/listinfo/tangerinesdr_lists.tapr.org" rel="noreferrer" target="_blank">http://lists.tapr.org/mailman/listinfo/tangerinesdr_lists.tapr.org</a><br>
</blockquote></div>
</blockquote></div>