How to subtract wind direction between 0-359 degrees?
Mostra commenti meno recenti
Say I have two wind sensor measuring wind speed and direction. For speed, I can easily subtract sensor A from sensor B to determine how far apart they are. However, wind direction I find tricky because the “scale” wraps around when 359 goes to 360 (also 0 degrees). If sensor A gets a wind direction of 10 degrees and sensor B measures 350 degrees, they’re really only apart by 20 degrees. A simple subtraction would’ve called them apart by 340 degrees. How can I communicate to Matlab to perform a comparison of wind direction with this kind of compass scale?
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Lengths and Angles in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!