Author Topic: Track Logs written to SD card  (Read 1895 times)

mmcp42

Track Logs written to SD card
« on: July 14, 2020, 05:07:17 pm »
A general query
when does PilotAware actually write the track log to the SD card?
I ask as it my habit to power off my Rosetta (along with all the other avionics) before I shutdown the aircraft

would be a shame if that's exactly when the track log was being written away!

Admin

Re: Track Logs written to SD card
« Reply #1 on: July 14, 2020, 09:40:40 pm »
the track file is flushed to disk every 300 seconds
thx
Lee

mmcp42

Re: Track Logs written to SD card
« Reply #2 on: July 15, 2020, 08:14:15 am »
hmm
what's the best way to avoid powering off during a write then?

Admin

Re: Track Logs written to SD card
« Reply #3 on: July 15, 2020, 08:23:39 am »
When I you pull the power, be aware you could lose upto 5mins of the track to the current time
No solution to this
The alternate would be to add a poweroff button which performed a shutdown, but this does not stop users pulling the power cord

Thx
Lee

exfirepro

Re: Track Logs written to SD card
« Reply #4 on: July 15, 2020, 08:29:41 am »
mm,

If you want to ensure you have the entire track, the simplest way is to leave the unit running for 5 minutes after you shutdown SkyDemon, then shut down your PAW. Most users, however, rarely look at their PAW tracks (or in many cases even know they exist), so it’s never been a significant issue.

In practice, you would at most lose the taxi in and shut down. After over 5 years of use and testing I’ve never personally noticed any ‘missing bit’ at the end of a flight.

Regards

Peter
« Last Edit: July 15, 2020, 08:32:10 am by exfirepro »

mmcp42

Re: Track Logs written to SD card
« Reply #5 on: July 15, 2020, 08:50:54 am »
I'm less worried about losing (up to) 5 minutes of taxi log
more worried about nuking the card by powering off during a write
(see my other thread about that happening!)

I have a spare pi so will look at a power off solution using GPIO3 (pin 5)

how do I open a Rosetta case to get to the GPIO connector?

Admin

Re: Track Logs written to SD card
« Reply #6 on: July 15, 2020, 10:04:10 am »
There is no protection against power failure or pulling the chord, even with a switch

The microsd disk is set to READONLY, the only writable areas are in ramdisk
The exception is where the tracks are stored which are flipped RO/RW/RO during flush

I am confident this is the best protection possible, we have done extensive testing of random power fails to exercise this and have not seen issues
Of course who is to say there is not something in the firmware which cannot be guarded against, and as this is closed source you could not even inspect the rpi firmware

Thx
Lee