in reply to Re^5: Calculate aircraft headings from GPS data for google kml display
in thread Calculate aircraft headings from GPS data for google kml display

Yes, that sounds right. definitely need to use the hash keys to step through all these items. Any chance you have an example to point me to, that would greatly appreciated !

thank you !

Si

  • Comment on Re^6: Calculate aircraft headings from GPS data for google kml display

Replies are listed 'Best First'.
Re^7: Calculate aircraft headings from GPS data for google kml display
by hujunsimon (Sexton) on Jun 09, 2014 at 23:53 UTC

    ah, i also find this perl module Geo::Calc to help me calculate the headings: https://metacpan.org/pod/Geo::Calc.

    seems i just need to step through all the data and feed the right lats and longs to this module, very promising !

Re^7: Calculate aircraft headings from GPS data for google kml display
by boftx (Deacon) on Jun 10, 2014 at 00:17 UTC

    I think this approach might work. Please note that this is just "shooting-from-the-hip" psuedo-code.

    my %aircraft_ids; for my $row ( INPUT_ROWS ) { my ($row_id,$a_id,@row_fields) = split(',', $row); if ( exists( $aircraft)ids{$a_id} ) { my $prior_fields = $aircraft_ids{$a_id}; # do calcs here comparing current row data to priors } # and save these data points for the next time the ID is seen. $aircraft_ids{$a_id} = \@row_fields; }
    There are several way you can represent the row data in the array, but this should point you in the right direction.

    You must always remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.