Closed albertus62 closed 10 months ago
@mikaelnousiainen This is probably the best idea for long lasting floating
Just as some references:
// Power Consumption Notes (all @ 3V):
// - GPS Max Performance, Transmitting @ 13 dBm = ~150 mA
// - GPS Max Performance, Not Transmitting = 70-90mA
// - GPS in PowerSave Mode, Transmitting @ 13 dBm = ~120 mA
// - GPS in PowerSave Mode, not Transmitting = 30-50mA, depending on GPS state.
Power-Save mode setting in RS41HUP: https://github.com/darksidelemm/RS41HUP/blob/master/ublox.c#L73 Worth noting that I only entered powersave mode once the GPS had a valid fix, otherwise it could take considerably longer to get initial lock: https://github.com/darksidelemm/RS41HUP/blob/master/main.c#L482
From what I recall the powersave mode worked fairly well. It was when i tried to shut the GPS down between transmissions where things went a bit iffy, sometimes resulting in the GPS never getting lock.
What about the use of ublxg6010 gps Stop and Start Routine from rs41hub. They allow to safe more Energy by floaters with longer transmision intervalls. After the sleep pause the start procedere wakes gps up with the warmstart option. My idea is to follow up the queue of transmissions in rs41ng and after each round the gps sleeps a defined time, wakes up with schedule and then the queue runs all tx schedules until complete. I prepared your code for this but i am not able to debug it with my low knowlege. if the gps sleeps, all interrupt routines sees no fix after asked for new gps data. That was my idea for getting this option to your code. There are a cupple of people here who waiting for this, so i tried to help.
I found that stopping / starting the GPS was a bit unreliable. The GPS would sometimes take a very very long time to get lock on restart, or not get lock at all.
@albertus62 @YT3GTI @whallmann I will attempt to implement a simple approach to enable GPS power saving this week (the same approach as in RS41HUP to turn on power saving mode -- but NOT stop the GPS chip completely -- after a successful fix has been acquired)
@albertus62 @YT3GTI @whallmann @darksidelemm Simple GPS power saving (the RS41HUP approach) is implemented now in https://github.com/mikaelnousiainen/RS41ng/commit/fda9cef76a3dd9cf48288f254d3d0e638ad6550a
This is now totally untested (and disabled by default). Please test :)
Thanks for this!
However, when power save mode is inactive, you shouldn't be modifying the sats field ( https://github.com/mikaelnousiainen/RS41ng/blob/fda9cef76a3dd9cf48288f254d3d0e638ad6550a/src/codecs/horus/horus_packet_v2.c#L46 )
The other conversions (+100 for tracking state, and +200 for low power optimized state) are correct.
Please add GPS power saving as used in RS41HUP (UBLOX_POWERSAVE). The batteries last much longer needed for floating HAB's.