landingDataModel

LandingDataModel holds and calculates positional data related to impact and landing geoposition.

Table of contents:

Contructing

parameters type default Description
landingSite geoposition - Desired landing geoposition

* optional parameters

Public methods

public methods return type Description
getSite() geoposition Returns landing site geoposition
getImpact() geoposition Returns impact geoposition
lngError() float Returns longitude error in degrees
latError() float Returns latitude error in degrees
errorVector() vector Returns a vector between landing and impact position
overshoot(int) landingDataModel Returns new landingDataModel object with an overshoot

getSite()

No parameters

Returns landing site geoposition.


getImpact()

No parameters

Returns impact geoposition.


lngError()

No parameters

Returns longitude difference between impact longitude and desired landing longitude.


latError()

No parameters

Returns latitude difference between impact latitude and desired landing latitude.


errorVector()

No parameters

Returns a vector between desired landing position and current impact position.


overshoot(int)

Parameters:

  • meters::Integer -> by how many should I overshoot original landing position?

Returns new landingDataModel object with landingSite parameter shifted by distance defined in meters, in the direction of flight.


Code examples


Give code examples

// before flight, we will choose a target(could be a mobile landing pad)
wait until hastarget.
local ldata is landingDataModel(target:geoposition).
wait until hastarget.
local ldata is landingDataModel(target:geoposition).
.
.
.
print ldata["errorVector"]():mag. // prints how far impact point is from target
                                  // in meters
wait until hastarget.
local ldata is landingDataModel(target:geoposition).
.
.
.
// creating new landingDataModel, but the landing position
// is being shifted by 50 meters in the direction of flight
// from original landing position
local overshootData is ldata["overshoot"](50).