Hello,
Is it possible to add values to conditionals in the print format files?
I am trying to check if GPS telemetry is not zeroed out (from a video file). Right now, I simply check for its existence with:
#[IF] $gpslatitude $gpslongitude $sampletime
#[BODY]<trkpt>
#[BODY] <lat>$gpslatitude#</lat>
... etc.
Is it possible to check if those GPS latitudes and longitudes do not equal to zero? If so, how would I go about doing this?
Thanks, and apologies if this has already been answered
Sure. You can do something like this:
#[IF] ${gpslatitude;$_ = undef if $_ == 0} ${gpslongitude;$_ = undef if $_ == 0} $sampletime
- Phil
Thank you very much :)
Oh. Actually for this to work properly you need to test the numerical value:
#[IF] ${gpslatitude#;$_ = undef if $_ == 0} ${gpslongitude#;$_ = undef if $_ == 0} $sampletime