Skip to content

Instantly share code, notes, and snippets.

@giseburt
giseburt / JSON-in-postgresql-p1-00.md
Last active May 11, 2021 18:34
Managing Complex Data with JSON in PostgreSQL, part 1

Managing Complex Data with JSON in PostgreSQL, Part 1

This is the support code for a blog post about using JSON in PostgreSQL.

Read the full article here.

[
{
"type": "tabs",
"tabs": [
{
"title": "Axis X",
"items": [
"x"
]
},
var VELOCITY_ACCURACY = 1
var calcPen = function(zLen){
//Pendulum Movement Equation
//T = 2pi*SQRT(L/g)
var twoPi = 6.2831926
var gravity = 9.8
var result = twoPi * Math.sqrt(zLen / gravity);
return(result.toFixed(4))
}
var calcPen = function(zLen){
//Pendulum Movement Equation
//T = 2pi*SQRT(L/g)
var twoPi = 6.2831926
var gravity = 9.8
var result = twoPi * Math.sqrt(zLen / gravity);
return(result.toFixed(4))
}
exports.calcVelocity = function(xyLen, jerk, zLen){