You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// The ./types module provides helper types for your Input events and messages.
import { Input, Message } from "./types";
// Your script can output well-known message types, any of your custom message types, or
// complete custom message types.
//
// Use `Message` to access types from the schemas defined in your data source:
// type Twist = Message<"geometry_msgs/Twist">;
//
type gps = Message<"evelogger_vectornav_position">
import {LocationFix} from "@foxglove/schemas";
// Import from the @foxglove/schemas package to use foxglove schema types:
// import { Pose, LocationFix } from "@foxglove/schemas";
//
// Conventionally, it's common to make a _type alias_ for your script's output type
// and use that type name as the return type for your script function.
// Here we've called the type `Output` but you can pick any type name.
type Output = {
hello: string;
};
// These are the topics your script "subscribes" to. Studio will invoke your script function
// when any message is received on one of these topics.
export const inputs = ["evelogger_vectornav_position_data"];
// Any output your script produces is "published" to this topic. Published messages are only visible within Studio, not to your original data source.
export const output = "/studio_script/output_topic";
// This function is called with messages from your input topics.
// The first argument is an event with the topic, receive time, and message.
// Use the `Input<...>` helper to get the correct event type for your input topic messages.
export default function script(event: Input<"evelogger_vectornav_position_data">): LocationFix {
return {
timestamp: event.receiveTime,
frame_id: "joe",
position_covariance: [0,0,0,0,0,0,0,0,0],
latitude: event.message.evelogger_vectornav_latitude,
longitude: event.message.evelogger_vectornav_longitude,
position_covariance_type: 0,
altitude: 0
};
};
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: