Comments (13)
Hi @amotl
I see you had some time today to dive into the code. Thanks a lot for your awesome work.
The fix I did in my environment was more or less a bit hacky, so I'm happy and looking forward for the new release :)
Cheers,
Simon.
from calypso-anemometer.
Hi Simon,
excellent - thank you for reporting back. Let's close this issue then, and discuss the other malfunctions at GH-27?
Cheers,
Andreas.
from calypso-anemometer.
Dear Simon,
thank you for writing in.
I was able to use this project to connect my Calypso to my Signalk-Server / Openplotter-project.
Excellent!
The problem was [...]. I changed in
model.py
and now everything is working fine.
Can you tell me what exactly has been changed?
I suggest to change that in the repo for other people who want to use that.
I will be happy to consider it on the next iteration. Thank you already!
With kind regards,
Andreas.
from calypso-anemometer.
If you like, I can try to create a PR that you can see my changes. I still was tinkering around, but the current result is sufficient enough
from calypso-anemometer.
Sure, patches are always welcome! Thank you for your efforts already.
from calypso-anemometer.
Hi again,
@UserMacUseface just reported a similar observation over at #12 (comment) when using the SignalK telemetry adapter. It looks like SignalK actually expects all angle values to be in Radians. Is that an universal truth we may well have missed in our original implementation?
With kind regards,
Andreas.
from calypso-anemometer.
If my assumption is correct, the patch would need to go to the SignalK telemetry adapter file.
calypso-anemometer/calypso_anemometer/telemetry/signalk.py
Lines 43 to 55 in 1d38e09
While we discovered at #12 (comment) that the compass heading angle also got tripped by this conversion flaw, I am also wondering about the other angle values pitch
and roll
?
from calypso-anemometer.
It looks like SignalK actually expects all angle values to be in Radians. Is that an universal truth we may well have missed in our original implementation?
The documentation at 1 clearly states all relevant angle values use rad (Radian) as unit. Apologies that we missed this. We will submit a corresponding fix and release a new version.
Footnotes
from calypso-anemometer.
The code at 1 clearly shows it is using the degreesToRadians()
method to provide the correct unit to SignalK. We missed to follow this implementation correctly. Apologies.
const model = {
windAngleApparent: this.degreesToRadians(windAngleApparent),
windSpeedApparent: buf.readUInt16LE(0) / 100,
batteryLevel: parseFloat(((buf.readUInt8(4) * 10) / 100).toFixed(2)),
temperature: this.celciusToKelvin(buf.readUInt8(5) - 100),
roll: this.compass === 0 ? null : this.degreesToRadians(buf.readUInt8(6) - 90),
pitch: this.compass === 0 ? null : this.degreesToRadians(buf.readUInt8(7) - 90),
compass: this.compass === 0 ? null : this.degreesToRadians(360 - buf.readUInt16LE(8)),
timestamp: new Date().toISOString()
}
calypso-anemometer/calypso_anemometer/model.py
Lines 139 to 148 in 1cca7ad
Footnotes
from calypso-anemometer.
Observations
Other than the missed degreesToRadians()
conversion, there is also:
windSpeedApparent = raw / 100
batteryLevel = parseFloat(((raw * 10) / 100).toFixed(2))
temperature = celciusToKelvin(raw - 100)
Analysis
windSpeedApparent
is already converted correctly.batteryLevel
needs to be divided by 100, probably to get a percentage value, and then rounded to two decimal digits.temperature
needs to be converted to Kelvin, also reflected by 1.
Footnotes
from calypso-anemometer.
GH-20 will bring in corresponding fixes for the SignalK telemetry adapter. Thank you again for reporting this! We will add a few other improvements before running a new release.
from calypso-anemometer.
Dear Simon,
we just released calypso-anemometer 0.6.0, including the corresponding improvements, and will be happy to hear back from you about its outcome on this matter.
When using the SignalK telemetry variant, other than correcting the angle values to be emitted in Radian (rad), the program will now also emit the temperature in Kelvin, and the battery level as a ratio/percentage, like signalk-calypso-ultrasonic
.
With kind regards,
Andreas.
from calypso-anemometer.
Thanks a lot Andreas for your great work!
I did a quick test with the new vesion 0.6.0 and can confirm, that the values for AWA are provided in the correct format (RAD) now.
Nevertheless the eCompass (Yaw/Heading, Pitch, Roll) and the Temperature don't provide any readings.
from calypso-anemometer.
Related Issues (11)
- Support compass readings HOT 20
- Bad bluetooth connection HOT 6
- BleakDBusError: [org.bluez.Error.Failed] Software caused connection abort HOT 3
- Release bluetooth connection on program termination
- NMEA0183 XDR sentences for temperature and battery level HOT 18
- bleak.exc.BleakDBusError: [org.bluez.Error.Failed] Operation failed with ATT error: 0x0e (Connection Rejected Due To Security Reasons)
- eCompass and temperature not working HOT 32
- NMEA-0183 `--MWV` sentences HOT 2
- ultrasonic portable mini compabilitty HOT 1
- bleak.exc.BleakError: Characteristic 0000a001-0000-1000-8000-00805f9b34fb does not support write operations!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from calypso-anemometer.