This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // bit-wrangling for GDL90 stuff | |
| // 2025-03-14, bspatz | |
| void main() { | |
| // 50d = 00110010 = 3, 2 upper/lower | |
| // 178d = 10110010 = 11, 2 upper/lower | |
| int byte = 178; | |
| int upper = (byte & 0xF0) >> 4; | |
| int lower = (byte & 0x0F); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Example dart code to correct AvareX delta-longitude due to latitude and speed | |
| // Use time-based approach for "distance" to obstacle | |
| // 2025-01-11, bspatz | |
| import 'dart:math'; | |
| void main() { | |
| num lat = 30; // example latitude in degrees | |
| num t = 3.6; // desired minutes to obstacle buffer | |
| num s = 100; // cruise speed in knots |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Example dart code to correct AvareX delta-longitude due to latitude | |
| // Keeps obstacle search box square/consistent | |
| // 2025-01-11, bspatz | |
| import 'dart:math'; | |
| void main() { | |
| num lat = 30; // example latitude in degrees | |
| num d = 0.1; // desired distance to obstacles in degrees lat/long at equator |