🪟 Windows TippsThe Gemini desktop app is now available for Windows(11.09.2026 um 17:06 Uhr)
🔧 AI Nachrichten ChatGPT automatically logged out [Fix](12.09.2026 um 17:09 Uhr)
⚠️ Malware / Trojaner / VirenWindows 11 just dropped the tool ransomware abused, Microsoft says don’t restore WMIC(10.09.2026 um 20:11 Uhr)
🪟 Windows TippsServertimeout in Outlook über 10 Minuten verlängern(12.09.2026 um 15:10 Uhr)
🪟 Windows TippsThe Gemini desktop app is now available for Windows(11.09.2026 um 17:06 Uhr)
🔧 AI Nachrichten ChatGPT automatically logged out [Fix](12.09.2026 um 17:09 Uhr)
⚠️ Malware / Trojaner / VirenWindows 11 just dropped the tool ransomware abused, Microsoft says don’t restore WMIC(10.09.2026 um 20:11 Uhr)
🪟 Windows TippsServertimeout in Outlook über 10 Minuten verlängern(12.09.2026 um 15:10 Uhr)

🔧 Programmierung 🕛 vor 1 Jahr 5 Min Lesezeit
0

Self-Aligning Dish in Rust: GPS Example

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

In this part of the series we'll receive raw data from the Neo-6m GPS module and process it to give us readable GPS coordinates.



Create a new directory at the same level as the src directory. Inside this examples directory create a gps.rs file in which we'll write our example program. Copy the final code from the previous part into this file.






Table of Contents




  • Requirements


  • Implementation


    • Connections

    • Raw GPS data

    • GPS Coordinates

    • Look Angles






  • Results









Requirements




  • 1 x Raspberry Pico board

  • 1 x USB Cable type 2.0

  • 1 x Neo-6M GPS Module

  • 9 x M-M jumper wires

  • 1 x HC-05 Bluetooth Module

  • 2 x Mini Breadboards

  • Serial Bluetooth App








Implementation








Connections



Connect the various modules to the Pico as shown below.






NB❗ You have to keep the GPS module where it can have a view of the sky. If indoors, please note that it may take a good while to lock onto satellites.



Continuous blinks every second is an indication of the module acquiring sufficient GPS data.









GPS Coordinates



We should now process the raw GPS data received into location coordinates. This can be achieved by implementing the below algorithm.










Look Angles



We can further calculate for look angles using the below function which implements a satellite look angle calculator.




CODE
fn get_look_angles(lat: f32, long: f32, alt: f32) -> (f32, f32) {
// Earth Station in radians
let le: f32 = lat*PI/180.; // Latitude: N +ve, S -ve??
let ie: f32 = long*PI/180.; // Longitude: E +ve, W -ve??
let _h: f32 = alt; // Altitude

// Satellite position in radians
const _LS: f32 = 0.;// Latitude
const IS: f32 = 50.*PI/180.;// Longitude

// Determine Differential Longitude, b
let b = ie - IS;

let mut theta = (((le.cos()*b.cos())-0.151)/(1.-(le.cos()*le.cos()*b.cos()*b.cos())).sqrt()).atan();
let mut ai = (b.tan()/le.sin()).atan();

// Convert into Deg.
theta *= 180.0/PI;
ai *= 180./PI;

// Azimuth Angle
let phi_z = {
if (le < 0.) && (b > 0.) {
360. - ai
} else if (le > 0.) && (b < 0.) {
180. + ai
} else if (le > 0.) && (b > 0.) {
180. - ai
} else {
ai
}
};

(theta, phi_z)
}






Import PI from the core library that'll be used in the get_look_angles function.




CODE
use core::f32::consts::PI;






Also import the micromath crate to facilitate the function.




CODE
use micromath::F32Ext;






In the toml file under dependencies add:




CODE
micromath = "1.1.1"






Update the loop section to calculate the look angles and transmit via uart0.




CODE
// Calculate look angles
(theta, phi) = get_look_angles(
position.lat,
position.long,
position.alt);

writeln!(serialbuf, "theta: {} phi: {}", theta, phi).unwrap();
transmit_uart_uart_data(
uart_data.as_mut().unwrap(),
serialbuf);






We will the continue with initializing both theta and phi in the set-up section.




CODE
    // Variables
let (mut theta, mut phi) = (0., 0.);











Results



The final code will be .



Flashing this into the Pico, we should be able to receive the raw GPS data from the Neo-6m module and calculate look angles.



gps-example-final



In the next part we continue with the application of the above in our main program.

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
The Gemini desktop app is now available for Windows
1 Quelle
ChatGPT automatically logged out [Fix]
1 Quelle
Windows 11 just dropped the tool ransomware abused, Microsoft says don’t restore WMIC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Self-Aligning Dish in Rust: GPS Example

Thematisch verwandte Begriffe: SelfAligning, Dish, Rust, Example · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...