These are slides from the presentation "Aerospace Applications of Perl" given by Ian Kluft at Silicon Valley Perl on March 3, 2016 in Santa Clara, California. It explores aerospace topics and related CPAN modules, with some Perl coding examples.
Computations involving geographic coordinates are commonplace today with maps and location-based services. There are many modules on CPAN which can help Perl programmers to do these computations more easily. Examples are provided where Perl was used to generate the search grid for a missing rocket payload on a large dry lakebed in Nevada, and for mapping progress of a high-altitude balloon over Central California and the teams who were chasing it.
Computations involving geographic coordinates are commonplace today with maps and location-based services. There are many modules on CPAN which can help Perl programmers to do these computations more easily. Examples are provided where Perl was used to generate the search grid for a missing rocket payload on a large dry lakebed in Nevada, and for mapping progress of a high-altitude balloon over Central California and the teams who were chasing it.
Presentation by Phil Sumrall (Advanced Planning Manager, NASA) at the Von Braun Memorial Symposium in Huntsville, Alabama, 21 October 2008.
<a href="http://astronautical.org/vonbraun/vonbraun-2008/session2">http://astronautical.org/vonbraun/vonbraun-2008/session2</a>
F and G Taylor Series Solutions to the Circular Restricted Three-Body ProblemEtienne Pellegrini
Presentation given at the AAS/AIAA Space Flight Mechanics Meeting in Santa Fe, NM, on 1/27/2014
The Circular Restricted Three-Body Problem is solved using an extension to the classic F
and G Taylor series. The Taylor series coefficients are developed using exact recursion formulas, which are implemented via symbolic manipulation software. In addition, different
time transformations are studied in order to obtain an adapted discretization for the three-body problem. The resulting propagation method is compared to a conventional numerical
integration method, the Runge-Kutta-Fehlberg integrator, on a set of test scenarios designed to qualitatively represent the different types of three-body motion. The series solution is demonstrated to have comparable performance to the conventional integrator, when considering a variety of circumstances, such as the independent variable, error tolerance, orbit characteristics, and integration scheme. In the variable-step case, for low-fidelity applications, such as preliminary design of trajectories, the F and G series with no time transformation are shown to be two to three times faster than the conventional integrator in all cases, when selecting an appropriate order. In the fixed-step case, the Sundman time transformations are demonstrated to reduce the number of steps required for convergence by one or more orders of magnitude. This improved discretization confirms the value of regularization in the restricted three-body problem, and suggests the utility of fixed-step integration using Sundman transformed equations of motion.
During the past few years, several research programs have assessed the current state and future evolution of the Low Earth Orbit region. These studies indicate that space debris density could reach a critical level such that there will be a continuous increase in the number of debris objects, primarily driven by debris-debris collision activity known as the Kessler effect. These studies also highlight the urgency for active debris removal. An Active Debris Removal System (ADRS) is capable of approaching the debris object through a close-range rendezvous, stabilizing its attitude, establishing physical connection, and finally de-orbiting the debris object. The de-orbiting phase could be powered by a chemical engine or an electrodynamic tether (EDT) system. The aim of this project is to model and evaluate a debris removal mission in which an adapted rocket upper stage, equipped with an electrodynamic tether (EDT) system, is employed for de-orbiting a debris object. This hybrid ADRS is assumed to be initially part of a launch vehicle on a normal satellite deployment mission, and a far-approach manoeuvre will be required to align the ADRS’ orbit with that of the target debris. We begin by selecting a suitable target debris and launch vehicle, and then proceed to modelling the entire debris removal mission from launch to de-orbiting of the target debris object using Analytical Graphic Inc.’s Systems Tool Kit (STK).
Presented at the 2012 Beining Space Sustainability Conference
Myscience High Altitude Balloon ProjectSLCS-online
Myscience employees in York recently planned, built and launched their own High Altitude Balloon. The full article is here http://www.nationalstemcentre.org.uk/blog/the-sky-is-no-longer-the-limit The aim of the science experiment was to collect data and provide advice and assistance for schools and colleges who might also wish to do the same thing.
Surveying Areas in Developing Regions Through Context Aware Drone MobilityAlessandro Montanari
Developing regions are often characterized by large areas that are
poorly reachable or explored. The mapping of these regions and the census of roaming populations in these areas are often difficult and sporadic.
In this paper we put forward an approach to aid area surveying
which relies on autonomous drone mobility. In particular we
illustrate the two main components of the approach. An efficient on device object detection component, built on Convolutional Neural Networks, capable of detecting human settlements and animals on the ground with acceptable performance (latency and accuracy) and a path planning component, informed by the object identification module, which exploits Artificial Potential Fields to dynamically adapt the flight in order to gather useful information of the environment, while keeping optimal flight paths. We report some initial performance results of the on board visual perception module and describe our experimental platform based on a fixed-wing aircraft.
SF Big Analytics 20191112: How to performance-tune Spark applications in larg...Chester Chen
Uber developed an new Spark ingestion system, Marmaray, for data ingestion from various sources. It’s designed to ingest billions of Kafka messages every 30 minutes. The amount of data handled by the pipeline is of the order hundreds of TBs. Omar details how to tackle such scale and insights into the optimizations techniques. Some key highlights are how to understand bottlenecks in Spark applications, to cache or not to cache your Spark DAG to avoid rereading your input data, how to effectively use accumulators to avoid unnecessary Spark actions, how to inspect your heap and nonheap memory usage across hundreds of executors, how you can change the layout of data to save long-term storage cost, how to effectively use serializers and compression to save network and disk traffic, and how to reduce amortize the cost of your application by multiplexing your jobs, different techniques for reducing memory footprint, runtime, and on-disk usage. CGI was able to significantly (~10%–40%) reduce memory footprint, runtime, and disk usage.
Speaker: Omkar Joshi (Uber)
Omkar Joshi is a senior software engineer on Uber’s Hadoop platform team, where he’s architecting Marmaray. Previously, he led object store and NFS solutions at Hedvig and was an initial contributor to Hadoop’s YARN scheduler.
Presentation by Phil Sumrall (Advanced Planning Manager, NASA) at the Von Braun Memorial Symposium in Huntsville, Alabama, 21 October 2008.
<a href="http://astronautical.org/vonbraun/vonbraun-2008/session2">http://astronautical.org/vonbraun/vonbraun-2008/session2</a>
F and G Taylor Series Solutions to the Circular Restricted Three-Body ProblemEtienne Pellegrini
Presentation given at the AAS/AIAA Space Flight Mechanics Meeting in Santa Fe, NM, on 1/27/2014
The Circular Restricted Three-Body Problem is solved using an extension to the classic F
and G Taylor series. The Taylor series coefficients are developed using exact recursion formulas, which are implemented via symbolic manipulation software. In addition, different
time transformations are studied in order to obtain an adapted discretization for the three-body problem. The resulting propagation method is compared to a conventional numerical
integration method, the Runge-Kutta-Fehlberg integrator, on a set of test scenarios designed to qualitatively represent the different types of three-body motion. The series solution is demonstrated to have comparable performance to the conventional integrator, when considering a variety of circumstances, such as the independent variable, error tolerance, orbit characteristics, and integration scheme. In the variable-step case, for low-fidelity applications, such as preliminary design of trajectories, the F and G series with no time transformation are shown to be two to three times faster than the conventional integrator in all cases, when selecting an appropriate order. In the fixed-step case, the Sundman time transformations are demonstrated to reduce the number of steps required for convergence by one or more orders of magnitude. This improved discretization confirms the value of regularization in the restricted three-body problem, and suggests the utility of fixed-step integration using Sundman transformed equations of motion.
During the past few years, several research programs have assessed the current state and future evolution of the Low Earth Orbit region. These studies indicate that space debris density could reach a critical level such that there will be a continuous increase in the number of debris objects, primarily driven by debris-debris collision activity known as the Kessler effect. These studies also highlight the urgency for active debris removal. An Active Debris Removal System (ADRS) is capable of approaching the debris object through a close-range rendezvous, stabilizing its attitude, establishing physical connection, and finally de-orbiting the debris object. The de-orbiting phase could be powered by a chemical engine or an electrodynamic tether (EDT) system. The aim of this project is to model and evaluate a debris removal mission in which an adapted rocket upper stage, equipped with an electrodynamic tether (EDT) system, is employed for de-orbiting a debris object. This hybrid ADRS is assumed to be initially part of a launch vehicle on a normal satellite deployment mission, and a far-approach manoeuvre will be required to align the ADRS’ orbit with that of the target debris. We begin by selecting a suitable target debris and launch vehicle, and then proceed to modelling the entire debris removal mission from launch to de-orbiting of the target debris object using Analytical Graphic Inc.’s Systems Tool Kit (STK).
Presented at the 2012 Beining Space Sustainability Conference
Myscience High Altitude Balloon ProjectSLCS-online
Myscience employees in York recently planned, built and launched their own High Altitude Balloon. The full article is here http://www.nationalstemcentre.org.uk/blog/the-sky-is-no-longer-the-limit The aim of the science experiment was to collect data and provide advice and assistance for schools and colleges who might also wish to do the same thing.
Surveying Areas in Developing Regions Through Context Aware Drone MobilityAlessandro Montanari
Developing regions are often characterized by large areas that are
poorly reachable or explored. The mapping of these regions and the census of roaming populations in these areas are often difficult and sporadic.
In this paper we put forward an approach to aid area surveying
which relies on autonomous drone mobility. In particular we
illustrate the two main components of the approach. An efficient on device object detection component, built on Convolutional Neural Networks, capable of detecting human settlements and animals on the ground with acceptable performance (latency and accuracy) and a path planning component, informed by the object identification module, which exploits Artificial Potential Fields to dynamically adapt the flight in order to gather useful information of the environment, while keeping optimal flight paths. We report some initial performance results of the on board visual perception module and describe our experimental platform based on a fixed-wing aircraft.
SF Big Analytics 20191112: How to performance-tune Spark applications in larg...Chester Chen
Uber developed an new Spark ingestion system, Marmaray, for data ingestion from various sources. It’s designed to ingest billions of Kafka messages every 30 minutes. The amount of data handled by the pipeline is of the order hundreds of TBs. Omar details how to tackle such scale and insights into the optimizations techniques. Some key highlights are how to understand bottlenecks in Spark applications, to cache or not to cache your Spark DAG to avoid rereading your input data, how to effectively use accumulators to avoid unnecessary Spark actions, how to inspect your heap and nonheap memory usage across hundreds of executors, how you can change the layout of data to save long-term storage cost, how to effectively use serializers and compression to save network and disk traffic, and how to reduce amortize the cost of your application by multiplexing your jobs, different techniques for reducing memory footprint, runtime, and on-disk usage. CGI was able to significantly (~10%–40%) reduce memory footprint, runtime, and disk usage.
Speaker: Omkar Joshi (Uber)
Omkar Joshi is a senior software engineer on Uber’s Hadoop platform team, where he’s architecting Marmaray. Previously, he led object store and NFS solutions at Hedvig and was an initial contributor to Hadoop’s YARN scheduler.
Unifying Space Mission Knowledge with NLP & Knowledge GraphVaticle
Synopsis
The number of space missions being designed and launched worldwide is growing exponentially. Information on these missions, such as their objectives, orbit, or payload, is disseminated across various documents and datasets. Facilitating access to this information is key to accelerating the design of future missions, enabling experts to link an application to a mission, and following various stakeholders' activities.
This presentation introduces recent research done at the ESA to combine the latest Language Models with Knowledge Graphs, unifying our knowledge on space missions. Language Models such as GPT-3 and BERT are trained to understand the patterns of human (natural) language. These models have revolutionised the field of NLP, the branch of AI enabling machines to understand human language in all its complexity. In this work, key information on a mission is parsed from documents with the GPT-3 model, and the parsed data is then migrated to a TypeDB Knowledge Graph to be easily queried. Although this work focuses on an application in the space sector, the method can be transferred to other engineering fields.
Presenters
Dr. Audrey Berquand is a Research Fellow at the ESA. Her research aims at enhancing space mission design and knowledge management with text mining, NLP, and Knowledge Graphs. She was awarded her PhD in 2021 from the University of Strathclyde (Scotland) for her thesis on “Text Mining and Natural Language Processing for the Early Stages of Space Mission Design”. Audrey has a background in space systems engineering, she holds an MSc in Aerospace Engineering from the Royal Institute of Technology KTH (Sweden), and a diplôme d'ingénieur from the EPF Graduate School of Engineering (France). Before diving into the world of AI, she spent 3 years at ESA being involved in the early design phases of future Earth Observation missions.
Ana Victória Ladeira works with Knowledge Management at the ESA, using automated methods to exploit the information contained in the piles and piles of documents that ESA generates every day. With a Masters degree in Data Science from Maastricht University, Ana is particularly excited about how NLP methods can help large organizations connect different documents and highlight the bigger picture over a big universe of data sources, as well as using Knowledge Graphs to help connect people to the expertise and information they need.
Modeling & Simulation of CubeSat-based Missions'Concept of OperationsObeo
Discover how Arcadia/Capella is used to model and simulate concept of operations scenarios for CubeSat-based missions. During this webinar, Danilo Pallamin de Almeida, who worked as a Space Systems Engineer for the NanosatC-BR2 mission at INPE, the Brazilian Institute for Space Research, will present how CubeSat-based missions have been modeled with Capella.
The model describing an initial architecture mission and concept of operations (CONOPS) is used to generate a script that configures a satellite simulator with the corresponding mission parameters.
You will see how it allows the INPE to:
- run concept of operations scenarios simulations,
- use the results for power/data-budget analyses and trade studies
A Lightweight Infrastructure for Graph AnalyticsDonald Nguyen
Several domain-specific languages (DSLs) for parallel graph analytics have been proposed recently. In this pa- per, we argue that existing DSLs can be implemented on top of a general-purpose infrastructure that (i) supports very fine-grain tasks, (ii) implements autonomous, speculative execution of these tasks, and (iii) allows application-specific control of task scheduling policies. To support this claim, we describe such an implementation called the Galois system.
We demonstrate the capabilities of this infrastructure in three ways. First, we implement more sophisticated algorithms for some of the graph analytics problems tack- led by previous DSLs and show that end-to-end performance can be improved by orders of magnitude even on power-law graphs, thanks to the better algorithms facilitated by a more general programming model. Second, we show that, even when an algorithm can be expressed in existing DSLs, the implementation of that algorithm in the more general system can be orders of magnitude faster when the input graphs are road networks and similar graphs with high diameter, thanks to more sophisticated scheduling. Third, we implement the APIs of three existing graph DSLs on top of the common infrastructure in a few hundred lines of code and show that even for power-law graphs, the performance of the resulting implementations often exceeds that of the original DSL systems, thanks to the lightweight infrastructure.
For the past 5 weeks, we have been researching and working on the best way to prevent in-air collisions between UAVs. This presentation discusses our research on Dynamic Sparse A*, as well as our implementation of the algorithms that we have decided on. It addresses the differences between our methods and those represented in the literature, as well as our approach to making A* both dynamic and sparse. The second half of the presentation focuses on the challenges we have faced over the past 5 weeks and how we have overcome them.
"#AprilFools Hijinks" at SVPerl April 2021 meetingIan Kluft
Slides from the SVPerl monthly meeting of April 1, 2021 on "April Fools Hijinks" in the Perl community. This was the second of two short presentations at the meeting.
There's a lot of Perl code out there and more being written all the time. Ian Kluft presented current advice on secure coding in Perl, including language-specific guidelines from the Perl documentation, CMU Software Engineering Institute Perl Coding Standard, Common Weakness Enumeration(CWE) and general advice from OWASP Top 10.
Securing a Raspberry Pi and other DIY IoT devicesIan Kluft
These are the slides from the presentation by Ian Kluft at the ISC² Silicon Valley Chapter meeting on February 11, 2020 in Santa Clara, California on "Securing a Raspberry Pi and other DIY IoT devices". It introduces the Raspberry Pi computer and security issues relevant to projects on similar Internet of Things (IoT) devices. Also, for hobby projects there's advice how to prioritize security issues to avoid being overwhelmed. It covers analysis of the project's attack surface and online security resources. The presentation was made for a group who have or are working on cybersecurity certifications. But the slides should also be understandable by a wider technical audience.
Best Practices for Recovering Rocket & Balloon PayloadsIan Kluft
Recommendations for tracking and search for high-altitude rocket and balloon payloads based on experience from the Stratofox Aerospace Tracking Team
This was an alternate presentation in case any speakers did not show up at Space Access 2019 in Fremont, California - the organizers asked to have this ready just in case. However, it was not presented because no gaps occurred in the schedule.
PiFlash: Linux utility to flash SD cards for Raspberry Pi computersIan Kluft
Presentation by Ian Kluft at Silicon Valley Perl (SVPerl) on Feb 7, 2019 on "PiFlash: Linux utility to flash SD cards for Raspberry Pi computers". This tool is for use on Linux systems in place of manual procedures to write SD cards to boot a Raspberry Pi board. Safety features for newcomers include checking the destination device and refusing to erase any device that isn't an SD card. Handy automation for experience users includes automatically extracting the OS image from a tar/zip archive and uncompressing it to the SD card in one step.
"Code Generation in Perl" presented to Silicon Valley Perl in Santa Clara CA by Ian Kluft on September 7, 2017. The presentation surveys the landscape of code generation tools and techniques including preprocessers, compliers and model languages, as well as CPAN modules to help with those tasks. Code generation has always been useful for automation of tedious tasks. There is also some debunking of myths from science fiction about what is currently possible with code generation. No matter how much processing is involved, at some level someone still has to write the programs.
This describes writing command-line processing for Perl scripts. Don't re-invent the wheel - this problem has been solved. Use Getopt::Long or a similar module from CPAN.
This was presented as one of several "lightning talk" mini-presenations at the Silicon Valley Perl (SVPerl) meeting on Thursday, November 12, 2015 where the primary meeting topic was CPAN, the Comprehensive Perl Archive Network with the tag line "Your project is already half done".
Presentation by Ian Kluft at California Meteorite Club in Escondido CA on September 14, 2014 about the theory of a newly-discovered impact structure at Nevada's Black Rock Desert. More info is at http://www.blackrocknevada.info/impact-crater/ .
Exception handling is a means of responding to error conditions in a program in a more organized way. There are Perl modules on CPAN to make this job easier.
Student information management system project report ii.pdfKamal Acharya
Our project explains about the student management. This project mainly explains the various actions related to student details. This project shows some ease in adding, editing and deleting the student details. It also provides a less time consuming process for viewing, adding, editing and deleting the marks of the students.
Cosmetic shop management system project report.pdfKamal Acharya
Buying new cosmetic products is difficult. It can even be scary for those who have sensitive skin and are prone to skin trouble. The information needed to alleviate this problem is on the back of each product, but it's thought to interpret those ingredient lists unless you have a background in chemistry.
Instead of buying and hoping for the best, we can use data science to help us predict which products may be good fits for us. It includes various function programs to do the above mentioned tasks.
Data file handling has been effectively used in the program.
The automated cosmetic shop management system should deal with the automation of general workflow and administration process of the shop. The main processes of the system focus on customer's request where the system is able to search the most appropriate products and deliver it to the customers. It should help the employees to quickly identify the list of cosmetic product that have reached the minimum quantity and also keep a track of expired date for each cosmetic product. It should help the employees to find the rack number in which the product is placed.It is also Faster and more efficient way.
Forklift Classes Overview by Intella PartsIntella Parts
Discover the different forklift classes and their specific applications. Learn how to choose the right forklift for your needs to ensure safety, efficiency, and compliance in your operations.
For more technical information, visit our website https://intellaparts.com
An Approach to Detecting Writing Styles Based on Clustering Techniquesambekarshweta25
An Approach to Detecting Writing Styles Based on Clustering Techniques
Authors:
-Devkinandan Jagtap
-Shweta Ambekar
-Harshit Singh
-Nakul Sharma (Assistant Professor)
Institution:
VIIT Pune, India
Abstract:
This paper proposes a system to differentiate between human-generated and AI-generated texts using stylometric analysis. The system analyzes text files and classifies writing styles by employing various clustering algorithms, such as k-means, k-means++, hierarchical, and DBSCAN. The effectiveness of these algorithms is measured using silhouette scores. The system successfully identifies distinct writing styles within documents, demonstrating its potential for plagiarism detection.
Introduction:
Stylometry, the study of linguistic and structural features in texts, is used for tasks like plagiarism detection, genre separation, and author verification. This paper leverages stylometric analysis to identify different writing styles and improve plagiarism detection methods.
Methodology:
The system includes data collection, preprocessing, feature extraction, dimensional reduction, machine learning models for clustering, and performance comparison using silhouette scores. Feature extraction focuses on lexical features, vocabulary richness, and readability scores. The study uses a small dataset of texts from various authors and employs algorithms like k-means, k-means++, hierarchical clustering, and DBSCAN for clustering.
Results:
Experiments show that the system effectively identifies writing styles, with silhouette scores indicating reasonable to strong clustering when k=2. As the number of clusters increases, the silhouette scores decrease, indicating a drop in accuracy. K-means and k-means++ perform similarly, while hierarchical clustering is less optimized.
Conclusion and Future Work:
The system works well for distinguishing writing styles with two clusters but becomes less accurate as the number of clusters increases. Future research could focus on adding more parameters and optimizing the methodology to improve accuracy with higher cluster values. This system can enhance existing plagiarism detection tools, especially in academic settings.
Using recycled concrete aggregates (RCA) for pavements is crucial to achieving sustainability. Implementing RCA for new pavement can minimize carbon footprint, conserve natural resources, reduce harmful emissions, and lower life cycle costs. Compared to natural aggregate (NA), RCA pavement has fewer comprehensive studies and sustainability assessments.
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesChristina Lin
Traditionally, dealing with real-time data pipelines has involved significant overhead, even for straightforward tasks like data transformation or masking. However, in this talk, we’ll venture into the dynamic realm of WebAssembly (WASM) and discover how it can revolutionize the creation of stateless streaming pipelines within a Kafka (Redpanda) broker. These pipelines are adept at managing low-latency, high-data-volume scenarios.
Literature Review Basics and Understanding Reference Management.pptxDr Ramhari Poudyal
Three-day training on academic research focuses on analytical tools at United Technical College, supported by the University Grant Commission, Nepal. 24-26 May 2024
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Dr.Costas Sachpazis
Terzaghi's soil bearing capacity theory, developed by Karl Terzaghi, is a fundamental principle in geotechnical engineering used to determine the bearing capacity of shallow foundations. This theory provides a method to calculate the ultimate bearing capacity of soil, which is the maximum load per unit area that the soil can support without undergoing shear failure. The Calculation HTML Code included.
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Aerospace applications of Perl
1. Aerospace Applications of Perl
Presented by Ian Kluft
Silicon Valley Perl
Santa Clara, California
March 3, 2016
2. Aerospace Applications of Perl
● Perl and its libraries on CPAN are versatile
● Aerospace applications cover lots of topics
– Navigation/mapping
– Aviation
– Satellites
– Astronomy
● Also some examples from my own projects
3. Introducing the presenter
● Hi! I'm Ian Kluft
● From San Jose and a native
of the Bay Area
● Software engineer
– Primarily Perl & C/C++ on
servers & embedded/IoT
– Perl is my favorite language
● Currently working on my MBA
● Aerospace enthusiast
– Commerical pilot & flight
instructor
– Co-founder of Stratofox
Aerospace Tracking Team
– Participated in world records for
amateur aerospace
● 1st amateur rocket launch to space
(CSXT 2004, Nevada)
● 1st transcontinental/transoceanic
Ham Radio balloon (CNSP 2011)
4. Navigation & Mapping
● I presented a year ago at SVPerl on Geographic Computation
● Quick overview here because positioning is integral to
aerospace
– Next 7 slides are a review from last year's presentation
● Then we'll move on to look at aviation, satellites & astronomy
5. Coordinate system
Latitude and longitude
● Any position on Earth has a coordinate
● 3-dimensional positioning uses 3 numbers
– Latitude (north/south)
– Longitude (east/west)
– Altitude (relative to mean sea level/MSL)
● Latitude & longitude are specified in degrees
● Altitude is specified in distance
6. Latitude and longitude
What kind of degrees?
● Not from a university
● Not related to temperature
● They are angles!
● More precisely, angles from the
center of the Earth
● Latitude = 0-90° up or down
● Longitude = 0-180° either way
around
7. 7
Earth is not a perfect sphere
● Earth is an ellipsoid: bulges out at equator
– Centrifugal force from rotation causes this
● Geoid: mathematical models for Earth ellipsoid
– Good models come from satellite measurement
● Coordinates must use the same geographic reference system
– Otherwise comparing apples and oranges
– WGS84 most widely used coordinate system today
● Sea level and altitude are relative to this model
8. 8
Lots of angles in Geospatial Data
● Many computations involve angles
– Latitude and longitude are angles
● Manipulations use trigonometric functions
● Trig functions use radians
– So numbers in degrees must be converted to and from radians
– One circle = 360 degrees = 2 * pi radians
– Radians derive 2 * pi from distance around circle relative to radius
● Math::Trig module on CPAN can do this for you
10. 10
Great Circle Formulas
● See “Aviation Formulary” site
http://williams.best.vwh.net/avform.htm
● Distance between points
● Course between points
● Latitude of point on GC
● Lat/lon given radial & dist
● Intersection of 2 radials
● Max latitude of a GC
● GC crossing a parallel
● Intermediate points on a GC
● Cross track error
● Along track distance
● Point known offset from GC
Many of these are in Math::Trig
11. 11
Example: Great Circle
Distance between points
● From scratch:
d=acos(sin(lat1)*sin(lat2)+cos(lat1)*cos(lat2)*cos(lon1-lon2))
● In Perl:
use Math::Trig 'great_circle_distance';
$distance = great_circle_distance($lon1, $lat1, $lon2, $lat2, $radius);
● Convert angles to radians
● For the radius of the Earth, use 6366.71 km
– Don't forget to convert result from km to miles if needed
12. 12
Navigation related Perl modules
● Net::GPSD3 – connect to GPSD v3 server so multiple
processes can use a single GPS on laptop, IoT, drone, etc
● Geo::Coder – use online search sites to look up address of
current location
● Geo::Cache – Look up geocaching sites nearby
● Ham::APRS::IS – receive Ham Radio APRS positioning data,
open-sourced by the APRS.FI Ham Radio tracking web site
● Many more
13. 13
Aviation applications
● Adding to the navigation/planning capabilities…
● Geo::METAR – decode text from airport weather observations
● Geo::TAF – decode text from airport weather forecasts
● Geo::ICAO – encode/decode international airport codes
● And other variants of these
14. 14
Aviation example:
METAR weather observation (1/5)
#!/usr/bin/perl
use strict;
use warnings;
use Getopt::Long;
use LWP::UserAgent;
use HTTP::Response;
use XML::Simple;
my $url = "http://www.aviationweather.noaa.gov/adds/dataserver_current/httpparam?
dataSource=metars&requestType=retrieve&format=xml&stationString=%s&hoursBeforeNow=4";
my @metar_fields = qw(observation_time temp_c dewpoint_c wind_dir_degrees
wind_speed_kt wind_gust_kt visibility_statute_mi altim_in_hg
sea_level_pressure_mb three_hr_pressure_tendency_mb wx_string
sky_condition vert_vis_ft maxT_c minT_c maxT24hr_c minT24hr_c precip_in
pcp3hr_in pcp6hr_in pcp24hr_in snow_in quality_control_flags
flight_category
);
my $ua = LWP::UserAgent->new();
15. 15
Aviation example:
METAR weather observation (2/5)# convert temperature C to C & F
sub tempC2CF
{
my ( $tempc ) = @_;
my $tempf = int($tempc * 9 / 5 + 32 + .5); # .5 = round off
return sprintf "%dC/%dF", $tempc, $tempf;
}
# turn a sky condition structure into a string
sub sky2str
{
my ( $sky ) = @_;
if ( ref $sky eq "ARRAY" ) {
# handle arrays of cloud layers by recursive calls
my @result;
foreach my $layer ( @$sky ) {
push @result, sky2str( $layer );
}
return join " ", @result;
}
# report cloud layer
return $sky->{sky_cover}."@".$sky->{cloud_base_ft_agl};
}
16. 16
Aviation example:
METAR weather observation (3/5)
# get_metar function - download METAR by airport code
sub get_metar
{
my ( $code ) = @_;
my $url_with_code = sprintf( $url, $code );
print $url_with_code."n";
my $response = $ua->get( $url_with_code );
if ( $response->is_error()) {
printf "%s failed: %sn", $code, $response-
>status_line;
} else {
my $content = $response->content();
my $metar_tree = XMLin( $content );
print "$code:n";
if ((!exists $metar_tree→{data})or (!exists
$metar_tree→})
or (!exists $metar_tree->{data}{METAR})) {
print "unrecognized data: $contentn";
} else {
my $metar_ref = $metar_tree->{data}{METAR};
foreach my $metar ( @$metar_ref ) {
foreach my $field ( @metar_fields ) {
if ( exists $metar->{$field}) {
if ( $field eq "observation_time" ) {
print $metar->{$field}." ";
} elsif ( $field eq "sky_condition" ) {
print "sky: ".sky2str($metar->{$field})." ";
} elsif ( $field =~ /^(.*)_c$/ ) {
my $name = $1;
print "$name:".tempC2CF($metar->{$field})." ";
} elsif ( $field =~ /^(.*)_(kt|statute_mi|in_hg|degrees)
$/ ) {
my $name = $1; my $unit = $2;
print "$name:".$metar->{$field}."$unit ";
} else {
print "$field:".$metar->{$field}." ";
}
}
}
print "n";
}
}
}
}
17. 17
Aviation example:
METAR weather observation (4/5)
# main - get airport codes from command line,
loop through them and get METARs
my $arg;
foreach $arg ( @ARGV ) {
get_metar( $arg );
}
19. 19
Satellite tracking
● Why would you want to track a satellite?
– See visible passes of International Space Station (or Iridium Flares),
nighttime only
– Ham Radio communication via OSCARs (Orbiting Satellite Carrying
Amateur Radio), day or night
– If you make a commercial or research satellite, you'll build your own
ground station, day or night
● Astro::SpaceTrack – downloads satellite orbital elements
● Astro::satpass – makes satellite pass predictions
● Astro::App::SatPass2 – makes satellite pass predictions
20. 20
Astronomy
● Astro::Sunrise – compute sunrise/sunset for your location/date
● Astro::MoonPhase – compute phase of the moon for a date
● Astro::Telescope – for astronomers accessing remote
telescopes
● Various celestial database searches
21. 21
Example: Missing rocket payload
at Black Rock Desert
Location: Black Rock Desert, Nevada
Problem: Rocket launched, payload missing
● Soka University (Japan) students needed data
● Payload was a “CanSat”, size of a soda can
● AeroPac club knew rocket landing coordinates
● Turned to Stratofox Aerospace Tracking Team
● Transmitter batteries died before they contacted us
● I wrote a Perl script to generate a grid search
22. 22
Perl Script to Plot Search Grid
● Search area was 3x3 mile parallelogram
– Top/bottom side east-west for typical non-storm wind direction
– Right/left sides NNE/SSW for typical storm wind direction
● Each side divided into 10 sections, 1584' long
● 10x10 loop projects each computed waypoint
● Command-line controls output to text or GPX
● “gpsbabel” open source utility turns GPX into many formats
– Raw Garmin waypoint data for upload to GPS
– KML for display on Google Earth
23. 23
Projecting Search Grid Waypoints
● Nested loop: i = 0-10 over, j = 0-10 up
● Over = 270° heading, up = 330° heading
● Convert lat/lon from degrees to radians
● Use Great Circle projection formula
– Compute intermediate point from i “over”
– Compute final point from j “up”
● Convert new lat/lon from radians to degrees
● Code available at slideshare.com with slides
24. 24
Sample code
convert feet to radians
● Convert distance in feet to radians over Earth's surface
●
Radians are angles – this is a tiny angle from center of Earth
# conversion: distance in feet to radians
sub dist_ft2rad
{
my $ft = shift;
my $km = $ft / 3280.8399; # ft/km
return $km/6371.0; # divide by FAI standard Earth radius in km
}
25. 25
Sample code
compute waypoint from course & distance
sub gc_waypoint
{
my $lat1 = shift; # latitude (radians)
my $lon1 = shift; # longitude (radians)
my $tc = shift; # true course (radians)
my $d = shift; # distance (radians)
my $lat = asin(sin($lat1)*cos($d)+cos($lat1)*sin($d)*cos($tc));
my $dlon = atan2(sin($tc)*sin($d)*cos($lat1),cos($d)-sin($lat1)*sin($lat));
my $lon=fmod($lon1-$dlon+pi,2*pi) - pi;
return ( $lat, $lon ); # lat/lon in radians
}
26. 26
Example code
compute coordinates of search grid point
# project a waypoint in the search area
# shape of a parallelogram with sides at headings 030 (NNE) and 090 (east)
# sides are on heading 1 (030 degrees) and heading 2 (090 degrees)
# increments are 0-10
# each increment is 1584 ft so that 10 of them is 3 miles
sub project_waypoint
{
my $h1_inc = shift;
my $h2_inc = shift;
# compute intermediate point on the first side of parallelogram
my ( $lat_r1, $lon_r1 ) = gc_waypoint (
deg2rad( $point_start[0]), deg2rad( $point_start[1]),
$h1_heading, $rad_per_increment * $h1_inc );
27. 27
Example code (continued)
compute coordinates of search grid point
# compute final projected waypoint in search area
my ( $lat_r2, $lon_r2 ) = gc_waypoint (
$lat_r1, $lon_r1,
$h2_heading, $rad_per_increment * $h2_inc );
# convert radians to degrees
my $lat = rad2deg( $lat_r2 );
my $lon = rad2deg( $lon_r2 );
return ( $lat, $lon );
}