Efficient tools to build your streaming infrastructure


GPS-based features in Larix Broadcaster


Larix Broadcaster gives the ability to use GPS-based data in HTML overlays. This includes coordinates, altitude, direction, speed and current location.

Premium: GPS feature set is available as part of Larix Premium in-app subscriptions.

GPS can be used in HTML overlay via special tags, like in this example:
<% gps_coord(dms) %> | Alt: <% gps_alt(m) %>m
It shows GPS coordinates and the altitude in meters.

To allow screen updates of GPS data, turn on Periodic refresh parameter in the overlay settings and set some Refresh interval, e.g. 1 second.

Parameters

You can use the following functions for GPS-based data. Each function has its own parameters which you may use to customize their appearance.

date – Current date and time
date(format, locale, timezone)

Attributes:
format – date/time format string according to Unicode Date Format Pattern. If it’s not specifiec then it’s set according to the second parameter, or the systems one, with short date style (typically numeric only, such as “11/23/37”), or time style medium (typically with abbreviated text, such as “Nov 23, 1937” or “3:30:32 PM”)
locale – described as “A BCP-47 language identifier such as en_US or en-u-nu-thai-ca-buddhist, or an ICU-style identifier such as en@calendar=buddhist;numbers=thai.”, You can see some example in Language Tags (BCP 47).
timezone – the time zone idetifyer, e.g. “UTC” or “America/Los_Angeles”. See the full list here.

gps_coord – Current GPS coordinates (latitude and longitude)
gps_coord(style, digits)

Attributes:
style: – the stype of coordinates:

  • dd – for portions of degrees (e.g. 42.71843)
  • ddm – degrees, minutes, portions of minutes (e.g. 42° 43.108′)
  • dms – degrees, minutes, seconds, portions of seconds (e.g. 42° 43′ 6.3″)

Coords are appended with hemiphere: (N|S) for latitude and (E/W) for longutude.
digits – number of digits after comma.

gps_speed – Instantaneous speed of the device
gps_speed(units)

Attributes:
units of speed measurement, km/h by default.

  • km/h
  • m/s (meters per second)
  • mi/h (miles per hour)
  • ft/s (feet per second)
  • nm/h or kt (nautical miles per hour, i.e. knots)

gps_alt – Altitude, i.e. height above the sea level
gps_alt(units)

Attributes:
units of height mesurement, meters by default.

  • km (kilometers)
  • m (meters)
  • cm (centimeters)
  • mi (miles)
  • ft (feet)
  • yd (yards)
  • in (inches)

gps_heading – Device’s azimuth relative to true or magnetic north
gps_heading(type, [format])

Attributes:
type: “tru” for true north; “mag” for magnetic north (default)

format: a formatted string which can contain any text and “d0” and “r#” variables:

  • d0 – current direction degrees output
  • r# – current rose compas direction, # refers to rose wind type, possible values: r8, r16, r32

Example: gps_heading(tru, “We're heading r8”) – when heading to zero degrees North, it will make output “We’re heading N” to the screen.

gps_place – Current location name (e.g. as shown on Apple maps)
gps_place(location_part, locale)
or
gps_place("location_part some text other_location_part", locale)

Attributes:
location_part is an element of location, as described below:

  • name – Generic location name
  • address – Postal address
  • thoroughfare – Street name, e.g. Infinite Loop
  • sub_thoroughfare – Additional street-level information, e.g. 1
  • locality – City, e.g. Cupertino
  • sub_locality – Neighborhood, common name, e.g. Mission District
  • admin_area – State, e.g. CA
  • sub_admin_area – County, e.g. Santa Clara
  • postal_code – ZIP/Postal code, e.g. 95014
  • country_code – Country code, e.g. US
  • country – Country name, e.g. United States
  • inland_water – Inland water body, e.g. Lake Tahoe (iOS only)
  • ocean – Ocean name, e.g. Pacific Ocean (iOS only)

locale – same as for date function but some names may be missing.

We’ll soon have a tutorial video showing GPS setup specifically. Meanwhile, check out video on overlays in general.