lua s-100 portrayal processing - iho · lua s-100 portrayal processing spawarsyscen lant august 31,...

Post on 10-Dec-2018

269 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Lua S-100 Portrayal Processing

SPAWARSYSCEN LANT

August 31, 2016

David.Grant1@navy.mil

+1-757-541-5794

What is an Extension Language?

2

A scripting language interpreter

Provides an Application Programming Interface

Has access to the applications data

structures

Application can usually access the extension

language data structures

XSLT as an ECDIS Extension Language

3

S-100 Part 9 uses XSLT 1.0 as an extension language to

provide portrayal processing for an ECDIS system

XSLT 1.0 does not facilitate simple implementation of the

state-machines used to define the conditional symbology

procedures

If conditional symbology procedures are not implemented in the portrayal, they will not be

available for extension

Alerts and Indications require complex spatial processing on feature instances which are the output of conditional symbology

procedures

?

Today

2009 2010 2011 2012 2013 2014 2015 2016

DIPWG-1 Origins of portrayal model as XML

4/8/2009

DIPWG-2 - XSLT processing first mentioned

5/3/2010

*DIPWG Focus Group Recommends XSLT

9/1/2012

First XSLT Portrayal Catalog

10/3/2014

XSLT Development Ongoing

9/13/2016

Taunton Workshop - Use of XML agreed upon

3/9/2010

DIPWG-4 Portrayal Proposal Review Discussion (XSLT)

5/7/2012

DIPWG-5 XSLT Becomes S-100 Part 9

6/10/2013

Updated XSLT Portrayal Catalog

6/19/2015

XSLT Portrayal Development Timeline

Proposed Portrayal Changes

5

Augment or replace XSLT as the

S-100 portrayal extension language

Eliminate the portrayal input schema. Portrayal scripts will directly access

the S-100 feature model

Goals of Augmenting or Replacing XSLT

6

Output an XML document as currently defined in S-100 Part 9 to maintain compatibility with previously developed applications and tools

Facilitate simple portrayal implementation within a reasonable timeframe

Permissive license (MIT preferred)

Easily embedded in C, C++, C# and Java applications

Small footprint (<1MB)

Be extensible through application provided “hooks”, thereby allowing spatial and other advanced processing

Why Did We Choose Lua?

7

We have chosen to implement a Lua proof-of-concept portrayal

Lua, JavaScript, and Python are scripting languages which could be used as ECDIS extension languages

Lua is a proven, robust language

Lua is fastLua is portable &

embeddable

Lua has a small footprint and is simple

yet powerful

Lua has greater than 50% market

penetration in the gaming industry as an

extension language

What is Lua?

8

Lua is a powerful, efficient, lightweight, embeddable scripting (extension) language

It supports procedural programming, object-

oriented programming, functional

programming, data-driven programming, and data description

"Lua" (pronounced LOO-ah) means "Moon" in Portuguese

• It is neither an acronym nor an abbreviation

Learn more about it at:

www.lua.org/about.html

Existing Portrayal Process (XSLT)

9

Proposed Portrayal Process (Lua)

10

System

Database

Feature

Data

System Portrayal Engine

Lua

Processor

Drawing

Instructions

Portrayal

Functions

User Portrayal

Parameters

XML Schema

or

Requests Attributes & Spatials as Needed

Remove Input Schema

Implement XSLT rules as

Lua scripts

Support files are unchanged

Output is (optionally) unchanged

LuaPortrayal

Rules

Pixmaps (XML)

Color Profiles (XML)

Symbols (SVG)

Line Styles (XML)

Area Fills

(XML)

Fonts (XML)

Viewing Groups (XML)

Display Modes (XML)

Display Planes (XML)

Portrayal Catalog Changes (Only Rules Change)

11

What we did with Portrayal and Lua

• Any language that supports a C level call interface can integrate with Lua.

• Lua can integrate with C, C++, C#, Java, Python, etc.

Integrated Lua with

S-100 Viewer

• Don’t need a mechanism to describe what attributes are expected by the portrayal, simplifying implementation.

• Don’t have to build a large DOM (XML) to feed the portrayal.

• Only need the feature type, primitive type and unique ID; anything else is requested by the portrayal “on the fly”.

Determine attribute values and spatial

associations

“on the fly”

• Drawing instructions are grouped by their corresponding feature.

• Allows for advanced techniques such as draw instruction caching and can be used to assist with pick reports.

Took a

“Feature Oriented”

approach

12

ECDISLua Processor

Interoperability Post-processing

(Levels 0 & 1)

Lua Rendering Pipeline - Interoperability Support

13

Product 1

Portrayal

Catalog

Feature

Database(s)

Interoperability Preprocessing

(Levels 2, 3 & 4)

Spatial

Engine(s)

Product N

Portrayal

Catalog

Rendering

Engine(s)

Product 2

Portrayal

Catalog

Draw

Instructions

Draw

Instructions

Draw

Instructions

Dataset 1

Dataset 2

Dataset N

Combined Draw

Instructions

Get Features &

Spatials

Dataset(s)

Backwards Compatibility

14

System

Database

Feature

DataSystem Portrayal Engine

Lua

Processor

Drawing

Instructions

Portrayal

Functions

User Portrayal

Parameters

Drawing Instructions

XML Schema

Requests Attributes & Spatials as NeededTranslator

ApplicationInput XML

User Portrayal

Parameters

Lua Implementation Status

Implementing in S-100 Viewer

No short-comings encountered to

date

Available on Basecamp

15

CSP Implementation Status

16

CSP XSLT * Notes Lua * Notes

DATCVR02 X X* Will be implemented as part of multi-product

rendering.

DEPARE02 / 03 X* Incorrect safety contour generated. No

contour labels.

DEPCNT03 X

DEPVAL02

LIGHTS05 / 06 partial* Leg-lines incorrect, arcs incorrect X

OBSTRN06 / 07

QUAPOS01 partial* Spatial quality not implemented. X

QUALIN01 partial* Spatial quality not implemented. X

QUAPNT02 X

RESARE03 / 04 X

RESTRN01 X

RESCSP02 X

SAFCON01 X

SLCONS03 / 04 partial* Spatial quality not implemented. partial

SEABED01

SNDFRM03 / 04

SOUNDG02 / 03 X* Implemented incorrectly.

UDWHAZ04 X

WRECKS04 / 05

CSP DEPARE02 / 03

17

XSLT Lua

Conclusions

Lua Portrayal Advantages

Lua was designed to be an extension

language

S-101 CSPs are easily

implemented in a timely manner

Complex portrayals

which may be required for

new products are easily

implemented

Removal of input schema

simplifies application

development

Removal of input schema

simplifies portrayal catalog

maintenance

Facilitates implementation

of Alerts and Indications

Facilitates implementation

of Product Interoperability

18

top related